patch for check glyphs overlapping

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E0B4DDFB5@ex10mail>
It seems to me that checking overlapping in cairo-scaled-font.c is not correct.  Here is patch

Date:   Mon Mar 12 09:49:38 2012 -0700

    checkut overlap in cairo-scaled-font.c

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 062e895..e32e975 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -2102,10 +2102,16 @@ _range_contains_glyph (const cairo_box_t *extents,
                                      cairo_fixed_t right,
                                      cairo_fixed_t bottom)
{
-    return right > extents->p1.x &&
-                 left < extents->p2.x &&
-                 bottom > extents->p1.y &&
-                 top < extents->p2.y;
+    return right  < extents->p2.x &&
+                left   > extents->p1.x &&
+                top    > extents->p1.y &&
+                bottom < extents->p2.y;
}
 static cairo_status_t

--
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.