[paint] Don't use extents in hb-view

Let the clipbox do its magic. Currently works for ft backend only.
This commit is contained in:
Behdad Esfahbod 2022-12-23 16:44:06 -07:00
parent 79229cea17
commit 56a48f8b0a
2 changed files with 0 additions and 8 deletions

View File

@ -465,7 +465,6 @@ hb_ft_paint_glyph_colr (hb_font_t *font,
clip_box.top_right.y);
else
{
/* XXX Untested. */
auto *extents_funcs = hb_paint_extents_get_funcs ();
hb_paint_extents_context_t extents_data;
hb_ft_paint_context_t c (ft_font, font,

View File

@ -489,13 +489,6 @@ render_color_glyph (cairo_scaled_font_t *scaled_font,
hb_font_paint_glyph (font, glyph, get_cairo_paint_funcs (), cr, palette, color);
hb_glyph_extents_t hb_extents;
hb_font_get_glyph_extents (font, glyph, &hb_extents);
extents->x_bearing = (double) hb_extents.x_bearing / x_scale;
extents->y_bearing = (double)-hb_extents.y_bearing / y_scale;
extents->width = (double) hb_extents.width / x_scale;
extents->height = (double)-hb_extents.height / y_scale;
return CAIRO_STATUS_SUCCESS;
}