Skip to content

Enhance font hinting and ANI documentation in ImageSharp - #81

Merged
JimBobSquarePants merged 2 commits into
mainfrom
js/vnext
Aug 12, 2026
Merged

Enhance font hinting and ANI documentation in ImageSharp#81
JimBobSquarePants merged 2 commits into
mainfrom
js/vnext

Conversation

@JimBobSquarePants

Copy link
Copy Markdown
Member

This pull request updates and expands the documentation for SixLabors.Fonts, introducing new features and clarifying existing behaviors related to color fonts, fallback font resolution, font metrics, hinting, and custom rendering. The most significant changes include new documentation for font palettes and fallback resolvers, a comprehensive rewrite of the font hinting section to explain multiple hinting modes, and updates to custom rendering APIs and examples.

Color Font and Palette Enhancements:

  • Added documentation for COLR font palettes, including how to select and override palettes with TextOptions.FontPalette, FontPaletteOverride, and related APIs.
  • Clarified how COLR v1 composite groups are rendered using BeginGroup/EndGroup in custom renderers, and updated references from ClipQuad to ClipBounds. [1] [2]

Font Fallback Improvements:

  • Introduced resolver-based fallback with TextOptions.FontFallbackResolver, including usage of SystemFonts.FallbackResolver and custom resolvers via IFontFallbackResolver. Updated shaping documentation to reflect the new fallback resolution order. [1] [2] [3]

Font Hinting Documentation Rewrite:

  • Rewrote the hinting documentation to describe both TrueType and CFF hinting, and introduced HintingMode.Standard (vertical-only) and HintingMode.Full (classic bi-level) with detailed explanations of their effects and tradeoffs. [1] [2] [3] [4]
  • Updated the documentation index and section headings to reflect the broader scope of "Font Hinting" beyond just TrueType.

Custom Rendering API and Example Updates:

  • Updated custom rendering documentation to use TextRenderer.RenderTo instead of RenderTextTo, added BeginGroup/EndGroup to the IGlyphRenderer example, and clarified that GlyphRendererParameters now includes HintingMode for cache key purposes. [1] [2] [3] [4]

Font Metrics Clarification:

  • Added documentation for FontMetrics.XHeight and FontMetrics.CapHeight to clarify how lowercase and capital letter heights are represented.

Updates documentation across Fonts and ImageSharp with major new guidance: generalized font hinting (including Standard/Full modes and CFF behavior), direct text shaping APIs, layout additions like visible bounds and font weight/style synthesis, and custom renderer parameter updates. Adds a new ANI format page and links ANI throughout image format docs and TOC. ImageSharp.Drawing docs now cover layer/backdrop effects, antialias and blending clarifications, and WebGPU alpha/pixel-format behavior (including associated-alpha readback mapping). External submodule references were also advanced.
@JimBobSquarePants
JimBobSquarePants merged commit 3e5f689 into main Aug 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant