patch for checking overlapping of "space" glyphs

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E0B4DDFC2@ex10mail>
If a glyph is a space, box.p1.x and box.p2.x == 0 or box.p1.y and box.p2.y == 0

Date:   Mon Mar 12 13:28:32 2012 -0700

    check for space situation

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index e32e975..eda1da4 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -2215,8 +2215,9 @@ _cairo_scaled_font_glyph_device_extents (cairo_scaled_font_t          *scaled_font,
                   y = _cairo_fixed_from_double (glyphs[i].y);
               y1 = y + scaled_glyph->bbox.p1.y;
               y2 = y + scaled_glyph->bbox.p2.y;
+

-              if (overlap == FALSE)
+             if (overlap == FALSE && ((y1 != y2) || (x1 != x2)))
                   overlap = _range_contains_glyph (&box, x1, y1, x2, y2);
                if (x1 < box.p1.x) box.p1.x = x1;

--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.