CelestiaProject / Celestia

Real-time 3D visualization of space.
https://celestiaproject.space
GNU General Public License v2.0
1.87k stars 310 forks source link

Use HarfBuzz for text shaping #2235

Open ajtribick opened 1 month ago

ajtribick commented 1 month ago

Currently we have a hand-written text shaping routine which assumes 1 codepoint -> 1 glyph. This may not always be the case. We should investigate using HarfBuzz to do text shaping instead. (This library is already used in GTK and Qt so should not bloat the dependencies too much)

Also worth investigating whether its worth caching the results of the text shaping to minimise the amount we need to do this per frame.