Skip to content

Add -capnormalize#249

Open
dpwiz wants to merge 2 commits intoChlumsky:masterfrom
dpwiz:v1.13-capsheight
Open

Add -capnormalize#249
dpwiz wants to merge 2 commits intoChlumsky:masterfrom
dpwiz:v1.13-capsheight

Conversation

@dpwiz
Copy link
Copy Markdown

@dpwiz dpwiz commented Feb 12, 2026

Adds capHeight to metrics and sets getFontCoordinateScale to it when used with FONT_SCALING_CAP_NORMALIZED.

Implements #248

dpwiz and others added 2 commits February 7, 2026 19:28
Extract OS/2 sCapHeight from font via FreeType with fallback to
measuring the 'H' glyph bounding box for fonts without OS/2 v2+.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add cap-height normalization as a first-class FontCoordinateScaling option,
so that 1 unit = 1 capital letter height. Uses OS/2 sCapHeight with fallback
to measuring 'H' glyph, then EM normalization. Adds -capnormalize CLI flag.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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