From bb45ba2f9f4469b8bf326118ffe8003fb487f1f9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 24 Dec 2022 10:25:43 -0700 Subject: [PATCH] [ft] Fix negative y-scale --- src/hb-ft.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index 70cdcbe81..2142c3837 100644 --- a/src/hb-ft.cc +++ b/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