How TTF is rendered? #16969
-
From source code it's not clear for me how TTF is actually parsed and then rendered.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
We use https://github.com/pop-os/cosmic-text, which uses https://github.com/harfbuzz/ttf-parser.
Yes, glyphs are rasterized into an atlas. The resolution of the rasters is based on the If font smoothing is disabled, the glyph atlases will use nearest neighbor sampling. (This also applies a 50% opacity threshold to the glyphs). |
Beta Was this translation helpful? Give feedback.
We use https://github.com/pop-os/cosmic-text, which uses https://github.com/harfbuzz/ttf-parser.
Yes, glyphs are rasterized into an atlas. The resolution of the rasters is based on the
font_size
you specify. It's sort of up to you to use an appropriate value forfont_size
based on your projection / scale.If font smoothing is disabled, the glyph atlases will use nearest neighbor sampling. (This also applies a 50% opacity threshold to…