[HarfBuzz] Caching of glyphmetrics and cmap data
devel at thanlwinsoft.org
Thu Sep 23 05:52:15 PDT 2010
I've been comparing the rendering times taken by Harfbuzz-NG with
different fonts and documents and as part of this experimented with
caching for the freetype face and font. A lot of the time seems to be
taken by calls to FreeType at the moment, specifically FT_Get_Char_Index
I found that by caching both glyphmetric lookups (in the font) and the
unicode to glyph mapping (in the face) I was able to improve the
rendering performance by between 8 and 50 times depending on the font in
large documents which don't require a lot of OT lookups.
I've attached the patch that I was using. Perhaps it might be worth
adding something like this as an option for clients for which memory is
not at a high premium. The patch will probably need extending to benefit
CJK and vertical metric fonts.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6772 bytes
Desc: not available
More information about the HarfBuzz