alexheretic / ab-glyph

Rust API for loading, scaling, positioning and rasterizing OpenType font glyphs
Apache License 2.0
372 stars 24 forks source link

Avoid parsing the font twice if I’m using ttf_parser directly #102

Closed asibahi closed 7 months ago

asibahi commented 7 months ago

Hello

I cannot actually tell if this is already possible or not. If I have another dependency on ttf_parser (say for/through rustybuzz which reexports it), is it possible to avoid parsing the font twice (once through rustybuzz and once through ab_glyph)?

alexheretic commented 7 months ago

I don't think this is possible at the same time as avoiding breaking semver for each ttf-parser break. I believe ttf-parser font parsing is also fairly cheap.