Skip to content

[ir] Truncate upem * 1.2 in the typo line gap fallback - #2235

Merged
anthrotype merged 1 commit into
mainfrom
truncate-typo-line-gap
Oct 12, 2026
Merged

anthrotype merged 1 commit into
mainfrom
truncate-typo-line-gap

Conversation

@cmyr

@cmyr cmyr commented Oct 9, 2026

Copy link
Copy Markdown
Member

ufo2ft takes int(upem * 1.2) before subtracting the ascender and descender; we kept the fraction, so with e.g. upem 1024 our line gap, hhea ascent and win ascent came out one unit higher than fontmake's.

This bug is unlikely in real sources, which don't hit the fallback path; but it has occurred in some test sources and the fix is cheap. 🤷

ufo2ft takes int(upem * 1.2) before subtracting the ascender and
descender; we kept the fraction, so with e.g. upem 1024 our line gap,
hhea ascent and win ascent came out one unit higher than fontmake's.
@anthrotype
anthrotype added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit 6a3d513 Oct 12, 2026
29 of 30 checks passed
@anthrotype
anthrotype deleted the truncate-typo-line-gap branch October 12, 2026 10:14
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.

2 participants