You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two approaches to SDF glyph generation in wide use today.
Rasterize the glyphs directly (ex: using FreeType to get an alpha map) and compute the SDF from the bitmap. This is the approach taken by TinySDF: https://github.com/mapbox/tiny-sdf.
We currently use the first method as it is fast and easy to implement. However, there is a solid case for supporting the second method, as this would improve the rendering quality of Indic, Khmer, Burmese, etc.
The text was updated successfully, but these errors were encountered:
I took a deeper look into what it would take to accomplish this today. It's not going to be a trivial implementation, as the Mapbox implementation makes use of FT_Outline_Decompose.
The docs take a minute to grok, but basically it's walking over the outline struct with a bunch of function pointers and an inout that acts as global state. So it should now be obvious why freetype-rs doesn't have a wrapper for this 😂
This actually doesn't look too absurd to implement ourselves after reading over the FT_Outline docs, but it's going to take a fair bit of work. Not exactly something I could knock out in an evening reliably, but probably wouldn't take an entire week either.
It's still not a super high priority for me at the moment, but I'd welcome contributions to this effort by anyone interested.
Background:
There are two approaches to SDF glyph generation in wide use today.
We currently use the first method as it is fast and easy to implement. However, there is a solid case for supporting the second method, as this would improve the rendering quality of Indic, Khmer, Burmese, etc.
The text was updated successfully, but these errors were encountered: