Add patch file to Cairo directory for bug 534260. (NPOTB)
authorJonathan Kew <jfkthame@gmail.com>
Thu, 24 Dec 2009 07:23:28 +0000
changeset 36648 36ea022cd2a228924571f02a1a7ddceed1a40d8b
parent 36647 1e37be566afa2f59aae7a09e8571f0350bc14542
child 36649 fa1e6f870ff1ab78f54c2e78d5aca999b98cf6e8
push idunknown
push userunknown
push dateunknown
bugs534260
milestone1.9.3a1pre
Add patch file to Cairo directory for bug 534260. (NPOTB)
gfx/cairo/README
gfx/cairo/quartz-glyph-extents.patch
--- a/gfx/cairo/README
+++ b/gfx/cairo/README
@@ -57,16 +57,18 @@ quartz-falback.patch: try to fix Quartz 
 quartz-repeating-radial-gradients.patch: use Quartz to render repeating radial gradients instead of falling back
 
 quartz-const-globals.patch: make some Quartz color function data const globals instead of local variables
 
 quartz-minimze-gradient-repeat.patch: reduce the number of gradient stop repetitions we use, to improve quality of Quartz's gradient rendering
 
 quartz-first-stop.patch: return the first stop for negative positions on the gradient line of a nonrepeating linear gradient
 
+quartz-glyph-extents.patch: bug 534260; work around incorrect glyph extents returned by quartz for anomalous empty glyphs
+
 ==== pixman patches ====
 
 pixman-neon.patch: add ARM NEON optimized compositing functions
 
 pixman-rename-and-endian.patch: include cairo-platform.h for renaming of external symbols and endian macros
 
 ==== disable printing patch ====
 
new file mode 100644
--- /dev/null
+++ b/gfx/cairo/quartz-glyph-extents.patch
@@ -0,0 +1,19 @@
+--- a/gfx/cairo/cairo/src/cairo-quartz-font.c	Wed Dec 23 14:17:44 2009 -0500
++++ b/gfx/cairo/cairo/src/cairo-quartz-font.c	Wed Dec 23 20:45:00 2009 +0000
+@@ -420,6 +420,16 @@ _cairo_quartz_init_glyph_metrics (cairo_
+ 	!CGFontGetGlyphBBoxesPtr (font_face->cgFont, &glyph, 1, &bbox))
+ 	goto FAIL;
+ 
++    /* broken fonts like Al Bayan return incorrect bounds for some null characters,
++       see https://bugzilla.mozilla.org/show_bug.cgi?id=534260 */
++    if (unlikely (bbox.origin.x == -32767 &&
++                  bbox.origin.y == -32767 &&
++                  bbox.size.width == 65534 &&
++                  bbox.size.height == 65534)) {
++        bbox.origin.x = bbox.origin.y = 0;
++        bbox.size.width = bbox.size.height = 0;
++    }
++
+     status = _cairo_matrix_compute_basis_scale_factors (&font->base.scale,
+ 						  &xscale, &yscale, 1);
+     if (status)