mooman219 / fontdue

The fastest font renderer in the world, written in pure rust.
Apache License 2.0
1.44k stars 71 forks source link

Expose more metrics from ttf_parser #54

Closed simast closed 3 years ago

simast commented 3 years ago

Hey, thanks for this blazing fast rasterizer.

While implementing a text drawing backend I found out that I need some more metrics that are currently available in ttf_parser but not exposed in fontdue. Like for example underline/strikeout drawing hints from Face::underline_metrics() and Face::strikeout_metrics(). Current workaround is to reparse the same font twice just to get the metrics, which is a bit wasteful since this is done on fontdue already.

I can contribute PR, just wanted to run this by to make sure it's something you want to include in this lib?