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

Let the clipbox do its magic. Currently works for ft backend only.
pull/3938/head
Behdad Esfahbod 2 years ago
parent 79229cea17
commit 56a48f8b0a
  1. 1
      src/hb-ft-colr.hh
  2. 7
      util/helper-cairo-user.hh

@ -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,

@ -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;
}

Loading…
Cancel
Save