[ft] Fix scale when font-sizes are negative

This commit is contained in:
Behdad Esfahbod 2022-07-15 12:48:11 -06:00
parent d68507d062
commit 3ac110560d
1 changed files with 2 additions and 2 deletions

View File

@ -146,8 +146,8 @@ static void _hb_ft_hb_font_changed (hb_font_t *font, FT_Face ft_face)
#endif
if (font->x_scale < 0 || font->y_scale < 0)
{
FT_Matrix matrix = { font->x_scale < 0 ? -1 : +1, 0,
0, font->y_scale < 0 ? -1 : +1};
FT_Matrix matrix = { font->x_scale < 0 ? -(1<<16) : +(1<<16), 0,
0, font->y_scale < 0 ? -(1<<16) : +(1<<16)};
FT_Set_Transform (ft_face, &matrix, nullptr);
}