[ft] Apply slant in get_glyph_extents

This commit is contained in:
Behdad Esfahbod 2022-12-22 10:53:24 -07:00
parent 9a0ebd2b2a
commit d628aff9db
1 changed files with 4 additions and 0 deletions

View File

@ -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->width = (hb_position_t) (x_mult * ft_face->glyph->metrics.width);
extents->height = (hb_position_t) (y_mult * -ft_face->glyph->metrics.height); 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; return true;
} }