4 ms·
Fonts begin as vector graphics, but every single character on your screen isn't rendered as a tiny, individual vector graphic. Text rendering libraries use a lo
by Aurornis 3y ago
Fonts begin as vector graphics, but every single character on your screen isn't rendered as a tiny, individual vector graphic. Text rendering libraries use a lot of optimizations to cache rasterized glyphs because they're reused all over your screen.
It also gets extraordinarily complex when you have to handle text layout, kerning, languages that read in different directions, styles, and all of the other complications that come with font rendering.
TrueType fonts even support a small virtual machine to process tiny code programs related to font rendering. It's an incredibly deep topic.
- Zamiel_Snawley 3y agoThank you for your insight!
- CryZe 3y ago> small virtual machine to process tiny code programs Or even WebAssembly (though more of an experiment than anything): https://github.com/harfbuzz/harfbuzz/blob/main/docs/wasm-shaper.md https://github.com/harfbuzz/harfbuzz/blob/main/docs/wasm-sha...
- a1o 3y agoThis, but see also Text Rendering Hates You https://faultlore.com/blah/text-hates-you/ https://faultlore.com/blah/text-hates-you/