[subset] correct bug introduced to get_advance

This commit is contained in:
Rod Sheeter 2018-02-15 11:29:01 -08:00
parent 3fd11f4397
commit 0758cbc4c2
1 changed files with 6 additions and 2 deletions

View File

@ -257,8 +257,12 @@ struct hmtxvmtx
inline unsigned int get_advance (hb_codepoint_t glyph,
hb_font_t *font) const
{
return get_advance (glyph)
+ (font->num_coords ? var_table->get_advance_var (glyph, font->coords, font->num_coords) : 0); // TODO Optimize?!
unsigned int advance = get_advance (glyph);
if (likely(glyph < num_metrics))
{
advance += (font->num_coords ? var_table->get_advance_var (glyph, font->coords, font->num_coords) : 0); // TODO Optimize?!
}
return advance;
}
public: