mooman219 / fontdue

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

rasterization appears slightly tessellated #109

Closed wtholliday closed 2 years ago

wtholliday commented 2 years ago

I noticed when scrutinizing glyphs rendered by fontdue that they seem a bit tessellated, as if the bezier curves aren't being evaluated at high enough resolution. For example, here's a glyph rendered by fontdue:

image

Notice the tessellation of the interior curves.

versus the same glyph rendered in Apple's Font Book:

image

I can provide more detailed information if necessary. The font is "Anodina Regular"

mooman219 commented 2 years ago

See: https://docs.rs/fontdue/latest/fontdue/struct.FontSettings.html scale

Fontdue performs curve linearization on initialization. The error threshold before a new subdivision is created is computed from the scale in the font settings.