[font] Apply slant to glyph extents

Fixes https://github.com/harfbuzz/harfbuzz/issues/3952

hb-ft not fixed since doesn't use this code.
This commit is contained in:
Behdad Esfahbod 2022-12-22 07:31:16 -07:00
parent b0abbfd868
commit 9194e13e25
1 changed files with 4 additions and 0 deletions

View File

@ -185,6 +185,10 @@ struct hb_font_t
extents->y_bearing = em_scale_x (extents->y_bearing);
extents->width = em_scale_x (extents->width);
extents->height = em_scale_x (extents->height);
/* Apply slant. */
extents->x_bearing += roundf (extents->y_bearing * slant_xy);
extents->width += roundf (extents->height * slant_xy);
}