czbming/libRocket — pull request #1 by czbming (2014-01-13 05:06:08+00:00)
Title: Do not precalculate kerning for all characters

Precalculating kerning for all character pairs consumed a lot of RAM (N*N complexity). For CJK fonts that contain tens thousands of glyphs it was a highly unpractical approach resulting libRocket consuming >1.5GB of RAM. Instead, encapsulate FT_Get_Kerning call in FontFaceHandle::GetKerning and let FreeType handle the kerning on the fly. In my measurements, the performance difference is negligible, especially when compiled compiled geometry is utilized.