diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index 82a4447f5..520ca1c44 100755 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -2231,6 +2231,11 @@ _cairo_scaled_font_single_glyph_device_extents (cairo_scaled_font_t *scaled_fon box.p2.y = v + scaled_glyph->bbox.p2.y; _cairo_box_round_to_rectangle (&box, extents); + + /* Modify the extents to account for the rounding */ + extents->y -= 1; + extents->width += 1; + extents->height += 1; } _cairo_scaled_font_thaw_cache (scaled_font); return status; @@ -2317,6 +2322,11 @@ _cairo_scaled_font_glyph_device_extents (cairo_scaled_font_t *scaled_font, if (box.p1.x < box.p2.x) { _cairo_box_round_to_rectangle (&box, extents); + + /* Modify the extents to account for the rounding */ + extents->y -= 1; + extents->width += 1; + extents->height += 1; } else { extents->x = extents->y = 0; extents->width = extents->height = 0;