[cairo-commit] src/cairo-gstate.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Tue Dec 30 10:50:25 PST 2008
src/cairo-gstate.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 28a72648ba7abe02ebd4df7234424e333b85dc9c
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Tue Dec 30 13:48:47 2008 -0500
[gstate] Change the glyph dropping safety margin from 2em to 10em
The small margin caused bugs with math fonts. See:
https://bugzilla.mozilla.org/show_bug.cgi?id=460023
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index df7ec5c..c79e799 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -1804,7 +1804,6 @@ _cairo_gstate_transform_glyphs_to_backend (cairo_gstate_t *gstate,
if (num_transformed_glyphs != NULL) {
cairo_rectangle_int_t surface_extents;
- double scale = _cairo_scaled_font_get_max_scale (gstate->scaled_font);
drop = TRUE;
status = _cairo_gstate_int_clip_extents (gstate, &surface_extents);
@@ -1814,6 +1813,7 @@ _cairo_gstate_transform_glyphs_to_backend (cairo_gstate_t *gstate,
if (status == CAIRO_INT_STATUS_UNSUPPORTED) {
drop = FALSE; /* unbounded surface */
} else {
+ double scale10 = 10 * _cairo_scaled_font_get_max_scale (gstate->scaled_font);
if (surface_extents.width == 0 || surface_extents.height == 0) {
/* No visible area. Don't draw anything */
*num_transformed_glyphs = 0;
@@ -1827,10 +1827,10 @@ _cairo_gstate_transform_glyphs_to_backend (cairo_gstate_t *gstate,
* to device if it's going to be visible, but I'm not inclined to
* do that now.
*/
- x1 = surface_extents.x - 2*scale;
- y1 = surface_extents.y - 2*scale;
- x2 = surface_extents.x + (int) surface_extents.width + scale;
- y2 = surface_extents.y + (int) surface_extents.height + scale;
+ x1 = surface_extents.x - scale10;
+ y1 = surface_extents.y - scale10;
+ x2 = surface_extents.x + (int) surface_extents.width + scale10;
+ y2 = surface_extents.y + (int) surface_extents.height + scale10;
}
if (!drop)
More information about the cairo-commit
mailing list