lloydw/libRocket — pull request #112 by viciious (2013-11-29 19:08:04+00:00)
Title: Do not precalculate kerning

Precalculating kerning for all character pairs consumed a lot of RAM (O(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 kerning on the fly. In my measurements the performance difference is negligible, especially in conjunction with compiled geometry.