From d628aff9db826671b1612ed1865f5cdbd763c9f8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 22 Dec 2022 10:53:24 -0700 Subject: [PATCH] [ft] Apply slant in get_glyph_extents --- src/hb-ft.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index 3892dedc1..097c52f7f 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -601,6 +601,10 @@ hb_ft_get_glyph_extents (hb_font_t *font, extents->width = (hb_position_t) (x_mult * ft_face->glyph->metrics.width); extents->height = (hb_position_t) (y_mult * -ft_face->glyph->metrics.height); + /* Apply slant. */ + extents->x_bearing += roundf (extents->y_bearing * font->slant_xy); + extents->width += roundf (extents->height * font->slant_xy); + return true; }