[ft] Work around a freetype bug

This commit is contained in:
Behdad Esfahbod 2022-12-24 12:57:33 -07:00
parent a7a93b85e6
commit 79c5bb92ce
1 changed files with 3 additions and 0 deletions

View File

@ -462,6 +462,9 @@ hb_ft_get_glyph_h_advances (hb_font_t* font, void* font_data,
else
{
FT_Get_Advance (ft_face, glyph, load_flags, &v);
/* Work around bug that FreeType seems to return negative advance
* for variable-set fonts if x_scale is negative! */
v = abs (v);
ft_font->advance_cache.set (glyph, v);
}