3 ms·
> some software have started implementing SDFs for font scaling My "wip/chergert/glyphy" branch of GTK 4 does rendering using https://github.com/behdad/glyphy
by audidude 5y ago
> some software have started implementing SDFs for font scaling
My "wip/chergert/glyphy" branch of GTK 4 does rendering using https://github.com/behdad/glyphy https://github.com/behdad/glyphy which uses fields to create encoded arc lists and are uploaded to the GPU in texture atlases. The shaders then use that data to render the glyph at any scale/offset.
Some work is still needed to land this in GTK 4, particularly around path simplification (mostly done) and slight hinting (probably will land in harfbuzz).
- nyanpasu64 5y agoRegarding slight hinting... currently GTK4 hints glyphs (distorting glyphs by quantizing vertical positioning) then renders them at fractional vertical positions (resulting in blurry horizontal lines). This is the worst of both worlds, achieving neither the scale-independent rendering of unhinted glyphs with fractional positioning, nor the sharpness of hinted glyphs with integer vertical positions. What is your plan for hinting and positioning?