• Robert Pluim's avatar
    Don't attempt to cache glyph metrics for FONT_INVALID_CODE · fe1a447d
    Robert Pluim authored
    This was causing massive slowdown in redisplay when eg #xfe0f
    (VARIATION SELECTOR-16) was present, as the cache ended up very large,
    unused, and being recreated on every call to font_fill_lglyph_metrics
    * src/composite.c (fill_gstring_body): Hoist FONT_OBJECT_P check out
    of loop.  Calculate glyph code and check for FONT_INVALID_CODE before
    calling font_fill_lglyph_metrics.  Pass glyph code to it.
    * src/font.c (font_fill_lglyph_metrics): Add code parameter, move
    glyph code calculation up the call stack into fill_gstring_body.
    * src/font.h: Adjust font_fill_lglyph_metrics prototype.
composite.c 62.1 KB