[ft] Fix negative y-scale

pull/3975/head
Behdad Esfahbod 2 years ago
parent aba2063c22
commit bb45ba2f9f
  1. 1
      src/hb-ft.cc

@ -706,6 +706,7 @@ hb_ft_get_font_h_extents (hb_font_t *font HB_UNUSED,
FT_Matrix matrix;
FT_Get_Transform (ft_face, &matrix, nullptr);
y_mult = sqrtf ((float)matrix.yx * matrix.yx + (float)matrix.yy * matrix.yy) / 65536.f;
y_mult *= font->y_scale < 0 ? -1 : +1;
}
else
#endif

Loading…
Cancel
Save