Skip to content

Replace ttf_parser, rustybuzz with read-fonts, HarfRust - #151

Merged
dhardy merged 10 commits into
masterfrom
push-ktmyxrtnoyon
Aug 25, 2026
Merged

Replace ttf_parser, rustybuzz with read-fonts, HarfRust#151
dhardy merged 10 commits into
masterfrom
push-ktmyxrtnoyon

Conversation

@dhardy

@dhardy dhardy commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Closes #111: migrates away from ttf-parser (officially no longer maintained) and rustybuzz (unmaintained) to read-fonts and HarfRust.

This loses support for variations in some font metrics (though not in shaping). Likely this is rarely observable anyway. (It might be when using font variations without the shaping feature. Kerning will also be broken in that case. It still may be better for user experience to just let the library output badly spaced glyphs than error out so I won't add a lint.)

Note: read-fonts is clearly a much lower level and less opinionated library than ttf_parser, and is significantly harder to use as a result. It may be more efficient (e.g. this approach lets us read and store only the kerning sub-tables we will use), though I can't tell whether re-constructing tables on-demand is the intended way to use them vs storing the table with its redundant pointer vs extracting all desired data during the initial read (though fns like Hmtx::advance are clearly not designed for the latter).

@dhardy
dhardy force-pushed the push-ktmyxrtnoyon branch from 3c17707 to ddfc5ac Compare August 25, 2026 06:56
@dhardy
dhardy merged commit 1f8d9d1 into master Aug 25, 2026
6 checks passed
@dhardy
dhardy deleted the push-ktmyxrtnoyon branch August 25, 2026 08:00
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.

Migrate to read-fonts and HarfRust

1 participant