[cairo-commit] src/cairo-scaled-font.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Mar 13 11:58:58 PDT 2012


 src/cairo-scaled-font.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit efb2018309aa7ad81b6a71dfa322fb871d94c36d
Author: Henry (Yu) Song <hsong at sisa.samsung.com>
Date:   Tue Mar 13 16:35:21 2012 +0000

    scaled-font: Ignore empty glyphs when checking for potential overlap
    
    A zero-sized box contains no pixels and so cannot overlap, but it does
    still need to contribute to the extents.

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 062e895..b1c4b87 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -2102,6 +2102,9 @@ _range_contains_glyph (const cairo_box_t *extents,
 		       cairo_fixed_t right,
 		       cairo_fixed_t bottom)
 {
+    if (left == right || top == bottom)
+	return FALSE;
+
     return right > extents->p1.x &&
 	   left < extents->p2.x &&
 	   bottom > extents->p1.y &&


More information about the cairo-commit mailing list