[cairo-commit] 38 commits - cairo-version.h KNOWN_ISSUES Makefile.am NEWS src/cairo-pdf-surface.c src/Makefile.sources test/get-path-extents.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Jan 23 08:53:08 PST 2011


 KNOWN_ISSUES            |   10 ++++
 Makefile.am             |    1 
 NEWS                    |  107 ++++++++++++++++++++++++++++++++++++++++++++++++
 cairo-version.h         |    2 
 src/Makefile.sources    |    1 
 src/cairo-pdf-surface.c |   12 +++++
 test/get-path-extents.c |    3 -
 7 files changed, 134 insertions(+), 2 deletions(-)

New commits:
commit 5809c6ff32b10c7c07ae96e5b0f7b98de66ecea5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Jan 23 16:52:50 2011 +0000

    version: Post-snapshot bump

diff --git a/cairo-version.h b/cairo-version.h
index dee4622..da6a305 100644
--- a/cairo-version.h
+++ b/cairo-version.h
@@ -3,6 +3,6 @@
 
 #define CAIRO_VERSION_MAJOR 1
 #define CAIRO_VERSION_MINOR 11
-#define CAIRO_VERSION_MICRO 2
+#define CAIRO_VERSION_MICRO 3
 
 #endif
commit ac9ee388faf3c8c5df502f6cc7b039f043154954
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Jan 23 16:32:13 2011 +0000

    version: Bump for 1.11.2 snapshot

diff --git a/cairo-version.h b/cairo-version.h
index 53f2c2c..dee4622 100644
--- a/cairo-version.h
+++ b/cairo-version.h
@@ -3,6 +3,6 @@
 
 #define CAIRO_VERSION_MAJOR 1
 #define CAIRO_VERSION_MINOR 11
-#define CAIRO_VERSION_MICRO 1
+#define CAIRO_VERSION_MICRO 2
 
 #endif
commit 7e75e2d14afe295bb100849b081e9c568f3f1260
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Jan 23 16:31:40 2011 +0000

    NEWS: 1.11.2 snapshot

diff --git a/NEWS b/NEWS
index 73d9197..8ec1577 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,51 @@
+Snapshot 1.11.2 (2011-01-23)
+===========================
+
+In this first snapshot along the way to cairo-1.12.0, we are very excited
+to announce the introduction of Bezier surface gradients, known as type
+6/7 gradients in PS/PDF parlance. This is the culmination of much work by
+the dynamic duo: Adrian Johnson and Andrea Canciani. Thanks guys!
+
+Also, I want to warmly welcome Uli Schlachter who recently joined the
+Cairo community on a mission. That mission is to make cairo-xcb a
+supported backend for 1.12. And for this snapshot he has made great
+strides in fixing all the bugs I had left behind. Thanks Uli!
+
+And we have also seen a new contributor, Alexandros Frantzis, who has
+begun bringing up cairo-gl for GLESv2 devices. Thanks Alex!
+
+And lastly, I must also thank Adrian and Andrea for the vast numbers of
+bugs that they have tackled between them, fixing all those little corner
+cases that lie hidden until too late.
+
+API additions:
+
+The ability to construct piece-wise Bezier surface gradients:
+
+	cairo_pattern_create_mesh
+
+	constructs a pattern of type CAIRO_PATTERN_TYPE_MESH using
+
+	cairo_pattern_mesh_begin_patch
+	cairo_pattern_mesh_end_patch
+	cairo_pattern_mesh_curve_to
+	cairo_pattern_mesh_line_to
+	cairo_pattern_mesh_move_to
+	cairo_pattern_mesh_set_control_point
+	cairo_pattern_mesh_set_corner_color_rgb
+	cairo_pattern_mesh_set_corner_color_rgba
+	cairo_pattern_mesh_get_patch_count
+	cairo_pattern_mesh_get_path
+	cairo_pattern_mesh_get_corner_color_rgba
+	cairo_pattern_mesh_get_control_point
+
+The introduction of a unique ID accessible via the mime data type:
+	CAIRO_MIME_TYPE_UNIQUE_ID
+
+
+
+
+
 Release 1.10.2 (2010-12-25 Chris Wilson <chris at chris-wilson.co.uk>)
 ===================================================================
 The cairo community is pleased to announce the 1.10.2 release of the
commit d6dc6e8e396506d5160266dda6575ddfce671c2d
Merge: 6c65168... c84730d...
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Jan 23 16:05:01 2011 +0000

    Merge branch '1.10' into tmp
    
    Synchronize stable bug-fixes with development snapshot
    
    Conflicts:
    	cairo-version.h
    	src/cairo-path-bounds.c
    	src/cairo-pdf-surface.c
    	test/get-path-extents.c

commit 6c65168dcfd969bd1d6aade3cd33f679e2314dea
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Jan 23 15:46:32 2011 +0000

    Makefile: add missing cairo-box-private.h

diff --git a/src/Makefile.sources b/src/Makefile.sources
index 438d0c4..c4ca001 100644
--- a/src/Makefile.sources
+++ b/src/Makefile.sources
@@ -55,6 +55,7 @@ cairo_private = \
 	cairo-analysis-surface-private.h \
 	cairo-arc-private.h \
 	cairo-atomic-private.h \
+	cairo-box-private.h \
 	cairo-boxes-private.h \
 	cairo-cache-private.h \
 	cairo-clip-private.h \
commit c84730d88983623dddd6b9980d82648b7297444d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Dec 25 23:04:47 2010 +0000

    version: Post release version bump

diff --git a/cairo-version.h b/cairo-version.h
index ebbd622..a28992a 100644
--- a/cairo-version.h
+++ b/cairo-version.h
@@ -3,6 +3,6 @@
 
 #define CAIRO_VERSION_MAJOR 1
 #define CAIRO_VERSION_MINOR 10
-#define CAIRO_VERSION_MICRO 2
+#define CAIRO_VERSION_MICRO 3
 
 #endif
commit 4938e11ffe11781e4e294092807ebc67f362eac6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Dec 25 13:25:14 2010 +0000

    version: Bump for 1.10.2 release

diff --git a/cairo-version.h b/cairo-version.h
index f22b574..ebbd622 100644
--- a/cairo-version.h
+++ b/cairo-version.h
@@ -3,6 +3,6 @@
 
 #define CAIRO_VERSION_MAJOR 1
 #define CAIRO_VERSION_MINOR 10
-#define CAIRO_VERSION_MICRO 1
+#define CAIRO_VERSION_MICRO 2
 
 #endif
commit de464ea7781707984a1e1d5f98a8ff23c5ee18ed
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Dec 25 13:24:37 2010 +0000

    NEWS: Add entry for 1.10.2

diff --git a/NEWS b/NEWS
index cc827c2..73d9197 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,62 @@
+Release 1.10.2 (2010-12-25 Chris Wilson <chris at chris-wilson.co.uk>)
+===================================================================
+The cairo community is pleased to announce the 1.10.2 release of the
+cairo graphics library. This is the first update to cairo's stable 1.10
+series and contains a large number of bug fixes.
+
+While many people have contributed and have help to test the release,
+2 people deserve special recognition for their efforts in tracking down
+and fixing bugs, Andrea Canciani and Adrian Johnson. Thanks to their
+tremendous efforts, and of all cairo contributors, it is much
+appreciated.
+
+We recommend everyone upgrade to cairo 1.10.2 and hope that everyone
+will continue to have lots of fun with cairo!
+
+-Chris
+
+Bug fixes
+---------
+
+  Fix embedding of grayscale jpegs in PS.
+  https://bugs.freedesktop.org/show_bug.cgi?id=31632
+
+  Fix the reported path of extents containing a curve.
+
+  Fix the compositing of unaligned boxes.
+
+  Reset the clipper in PDF upon finish.
+
+  Fix degenerates arcs to become a degenerate line.
+
+  Build support for autoconf 2.67
+
+  Fix painting of transformed patterns in PS
+
+  Fix the EPS bounding box for PS
+  https://bugs.freedesktop.org/show_bug.cgi?id=24688
+
+  Fix the missing content for EPS
+  https://bugs.freedesktop.org/show_bug.cgi?id=24688
+
+  Fix regression upon changing page size in PS/PDF
+  https://bugs.freedesktop.org/show_bug.cgi?id=24691
+
+  Only use ActualText with PDF-1.5 documents
+
+  Fix the bbox for type1 fallbacks.
+
+  Reset the color after ending the context in PDF
+  https://bugs.freedesktop.org/show_bug.cgi?id=31140
+
+  Fix the advance of subsetted type1 fonts
+  https://bugs.freedesktop.org/show_bug.cgi?id=31062
+
+  Fix handling of EXTEND_NONE gradients for PDF
+
+  Restrict in-place optimisation for a8 image masks with SOURCE
+
+
 Release 1.10.0 (2010-09-06 Chris Wilson <chris at chris-wilson.co.uk>)
 ===================================================================
 The cairo community is astounded (and flabbergast) to finally announce
commit 888eeb187f542b96e722725f616720038e700b84
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Dec 25 10:19:38 2010 +0000

    Add a KNOWN_ISSUES file to track WONTFIX(?) bugs

diff --git a/KNOWN_ISSUES b/KNOWN_ISSUES
new file mode 100644
index 0000000..5fda683
--- /dev/null
+++ b/KNOWN_ISSUES
@@ -0,0 +1,10 @@
+There are a few known bugs in 1.10 that have been fixed in master, but
+appear to be non-trivial to backport without fear of causing other
+regressions. The impact of these bugs is considered to be less than of a
+risk than rewriting the code.
+
+Zero Path Extents
+-----------------
+A closed degenerate path is reported as having extents (0, 0) x (0, 0),
+whereas the expected value is (x, y) x (0, 0). This regression has existed
+since at least 1.2.
diff --git a/Makefile.am b/Makefile.am
index aa78455..7c03294 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,7 @@
 include $(top_srcdir)/build/Makefile.am.common
 
 EXTRA_DIST += \
+	KNOWN_ISSUES \
 	README.win32 \
 	Makefile.win32 \
 	build/Makefile.win32.common \
commit a27e3bc6d08feeac8e4ee5315a0ad974efee0ee9
Author: Koji Otani <sho at bbr.jp>
Date:   Wed Nov 17 00:07:03 2010 +1030

    PS: fix embedding of grayscale jpegs
    
    https://bugs.freedesktop.org/show_bug.cgi?id=31632
    (cherry picked from commit 653ceb517fe756b042a3cf8322a36cbfe71ddbd8)

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 6c7ad62..4ae1aee 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -2376,11 +2376,12 @@ _cairo_ps_surface_emit_jpeg_image (cairo_ps_surface_t    *surface,
 				 "  /Width %d def\n"
 				 "  /Height %d def\n"
 				 "  /BitsPerComponent %d def\n"
-				 "  /Decode [ 0 1 0 1 0 1 ] def\n",
+				 "  /Decode [ %s ] def\n",
 				 info.num_components == 1 ? "DeviceGray" : "DeviceRGB",
 				 info.width,
 				 info.height,
-				 info.bits_per_component);
+				 info.bits_per_component,
+                                 info.num_components == 1 ? "0 1" : "0 1 0 1 0 1");
 
     if (surface->use_string_datasource) {
 	_cairo_output_stream_printf (surface->stream,
commit 4aabff8f6740e2027febd97c1863f7ba5a46cb92
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Tue Dec 14 17:56:00 2010 +0100

    path-bounder: Update current point after curve_to op
    
    Even if the curve_to is completely within the current extents box, the
    current point needs to be updated because the shape of following ops
    depends on the position of the current point.
    
    Fixes bug-extents.

diff --git a/src/cairo-path-bounds.c b/src/cairo-path-bounds.c
index 75308c6..2e7b6bd 100644
--- a/src/cairo-path-bounds.c
+++ b/src/cairo-path-bounds.c
@@ -131,6 +131,8 @@ _cairo_path_bounder_curve_to (void *closure,
     else
     {
 	/* All control points are within the current extents. */
+	bounder->current_point = *d;
+
 	return CAIRO_STATUS_SUCCESS;
     }
 }
commit 5996652364efa4fb4ae6c984ddf6ddad8868782b
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Tue Dec 14 20:15:28 2010 +0100

    test: Add bug-extents
    
    Add a test for the computation of approximate extents used by most
    backends to esimate the region affected by drawing operations.
    
    Based on:
    http://lists.cairographics.org/archives/cairo/2010-December/021331.html

diff --git a/test/Makefile.am b/test/Makefile.am
index ad2b959..9b673d2 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -162,6 +162,11 @@ REFERENCE_IMAGES = \
 	bug-bo-rectangular.ref.png \
 	bug-bo-rectangular.image16.ref.png \
 	bug-bo-rectangular.ps.xfail.png \
+	bug-extents.image16.ref.png \
+	bug-extents.quartz.ref.png \
+	bug-extents.ps.ref.png \
+	bug-extents.ref.png \
+	bug-extents.xlib.ref.png \
 	bug-seams.ref.png \
 	bug-seams.xlib.ref.png \
 	bug-seams.xlib-fallback.ref.png \
diff --git a/test/Makefile.sources b/test/Makefile.sources
index b6431d1..487fedd 100644
--- a/test/Makefile.sources
+++ b/test/Makefile.sources
@@ -14,6 +14,7 @@ test_sources = \
 	big-trap.c					\
 	bilevel-image.c					\
 	bug-bo-rectangular.c				\
+	bug-extents.c					\
 	bug-seams.c					\
 	caps.c						\
 	caps-joins.c					\
diff --git a/test/bug-extents.c b/test/bug-extents.c
new file mode 100644
index 0000000..4edb4a5
--- /dev/null
+++ b/test/bug-extents.c
@@ -0,0 +1,59 @@
+/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
+/*
+ * Copyright 2010 Andrea Canciani
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author: Andrea Canciani <ranma42 at gmail.com>
+ */
+
+#include "cairo-test.h"
+
+static cairo_test_status_t
+draw (cairo_t *cr, int width, int height)
+{
+    cairo_set_source_rgb (cr, 1, 1, 1);
+    cairo_paint (cr);
+
+    cairo_translate (cr, 0, -25);
+
+    cairo_move_to  (cr,   50, 200);
+    cairo_curve_to (cr,   50, 150, 100,  50, 150,  50);
+    cairo_curve_to (cr,  200,  50, 250, 250, 200, 250);
+    cairo_curve_to (cr,  150, 250, 200,  50,  50, 100);
+    cairo_curve_to (cr, -100, 150, 200, 150, 200, 200);
+    cairo_curve_to (cr,  200, 250,  50, 250,  50, 200);
+
+    cairo_set_source_rgb (cr, 0, 0, 0);
+    cairo_fill_preserve (cr);
+
+    cairo_set_source_rgb (cr, 1, 0, 0);
+    cairo_stroke (cr);
+
+    return CAIRO_TEST_SUCCESS;
+}
+
+CAIRO_TEST (bug_extents,
+	    "Tests a bug in the computation of approximate extents",
+	    "extents", /* keywords */
+	    NULL, /* requirements */
+	    250, 250,
+	    NULL, draw)
diff --git a/test/bug-extents.image16.ref.png b/test/bug-extents.image16.ref.png
new file mode 100644
index 0000000..8eb3d4b
Binary files /dev/null and b/test/bug-extents.image16.ref.png differ
diff --git a/test/bug-extents.ps.ref.png b/test/bug-extents.ps.ref.png
new file mode 100644
index 0000000..2d55405
Binary files /dev/null and b/test/bug-extents.ps.ref.png differ
diff --git a/test/bug-extents.quartz.ref.png b/test/bug-extents.quartz.ref.png
new file mode 100644
index 0000000..2973448
Binary files /dev/null and b/test/bug-extents.quartz.ref.png differ
diff --git a/test/bug-extents.ref.png b/test/bug-extents.ref.png
new file mode 100644
index 0000000..c388bad
Binary files /dev/null and b/test/bug-extents.ref.png differ
diff --git a/test/bug-extents.xlib.ref.png b/test/bug-extents.xlib.ref.png
new file mode 100644
index 0000000..c2db4f0
Binary files /dev/null and b/test/bug-extents.xlib.ref.png differ
commit f832ff7f22499bfa8e907f9fb059d56857d11e68
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sun Nov 28 16:58:20 2010 +0100

    test: Fix ref images
    
    The corners of the boxes in these ref images were not correct.

diff --git a/test/clip-stroke.image16.ref.png b/test/clip-stroke.image16.ref.png
index d0019b8..ad62af4 100644
Binary files a/test/clip-stroke.image16.ref.png and b/test/clip-stroke.image16.ref.png differ
diff --git a/test/clip-stroke.ref.png b/test/clip-stroke.ref.png
index dd5ae9a..e66cc43 100644
Binary files a/test/clip-stroke.ref.png and b/test/clip-stroke.ref.png differ
diff --git a/test/clipped-group.image16.ref.png b/test/clipped-group.image16.ref.png
index 85819fe..bf419f6 100644
Binary files a/test/clipped-group.image16.ref.png and b/test/clipped-group.image16.ref.png differ
diff --git a/test/clipped-group.ref.png b/test/clipped-group.ref.png
index c3fcbf8..fe9b8dc 100644
Binary files a/test/clipped-group.ref.png and b/test/clipped-group.ref.png differ
commit ff35af3fd73e59ea29b1a322c833f7dd24b0b8bc
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sun Nov 28 14:32:51 2010 +0100

    image: Fix compositing of unaligned boxes
    
    The input of _fill_unaligned_boxes is (supposed to be) composed only
    of disjoint rectangles, that can safely be passed to the rectilinear
    span converter, but this function artificially introduces intersecting
    rectangles when drawing non-aligned boxes.
    
    Using non-intersecting rectangles is easy and makes the code correct.
    
    Fixes rectilinear-grid.
    
    Reviewed-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index d28267a..fcc832e 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -2692,7 +2692,13 @@ _fill_unaligned_boxes (cairo_image_surface_t *dst,
 			     x1, y1, x2 - x1, y2 - y1,
 			     pixel);
 
-		/* top */
+		/*
+		 * Corners have to be included only once if the rects
+		 * are passed to the rectangular scan converter
+		 * because it can only handle disjoint rectangles.
+		*/
+
+		/* top (including top-left and top-right corners) */
 		if (! _cairo_fixed_is_integer (box[i].p1.y)) {
 		    b.p1.x = box[i].p1.x;
 		    b.p1.y = box[i].p1.y;
@@ -2704,31 +2710,31 @@ _fill_unaligned_boxes (cairo_image_surface_t *dst,
 			goto CLEANUP_CONVERTER;
 		}
 
-		/* left */
+		/* left (no corners) */
 		if (! _cairo_fixed_is_integer (box[i].p1.x)) {
 		    b.p1.x = box[i].p1.x;
-		    b.p1.y = box[i].p1.y;
+		    b.p1.y = _cairo_fixed_from_int (y1);
 		    b.p2.x = _cairo_fixed_from_int (x1);
-		    b.p2.y = box[i].p2.y;
+		    b.p2.y = _cairo_fixed_from_int (y2);
 
 		    status = _cairo_rectangular_scan_converter_add_box (&converter, &b, 1);
 		    if (unlikely (status))
 			goto CLEANUP_CONVERTER;
 		}
 
-		/* right */
+		/* right (no corners) */
 		if (! _cairo_fixed_is_integer (box[i].p2.x)) {
 		    b.p1.x = _cairo_fixed_from_int (x2);
-		    b.p1.y = box[i].p1.y;
+		    b.p1.y = _cairo_fixed_from_int (y1);
 		    b.p2.x = box[i].p2.x;
-		    b.p2.y = box[i].p2.y;
+		    b.p2.y = _cairo_fixed_from_int (y2);
 
 		    status = _cairo_rectangular_scan_converter_add_box (&converter, &b, 1);
 		    if (unlikely (status))
 			goto CLEANUP_CONVERTER;
 		}
 
-		/* bottom */
+		/* bottom (including bottom-left and bottom-right corners) */
 		if (! _cairo_fixed_is_integer (box[i].p2.y)) {
 		    b.p1.x = box[i].p1.x;
 		    b.p1.y = _cairo_fixed_from_int (y2);
commit 7b29f1d5d85ebb7e92e9759692233c80a4687a07
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Fri Nov 26 17:55:35 2010 +0100

    test: Add rectilinear-grid
    
    The rectilinear scan converter assumes disjoint rects as input, but
    cairo-image passes intersecting rectangles to it.
    
    This test shows that image and any backends passing through it for the
    rasterization (fallbacks, vector backends whose renderer is
    cairo-based) fail in compute the corners of intersecting rectangles
    correctly.

diff --git a/test/Makefile.am b/test/Makefile.am
index a3c1f7a..ad2b959 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1066,6 +1066,8 @@ REFERENCE_IMAGES = \
 	rectilinear-dash.quartz.xfail.png \
 	rectilinear-dash.ref.png \
 	rectilinear-fill.ref.png \
+	rectilinear-grid.image16.ref.png \
+	rectilinear-grid.ref.png \
 	rectilinear-miter-limit.ps2.ref.png \
 	rectilinear-miter-limit.ps3.ref.png \
 	rectilinear-miter-limit.ref.png \
diff --git a/test/Makefile.sources b/test/Makefile.sources
index a13aea8..b6431d1 100644
--- a/test/Makefile.sources
+++ b/test/Makefile.sources
@@ -207,6 +207,7 @@ test_sources = \
 	random-intersections-curves-nz.c		\
 	rectangle-rounding-error.c			\
 	rectilinear-fill.c				\
+	rectilinear-grid.c				\
 	rectilinear-miter-limit.c			\
 	rectilinear-dash.c				\
 	rectilinear-stroke.c				\
diff --git a/test/rectilinear-grid.c b/test/rectilinear-grid.c
new file mode 100644
index 0000000..1baadf7
--- /dev/null
+++ b/test/rectilinear-grid.c
@@ -0,0 +1,78 @@
+/* -*- Mode: c; c-basic-offset: 4; indent-tabs-mode: t; tab-width: 8; -*- */
+/*
+ * Copyright 2010 Andrea Canciani
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Author: Andrea Canciani <ranma42 at gmail.com>
+ */
+
+#include "cairo-test.h"
+
+#define SIZE 52
+#define OFFSET 5
+#define DISTANCE 10.25
+
+/*
+  This test checks that boxes not aligned to pixels are drawn
+  correctly.
+
+  In particular the corners of the boxes are drawn incorrectly by
+  cairo-image in cairo 1.10.0, because overlapping boxes are passed to
+  a span converter which assumes disjoint boxes as input.
+
+  This results in corners to be drawn with the wrong shade.
+*/
+
+static cairo_test_status_t
+draw (cairo_t *cr, int width, int height)
+{
+    int i;
+
+    cairo_set_source_rgb (cr, 1, 1, 1);
+    cairo_paint (cr);
+
+    cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+    cairo_set_source_rgb (cr, 0, 0, 0);
+    cairo_set_line_width (cr, 4);
+    cairo_translate (cr, 2*OFFSET, 2*OFFSET);
+
+    for (i = 0; i < 4; i++) {
+	double x = i * DISTANCE;
+
+	cairo_move_to (cr, x, -OFFSET-0.75);
+	cairo_line_to (cr, x, SIZE-3*OFFSET-0.25);
+
+	cairo_move_to (cr, -OFFSET-0.75, x);
+	cairo_line_to (cr, SIZE-3*OFFSET-0.25, x);
+    }
+
+    cairo_stroke (cr);
+
+    return CAIRO_TEST_SUCCESS;
+}
+
+CAIRO_TEST (rectilinear_grid,
+	    "Test rectilinear rasterizer (covering partial pixels)",
+	    "rectilinear", /* keywords */
+	    NULL, /* requirements */
+	    SIZE, SIZE,
+	    NULL, draw)
diff --git a/test/rectilinear-grid.image16.ref.png b/test/rectilinear-grid.image16.ref.png
new file mode 100644
index 0000000..4d4c4da
Binary files /dev/null and b/test/rectilinear-grid.image16.ref.png differ
diff --git a/test/rectilinear-grid.ref.png b/test/rectilinear-grid.ref.png
new file mode 100644
index 0000000..8d47ef5
Binary files /dev/null and b/test/rectilinear-grid.ref.png differ
commit 9ec51baa779a30041ea944643d4d0b8333bb759b
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Fri Nov 26 21:41:17 2010 +1030

    PDF: Add missing clipper_reset
    (cherry picked from commit 2ae2be36d4551906fd4edbc8bf07aaa7fe0c93cf)

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 0f41713..49e5e84 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -1726,6 +1726,8 @@ _cairo_pdf_surface_finish (void *abstract_surface)
 	surface->font_subsets = NULL;
     }
 
+    _cairo_surface_clipper_reset (&surface->clipper);
+
     return status;
 }
 
commit 841a2df7359e2b491aed7ed8c043cce669357ae3
Author: Markus Stange <mstange at themasta.com>
Date:   Fri Nov 5 09:23:44 2010 +0100

    Fix type of _cairo_memory_stream_destroy parameter
    
    In 9b9952ab4f64a476bbadfd3e6cf1e66c1137ccd7
    _cairo_memory_stream_destroy was changed to take an unsigned long
    instead of unsigned int, and the two callsites in cairo-gl-shaders.c
    weren't updated.

diff --git a/src/cairo-gl-shaders.c b/src/cairo-gl-shaders.c
index d7773f5..ea329dd 100644
--- a/src/cairo-gl-shaders.c
+++ b/src/cairo-gl-shaders.c
@@ -632,7 +632,7 @@ cairo_gl_shader_get_vertex_source (cairo_gl_var_type_t src,
 {
     cairo_output_stream_t *stream = _cairo_memory_stream_create ();
     unsigned char *source;
-    unsigned int length;
+    unsigned long length;
     cairo_status_t status;
 
     cairo_gl_shader_emit_variable (stream, src, CAIRO_GL_TEX_SOURCE);
@@ -768,7 +768,7 @@ cairo_gl_shader_get_fragment_source (GLuint tex_target,
 {
     cairo_output_stream_t *stream = _cairo_memory_stream_create ();
     unsigned char *source;
-    unsigned int length;
+    unsigned long length;
     cairo_status_t status;
 
     cairo_gl_shader_emit_color (stream, tex_target, src, CAIRO_GL_TEX_SOURCE);
commit b6a97499c71af60a3f15d131d51eb53fb21b48ff
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Tue Oct 5 10:36:38 2010 +0200

    xcb: Do not return value in void function
    
    Sun Studio Compiler complains:
    "cairo-xcb-surface.c", line 585: void function cannot return value
    even if the returned value is void.
    Some minor code restructuring removes the issue.

diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 9c2d3a7..d852f50 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -580,12 +580,10 @@ _cairo_xcb_surface_release_source_image (void *abstract_surface,
 {
     cairo_xcb_surface_t *surface = abstract_surface;
 
-    if (surface->drm != NULL && ! surface->marked_dirty) {
-	return _cairo_surface_release_source_image (surface->drm,
-						    image, image_extra);
-    }
-
-    cairo_surface_destroy (&image->base);
+    if (surface->drm != NULL && !surface->marked_dirty)
+	_cairo_surface_release_source_image (surface->drm, image, image_extra);
+    else
+	cairo_surface_destroy (&image->base);
 }
 
 static cairo_bool_t
commit e71588c80d5c6112fa9f7c6ea369d90f9284199f
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sun Oct 24 16:40:53 2010 +0200

    test: Add romedalen images copyright information
    
    romedalen.png and romedalen.jpg have been bundled into the test
    suite without an explicit copyright notice.

diff --git a/test/COPYING b/test/COPYING
index dd528d1..3db71fb 100644
--- a/test/COPYING
+++ b/test/COPYING
@@ -11,3 +11,16 @@ are as follows:
 	Font		License		Distinguishing feature
 	--------	-------------	----------------------
 	6x13.pcf	Public Domain	Bitmap font
+
+
+The test suite also bundles some images for use by the test suite. The
+images included, their licenses, and why we use them in the test suite
+are as follows:
+
+	Image		License		Distinguishing feature
+	-------------	-------------	-------------------------
+	romedalen.jpg	Public Domain	Bitmap image (image/jpeg)
+	romedalen.png	Public Domain	Bitmap image (image/png)
+
+The kind contributors of the bundled files are (in alphabetical order):
+Øyvind Kolås <pippin at freedesktop.org> Author of the original romedalen shot.
commit 2b3d8de11a536d668084ea6d2bf295da1d1cdc11
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sat Oct 16 22:51:28 2010 +0200

    Fix degenerate arcs
    
    Make sure that degenerate arcs become a move_to-line_to sequence
    instead of just a move_to.
    
    Fixes get-path-extents.

diff --git a/src/cairo-arc.c b/src/cairo-arc.c
index 56d42f1..1b2713f 100644
--- a/src/cairo-arc.c
+++ b/src/cairo-arc.c
@@ -231,6 +231,10 @@ _cairo_arc_in_direction (cairo_t	  *cr,
 				angle,
 				angle + angle_step);
 	}
+    } else {
+	cairo_line_to (cr,
+		       xc + radius * cos (angle_min),
+		       yc + radius * sin (angle_min));
     }
 }
 
diff --git a/src/cairo.c b/src/cairo.c
index 157f898..5117f8a 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -1852,6 +1852,7 @@ cairo_arc (cairo_t *cr,
 
     /* Do nothing, successfully, if radius is <= 0 */
     if (radius <= 0.0) {
+	cairo_line_to (cr, xc, yc); /* might become a move_to */
 	cairo_line_to (cr, xc, yc);
 	return;
     }
commit fafca7ace250e3f4f9c60584f0ddff187c690068
Author: Joerg Sonnenberger <joerg at NetBSD.org>
Date:   Tue Oct 12 22:07:37 2010 +0200

    LD_PRELOAD is supported on DragonFly.

diff --git a/configure.ac b/configure.ac
index f918c62..1238f5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -708,7 +708,7 @@ dnl The tracing utility requires LD_PRELOAD, so only build it for systems
 dnl that are known to work.
 
 case $host in
-*-linux*|*-*bsd*|*-solaris*|*-*-darwin*)
+*-linux*|*-*bsd*|*-solaris*|*-*-darwin*|*-dragonfly*)
 	have_ld_preload="yes"
 	;;
 *)
commit c20d55eb1c1eb1c6f51a21c7eb205ba4c2c125e8
Author: Erik Zeek <zeekec at mad.scientist.com>
Date:   Thu Nov 4 17:57:03 2010 +0100

    Fix build on gentoo
    
    The problem is probably caused by a change in the behavior of autoconf
    (2.67).
    
    See http://bugs.gentoo.org/336329

diff --git a/configure.ac b/configure.ac
index 2c14ae2..f918c62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,12 +3,12 @@ CAIRO_PARSE_VERSION
 AC_INIT([cairo],
 	[cairo_version_major.cairo_version_minor.cairo_version_micro],
 	[http://bugs.freedesktop.org/enter_bug.cgi?product=cairo])
+AC_CONFIG_AUX_DIR(build)
+AC_CONFIG_MACRO_DIR(build)
 AC_GNU_SOURCE
 AC_USE_SYSTEM_EXTENSIONS
 AC_CONFIG_SRCDIR(src/cairo.h)
 AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_AUX_DIR(build)
-AC_CONFIG_MACRO_DIR(build)
 AM_INIT_AUTOMAKE([1.9.6 gnu -Wall no-define])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_LIBTOOL_WIN32_DLL dnl Must be called before AC_PROG_LIBTOOL
commit 8ef5161da307361e20dad68df74512c5afcbb012
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Sat Nov 6 15:46:48 2010 +0100

    configure: Correct reporting of tee backend
    
    Since 9f33f8453b4949cfdc63169d3acd7238f89379c2 tee is not compiled in
    anymore by default. Reporting it as always enabled is misleading.

diff --git a/build/configure.ac.features b/build/configure.ac.features
index 825fd96..dc3c8b8 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -365,7 +365,7 @@ AC_DEFUN([CAIRO_REPORT],
 	echo "The following surface backends:"
 	echo "  Image:         yes (always builtin)"
 	echo "  Recording:     yes (always builtin)"
-	echo "  Tee:           yes (always builtin)"
+	echo "  Tee:           $use_tee"
 	echo "  XML:           $use_xml"
 	echo "  Skia:          $use_skia"
 	echo "  Xlib:          $use_xlib"
commit a6b503961b7ffd6a0725ad7d98ec1c46e2f15f25
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Mon Nov 22 23:41:33 2010 +0100

    ps: Fix painting
    
    Painting of some pattern was broken because the paint operation was
    implemented as a fill to a rect containing the clip, but this rect was
    not transformed as appropriate (using the cairo_to_ps matrix).
    PDF simply fills the whole surface rect, so we implement the same
    behavior in PS.
    
    Fixes clip-group-shapes-circles, clip-stroke, linear-gradient-extend,
    linear-gradient-one-stop, radial-gradient-one-stop.

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 3ce5437..6c7ad62 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -3543,9 +3543,8 @@ _cairo_ps_surface_paint (void			*abstract_surface,
 	if (unlikely (status))
 	    return status;
 
-	_cairo_output_stream_printf (stream, "%d %d %d %d rectfill\n",
-				     extents.bounded.x, extents.bounded.y,
-				     extents.bounded.width, extents.bounded.height);
+	_cairo_output_stream_printf (stream, "0 0 %f %f rectfill\n",
+				     surface->width, surface->height);
     }
 
     return CAIRO_STATUS_SUCCESS;
commit b8347e33539402ef64d652bc0f67522e4d02d51c
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Nov 21 00:37:29 2010 +1030

    PS: Fix regression - incorrect EPS bounding box
    
        https://bugs.freedesktop.org/show_bug.cgi?id=24688
    (cherry picked from commit bb4055dac6a937b3412170a332b5effe4bbeff7d)

diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c
index a615149..6bec205 100644
--- a/src/cairo-analysis-surface.c
+++ b/src/cairo-analysis-surface.c
@@ -438,27 +438,14 @@ _cairo_analysis_surface_stroke (void			*abstract_surface,
 
     if (_cairo_operator_bounded_by_mask (op)) {
 	cairo_rectangle_int_t mask_extents;
+	cairo_status_t status;
 
-	/* If the backend can handle the stroke, then mark the approximate
-	 * extents of the operation. However, if we need to fallback in order
-	 * to draw the stroke, then ensure that the fallback is as tight as
-	 * possible -- both to minimise output file size and to ensure good
-	 * quality printed output for neighbouring regions.
-	 */
-	if (backend_status == CAIRO_STATUS_SUCCESS) {
-	    _cairo_path_fixed_approximate_stroke_extents (path,
-							  style, ctm,
-							  &mask_extents);
-	} else {
-	    cairo_status_t status;
-
-	    status = _cairo_path_fixed_stroke_extents (path, style,
-						       ctm, ctm_inverse,
-						       tolerance,
-						       &mask_extents);
-	    if (unlikely (status))
-		return status;
-	}
+	status = _cairo_path_fixed_stroke_extents (path, style,
+						   ctm, ctm_inverse,
+						   tolerance,
+						   &mask_extents);
+	if (unlikely (status))
+	    return status;
 
 	is_empty = _cairo_rectangle_intersect (&extents, &mask_extents);
     }
@@ -503,16 +490,9 @@ _cairo_analysis_surface_fill (void			*abstract_surface,
     if (_cairo_operator_bounded_by_mask (op)) {
 	cairo_rectangle_int_t mask_extents;
 
-	/* We want speed for the likely case where the operation can be
-	 * performed natively, but accuracy if we have to resort to
-	 * using images.
-	 */
-	if (backend_status == CAIRO_STATUS_SUCCESS) {
-	    _cairo_path_fixed_approximate_fill_extents (path, &mask_extents);
-	} else {
-	     _cairo_path_fixed_fill_extents (path, fill_rule, tolerance,
-					     &mask_extents);
-	}
+	_cairo_path_fixed_fill_extents (path, fill_rule, tolerance,
+					&mask_extents);
+
 	is_empty = _cairo_rectangle_intersect (&extents, &mask_extents);
     }
 
commit cfff4f30a0eaa29b817cb32616c2da5a27921332
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Nov 20 23:54:00 2010 +1030

    PS: Fix regression - missing page content in EPS output
    
    https://bugs.freedesktop.org/show_bug.cgi?id=24688
    (cherry picked from commit d3746448d78fcedf8f8f9a7d0fca47f1bd6a5b67)

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 1c2edbe..3ce5437 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -3508,9 +3508,6 @@ _cairo_ps_surface_paint (void			*abstract_surface,
     if (unlikely (status))
 	return status;
 
-    if (! _cairo_rectangle_intersect (&extents.bounded, &surface->page_bbox))
-	return CAIRO_STATUS_SUCCESS;
-
     if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
 	return _cairo_ps_surface_analyze_operation (surface, op, source, &extents.bounded);
 
@@ -3579,9 +3576,6 @@ _cairo_ps_surface_stroke (void			*abstract_surface,
     if (unlikely (status))
 	return status;
 
-    if (! _cairo_rectangle_intersect (&extents.bounded, &surface->page_bbox))
-	return CAIRO_STATUS_SUCCESS;
-
     /* use the more accurate extents */
     if (extents.is_bounded) {
 	status = _cairo_path_fixed_stroke_extents (path, style,
@@ -3643,9 +3637,6 @@ _cairo_ps_surface_fill (void		*abstract_surface,
     if (unlikely (status))
 	return status;
 
-    if (! _cairo_rectangle_intersect (&extents.bounded, &surface->page_bbox))
-	return CAIRO_STATUS_SUCCESS;
-
     /* use the more accurate extents */
     if (extents.is_bounded) {
 	_cairo_path_fixed_fill_extents (path,
commit ed87ddddb3994f126e0f2d18fa23da6bc5ed579e
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Nov 20 00:50:04 2010 +1030

    PS/PDF: Fix regression when changing page size to a larger size
    
    https://bugs.freedesktop.org/show_bug.cgi?id=24691
    (cherry picked from commit e7c5f470436220668e50201d775a9fec47162a67)

diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c
index af4790e..9e65f7b 100644
--- a/src/cairo-paginated-surface.c
+++ b/src/cairo-paginated-surface.c
@@ -151,6 +151,34 @@ _cairo_paginated_surface_get_target (cairo_surface_t *surface)
     return paginated_surface->target;
 }
 
+cairo_status_t
+_cairo_paginated_surface_set_size (cairo_surface_t	*surface,
+				   int			 width,
+				   int			 height)
+{
+    cairo_paginated_surface_t *paginated_surface;
+    cairo_status_t status;
+    cairo_rectangle_t recording_extents;
+
+    assert (_cairo_surface_is_paginated (surface));
+
+    paginated_surface = (cairo_paginated_surface_t *) surface;
+
+    recording_extents.x = 0;
+    recording_extents.y = 0;
+    recording_extents.width = width;
+    recording_extents.height = height;
+
+    cairo_surface_destroy (paginated_surface->recording_surface);
+    paginated_surface->recording_surface = cairo_recording_surface_create (paginated_surface->content,
+									   &recording_extents);
+    status = paginated_surface->recording_surface->status;
+    if (unlikely (status))
+	return _cairo_surface_set_error (surface, status);
+
+    return CAIRO_STATUS_SUCCESS;
+}
+
 static cairo_status_t
 _cairo_paginated_surface_finish (void *abstract_surface)
 {
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index ae2e4f5..0f41713 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -645,6 +645,7 @@ cairo_pdf_surface_set_size (cairo_surface_t	*surface,
 			    double		 height_in_points)
 {
     cairo_pdf_surface_t *pdf_surface = NULL; /* hide compiler warning */
+    cairo_status_t status;
 
     if (! _extract_pdf_surface (surface, &pdf_surface))
 	return;
@@ -652,6 +653,11 @@ cairo_pdf_surface_set_size (cairo_surface_t	*surface,
     _cairo_pdf_surface_set_size_internal (pdf_surface,
 					  width_in_points,
 					  height_in_points);
+    status = _cairo_paginated_surface_set_size (pdf_surface->paginated_surface,
+						width_in_points,
+						height_in_points);
+    if (status)
+	status = _cairo_surface_set_error (surface, status);
 }
 
 static void
@@ -1720,8 +1726,6 @@ _cairo_pdf_surface_finish (void *abstract_surface)
 	surface->font_subsets = NULL;
     }
 
-    _cairo_surface_clipper_reset (&surface->clipper);
-
     return status;
 }
 
@@ -3571,6 +3575,8 @@ _cairo_pdf_surface_show_page (void *abstract_surface)
     if (unlikely (status))
 	return status;
 
+    _cairo_surface_clipper_reset (&surface->clipper);
+
     status = _cairo_pdf_surface_write_page (surface);
     if (unlikely (status))
 	return status;
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index c73214e..1c2edbe 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -1303,6 +1303,7 @@ cairo_ps_surface_set_size (cairo_surface_t	*surface,
 			   double		 height_in_points)
 {
     cairo_ps_surface_t *ps_surface = NULL;
+    cairo_status_t status;
 
     if (! _extract_ps_surface (surface, TRUE, &ps_surface))
 	return;
@@ -1312,6 +1313,11 @@ cairo_ps_surface_set_size (cairo_surface_t	*surface,
     cairo_matrix_init (&ps_surface->cairo_to_ps, 1, 0, 0, -1, 0, height_in_points);
     _cairo_pdf_operators_set_cairo_to_pdf_matrix (&ps_surface->pdf_operators,
 						  &ps_surface->cairo_to_ps);
+    status = _cairo_paginated_surface_set_size (ps_surface->paginated_surface,
+						width_in_points,
+						height_in_points);
+    if (status)
+	status = _cairo_surface_set_error (surface, status);
 }
 
 /**
commit ccff76433e1cd068e5534d0ab633c27b0faf47d2
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Wed Nov 10 20:09:53 2010 +1030

    PDF: Restrict ActualText to PDF version >= 1.5
    
    The use of ActualText in a marked content sequence is a PDF 1.5
    feature.
    
    A 'use_actual_text' flag linked to the PDF version has already been
    implemented in pdf-operators but for some reason this flag had not
    been used to control the use of ActualText.
    (cherry picked from commit 3afd7cd031ab9097e37c3e89d86ec41d015fdeb8)

diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c
index f60fbef..8d7a97d 100644
--- a/src/cairo-pdf-operators.c
+++ b/src/cairo-pdf-operators.c
@@ -1287,7 +1287,7 @@ _cairo_pdf_operators_emit_cluster (cairo_pdf_operators_t      *pdf_operators,
 {
     cairo_scaled_font_subsets_glyph_t subset_glyph;
     cairo_glyph_t *cur_glyph;
-    cairo_status_t status;
+    cairo_status_t status = CAIRO_STATUS_SUCCESS;
     int i;
 
     /* If the cluster maps 1 glyph to 1 or more unicode characters, we
@@ -1322,15 +1322,17 @@ _cairo_pdf_operators_emit_cluster (cairo_pdf_operators_t      *pdf_operators,
 	}
     }
 
-    /* Fallback to using ActualText to map zero or more glyphs to a
-     * unicode string. */
-    status = _cairo_pdf_operators_flush_glyphs (pdf_operators);
-    if (unlikely (status))
-	return status;
+    if (pdf_operators->use_actual_text) {
+	/* Fallback to using ActualText to map zero or more glyphs to a
+	 * unicode string. */
+	status = _cairo_pdf_operators_flush_glyphs (pdf_operators);
+	if (unlikely (status))
+	    return status;
 
-    status = _cairo_pdf_operators_begin_actualtext (pdf_operators, utf8, utf8_len);
-    if (unlikely (status))
-	return status;
+	status = _cairo_pdf_operators_begin_actualtext (pdf_operators, utf8, utf8_len);
+	if (unlikely (status))
+	    return status;
+    }
 
     cur_glyph = glyphs;
     /* XXX
@@ -1355,11 +1357,14 @@ _cairo_pdf_operators_emit_cluster (cairo_pdf_operators_t      *pdf_operators,
 	else
 	    cur_glyph++;
     }
-    status = _cairo_pdf_operators_flush_glyphs (pdf_operators);
-    if (unlikely (status))
-	return status;
 
-    status = _cairo_pdf_operators_end_actualtext (pdf_operators);
+    if (pdf_operators->use_actual_text) {
+	status = _cairo_pdf_operators_flush_glyphs (pdf_operators);
+	if (unlikely (status))
+	    return status;
+
+	status = _cairo_pdf_operators_end_actualtext (pdf_operators);
+    }
 
     return status;
 }
commit e0967ff83c24aaf6d6b3a93a627872820be9012b
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Nov 6 21:15:30 2010 +1030

    Fix type1-fallback bbox
    (cherry picked from commit 74873c82242e9c124b69e05d0f8abdf78983d62d)

diff --git a/src/cairo-type1-fallback.c b/src/cairo-type1-fallback.c
index b93c423..ef25fb6 100644
--- a/src/cairo-type1-fallback.c
+++ b/src/cairo-type1-fallback.c
@@ -755,10 +755,10 @@ _cairo_type1_fallback_init_internal (cairo_type1_subset_t	*type1_subset,
     len = snprintf(type1_subset->data + font->bbox_position,
                    font->bbox_max_chars,
                    "%d %d %d %d",
-                   (int)type1_subset->x_min,
-                   (int)type1_subset->y_min,
-                   (int)type1_subset->x_max,
-                   (int)type1_subset->y_max);
+                   (int)font->x_min,
+                   (int)font->y_min,
+                   (int)font->x_max,
+                   (int)font->y_max);
     type1_subset->data[font->bbox_position + len] = ' ';
 
     type1_subset->header_length = font->header_size;
commit 1413a44f64982e5196ca338c7cee5dfe19cd4b40
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Nov 6 18:44:54 2010 +1030

    configure.ac.features: s/Meta/Recording/
    (cherry picked from commit 8f2f5e5ad4f8e5f18da903865bb2d2afce3a544e)

diff --git a/build/configure.ac.features b/build/configure.ac.features
index 176349e..825fd96 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -364,7 +364,7 @@ AC_DEFUN([CAIRO_REPORT],
 	echo ""
 	echo "The following surface backends:"
 	echo "  Image:         yes (always builtin)"
-	echo "  Meta:          yes (always builtin)"
+	echo "  Recording:     yes (always builtin)"
 	echo "  Tee:           yes (always builtin)"
 	echo "  XML:           $use_xml"
 	echo "  Skia:          $use_skia"
commit e9bb70d2dee4ef7a54e3971f09a08df30c2b5287
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date:   Fri Nov 5 11:40:00 2010 -0400

    Fix degenerate vertical path bounds.
    
    6b77567b6ef28710c7707ab82c7fa95c810152d1 made vertical
    path bounds with no area return extents of 0,0. This fixes
    the problem by not assuming degenerate path bounds are 0,0

diff --git a/src/cairo-path-bounds.c b/src/cairo-path-bounds.c
index d32c260..75308c6 100644
--- a/src/cairo-path-bounds.c
+++ b/src/cairo-path-bounds.c
@@ -331,7 +331,9 @@ _cairo_path_fixed_extents (const cairo_path_fixed_t *path,
 
     if (! path->has_curve_to) {
 	*box = path->extents;
-	return path->extents.p1.x < path->extents.p2.x;
+	/* empty extents should still have an origin and should not
+	 * be {0, 0, 0, 0} */
+	return path->extents.p1.x <= path->extents.p2.x;
     }
 
     _cairo_path_bounder_init (&bounder);
diff --git a/test/get-path-extents.c b/test/get-path-extents.c
index a3e9554..3a05eff 100644
--- a/test/get-path-extents.c
+++ b/test/get-path-extents.c
@@ -61,10 +61,6 @@ check_extents (const cairo_test_context_t *ctx,
     if (cairo_status (cr))
 	return 1;
 
-    /* let empty rects match */
-    if ((ext_x1 == ext_x2 || ext_y1 == ext_y2) && (width == 0 || height == 0))
-        return 1;
-
     switch (relation) {
     default:
     case EQUALS:
@@ -152,14 +148,16 @@ draw (cairo_t *cr, int width, int height)
     phase = "Degenerate arc (R=0)";
     errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0);
     errors += !check_extents (ctx, phase, cr2, STROKE, EQUALS, 0, 0, 0, 0);
-    errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 200, 400, 0, 0);
+    /*XXX: I'd expect these extents to be oriented at 200, 400 */
+    errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 0, 0, 0, 0);
 
     cairo_new_path (cr2);
     cairo_arc (cr2, 200, 400, 10., 0, 0);
     phase = "Degenerate arc (Θ=0)";
     errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0);
     errors += !check_extents (ctx, phase, cr2, STROKE, EQUALS, 0, 0, 0, 0);
-    errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 200, 400, 0, 0);
+    /*XXX: I'd expect these extents to be oriented at 200, 400 */
+    errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 0, 0, 0, 0);
 
     cairo_new_path (cr2);
     cairo_restore (cr2);
@@ -191,7 +189,7 @@ draw (cairo_t *cr, int width, int height)
     cairo_restore (cr2);
 
     /* http://bugs.freedesktop.org/show_bug.cgi?id=7965 */
-    phase = "A vertical, open path";
+    phase = "A horizontal, open path";
     cairo_save (cr2);
     cairo_set_line_cap (cr2, CAIRO_LINE_CAP_ROUND);
     cairo_set_line_join (cr2, CAIRO_LINE_JOIN_ROUND);
@@ -199,7 +197,33 @@ draw (cairo_t *cr, int width, int height)
     cairo_line_to (cr2, 750, 180);
     errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0);
     errors += !check_extents (ctx, phase, cr2, STROKE, EQUALS, -5, 175, 760, 10);
-    errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 0, 180, 755, 0);
+    errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 0, 180, 750, 0);
+    cairo_new_path (cr2);
+    cairo_restore (cr2);
+
+    phase = "A vertical, open path";
+    cairo_save (cr2);
+    cairo_set_line_cap (cr2, CAIRO_LINE_CAP_ROUND);
+    cairo_set_line_join (cr2, CAIRO_LINE_JOIN_ROUND);
+    cairo_new_path (cr2);
+    cairo_move_to (cr2, 180, 0);
+    cairo_line_to (cr2, 180, 750);
+    errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0);
+    errors += !check_extents (ctx, phase, cr2, STROKE, EQUALS, 175, -5, 10, 760);
+    errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 180, 0, 0, 750);
+    cairo_new_path (cr2);
+    cairo_restore (cr2);
+
+    phase = "A degenerate open path";
+    cairo_save (cr2);
+    cairo_set_line_cap (cr2, CAIRO_LINE_CAP_ROUND);
+    cairo_set_line_join (cr2, CAIRO_LINE_JOIN_ROUND);
+    cairo_new_path (cr2);
+    cairo_move_to (cr2, 180, 0);
+    cairo_line_to (cr2, 180, 0);
+    errors += !check_extents (ctx, phase, cr2, FILL, EQUALS, 0, 0, 0, 0);
+    errors += !check_extents (ctx, phase, cr2, STROKE, EQUALS, 175, -5, 10, 10);
+    errors += !check_extents (ctx, phase, cr2, PATH, EQUALS, 180, 0, 0, 0);
     cairo_new_path (cr2);
     cairo_restore (cr2);
 
commit 91a6fe64236985d30f5794d760698deafd9e6511
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Mon Nov 1 21:15:07 2010 +0100

    image: Use correct size for allocation
    
    In 06e9caf86199e8261a07db6d4774628fa147728d the type of the variables
    was changed, but the type used to compute the allocation size was not.
    
    Fixes a crash in user-font-mask (test-fallback backend).
    (cherry picked from commit c7027c9d89d9a13d6cbc1727fc8513c908878db9)

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 491859f..d28267a 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -4252,7 +4252,7 @@ _cairo_image_surface_fill_rectangles (void		      *abstract_surface,
     cairo_image_surface_t *surface = abstract_surface;
 
     pixman_color_t pixman_color;
-    pixman_box32_t stack_boxes[CAIRO_STACK_ARRAY_LENGTH (pixman_rectangle16_t)];
+    pixman_box32_t stack_boxes[CAIRO_STACK_ARRAY_LENGTH (pixman_box32_t)];
     pixman_box32_t *pixman_boxes = stack_boxes;
     int i;
 
@@ -4267,7 +4267,7 @@ _cairo_image_surface_fill_rectangles (void		      *abstract_surface,
     pixman_color.alpha = color->alpha_short;
 
     if (num_rects > ARRAY_LENGTH (stack_boxes)) {
-	pixman_boxes = _cairo_malloc_ab (num_rects, sizeof (pixman_rectangle16_t));
+	pixman_boxes = _cairo_malloc_ab (num_rects, sizeof (pixman_box32_t));
 	if (unlikely (pixman_boxes == NULL))
 	    return _cairo_error (CAIRO_STATUS_NO_MEMORY);
     }
commit 83259f6ed60e00d0c25ca81c9ff9adfc017ebf5f
Author: Benjamin Otte <otte at redhat.com>
Date:   Thu Oct 28 13:57:05 2010 +0200

    build: Don't build cairo-fdr when the tee surface is off

diff --git a/util/Makefile.am b/util/Makefile.am
index 0826763..807a194 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -13,9 +13,11 @@ endif
 if CAIRO_HAS_TRACE
 SUBDIRS += cairo-trace
 if CAIRO_HAS_SCRIPT_SURFACE
+if CAIRO_HAS_TEE_SURFACE
 SUBDIRS += cairo-fdr
 endif
 endif
+endif
 
 if BUILD_SPHINX
 if CAIRO_HAS_SCRIPT_SURFACE
commit efc2440526c609338d68354ddf38031d1fa7c2c4
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Thu Oct 28 21:21:00 2010 +1030

    PDF: Don't use the currently set color  after a 'Q' operator
    
    https://bugs.freedesktop.org/show_bug.cgi?id=31140
    (cherry picked from commit e23bcfd4300870034f07b1ecd1bb4d2ac95d9785)

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index fec752f..ae2e4f5 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -3554,6 +3554,7 @@ _cairo_pdf_surface_unselect_pattern (cairo_pdf_surface_t *surface)
 
 	_cairo_output_stream_printf (surface->output, "Q\n");
 	_cairo_pdf_operators_reset (&surface->pdf_operators);
+	surface->current_pattern_is_solid_color = FALSE;
     }
     surface->select_pattern_gstate_saved = FALSE;
 
commit f47830dbbc34c7068ccdd8f7f9042e8734c9e408
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun Oct 24 11:32:41 2010 +1030

    Type 1 subset: Fix glyph advance
    
    https://bugs.freedesktop.org/show_bug.cgi?id=31062
    (cherry picked from commit 6dc0b19adb6da690ad5944623081b9cdb42de066)

diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 9c0a2cf..9650699 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -69,8 +69,8 @@ typedef struct _cairo_type1_font_subset {
 	unsigned int font_id;
 	char *base_font;
 	unsigned int num_glyphs;
-	long x_min, y_min, x_max, y_max;
-	long ascent, descent;
+	double x_min, y_min, x_max, y_max;
+	double ascent, descent;
 
 	const char    *data;
 	unsigned long  header_size;
@@ -146,12 +146,12 @@ _cairo_type1_font_subset_init (cairo_type1_font_subset_t  *font,
     memset (font, 0, sizeof (*font));
     font->base.unscaled_font = _cairo_unscaled_font_reference (unscaled_font);
     font->base.num_glyphs = face->num_glyphs;
-    font->base.x_min = face->bbox.xMin;
-    font->base.y_min = face->bbox.yMin;
-    font->base.x_max = face->bbox.xMax;
-    font->base.y_max = face->bbox.yMax;
-    font->base.ascent = face->ascender;
-    font->base.descent = face->descender;
+    font->base.x_min = face->bbox.xMin / (double)face->units_per_EM;
+    font->base.y_min = face->bbox.yMin / (double)face->units_per_EM;
+    font->base.x_max = face->bbox.xMax / (double)face->units_per_EM;
+    font->base.y_max = face->bbox.yMax / (double)face->units_per_EM;
+    font->base.ascent = face->ascender / (double)face->units_per_EM;
+    font->base.descent = face->descender / (double)face->units_per_EM;
 
     if (face->family_name) {
 	font->base.base_font = strdup (face->family_name);
@@ -566,7 +566,7 @@ cairo_type1_font_subset_get_glyph_names_and_widths (cairo_type1_font_subset_t *f
 	    return CAIRO_INT_STATUS_UNSUPPORTED;
 	}
 
-	font->glyphs[i].width = font->face->glyph->linearHoriAdvance / 65536.0; /* 16.16 format */
+	font->glyphs[i].width = font->face->glyph->metrics.horiAdvance / (double)font->face->units_per_EM;
 
 	error = FT_Get_Glyph_Name(font->face, i, buffer, sizeof buffer);
 	if (error != FT_Err_Ok) {
@@ -1356,12 +1356,12 @@ _cairo_type1_subset_init (cairo_type1_subset_t		*type1_subset,
 	    font.glyphs[i].width;
     }
 
-    type1_subset->x_min = font.base.x_min/1000.0;
-    type1_subset->y_min = font.base.y_min/1000.0;
-    type1_subset->x_max = font.base.x_max/1000.0;
-    type1_subset->y_max = font.base.y_max/1000.0;
-    type1_subset->ascent = font.base.ascent/1000.0;
-    type1_subset->descent = font.base.descent/1000.0;
+    type1_subset->x_min = font.base.x_min;
+    type1_subset->y_min = font.base.y_min;
+    type1_subset->x_max = font.base.x_max;
+    type1_subset->y_max = font.base.y_max;
+    type1_subset->ascent = font.base.ascent;
+    type1_subset->descent = font.base.descent;
 
     length = font.base.header_size +
 	     font.base.data_size +
commit f747ea81fb91239690b1785bce9ed29cb58c9098
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Thu Oct 14 19:28:13 2010 +1030

    PDF: Fix regression in EXTEND_NONE gradients
    
    The test for opaque gradients in _cairo_pdf_surface_add_pdf_pattern()
    must be identical to the test in
    _cairo_pdf_surface_emit_pattern_stops() other wise the PDF file will
    reference a smask that does not exist.
    
    The _cairo_pattern_is_opaque() test is too strict for PDF as PDF can
    draw EXTEND_NONE gradients with opaque color stops without requiring a
    smask.
    (cherry picked from commit 7a17ef31760c49b81fd2890814f5b2aeb8c6b3a3)

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index c60e636..fec752f 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -1202,6 +1202,18 @@ _cairo_pdf_surface_add_source_surface (cairo_pdf_surface_t	*surface,
     return status;
 }
 
+static cairo_bool_t
+_gradient_stops_are_opaque (const cairo_gradient_pattern_t *gradient)
+{
+    unsigned int i;
+
+    for (i = 0; i < gradient->n_stops; i++)
+	if (! CAIRO_COLOR_IS_OPAQUE (&gradient->stops[i].color))
+	    return FALSE;
+
+    return TRUE;
+}
+
 static cairo_status_t
 _cairo_pdf_surface_add_pdf_pattern (cairo_pdf_surface_t		*surface,
 				    const cairo_pattern_t	*pattern,
@@ -1235,7 +1247,8 @@ _cairo_pdf_surface_add_pdf_pattern (cairo_pdf_surface_t		*surface,
     if (pattern->type == CAIRO_PATTERN_TYPE_LINEAR ||
         pattern->type == CAIRO_PATTERN_TYPE_RADIAL)
     {
-        if (_cairo_pattern_is_opaque (pattern, extents) == FALSE) {
+	cairo_gradient_pattern_t *gradient = (cairo_gradient_pattern_t *) pattern;
+	if (! _gradient_stops_are_opaque (gradient)) {
             pdf_pattern.gstate_res = _cairo_pdf_surface_new_object (surface);
 	    if (pdf_pattern.gstate_res.id == 0) {
 		cairo_pattern_destroy (pdf_pattern.pattern);
commit 7450a3c8a7843334d6e16af3ecef88915b5d9f26
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Fri Oct 1 19:18:28 2010 +0930

    pdf-operators: fix bug that was causing unnecessary repositioning of text
    
    This optimizes the output to increase the maximum amount of text that
    is emitted with a single Tj operator.
    (cherry picked from commit 165a14b5646d582781d119874f549ec9a02d7f53)

diff --git a/src/cairo-pdf-operators-private.h b/src/cairo-pdf-operators-private.h
index 95d4d53..67d1cc2 100644
--- a/src/cairo-pdf-operators-private.h
+++ b/src/cairo-pdf-operators-private.h
@@ -82,6 +82,7 @@ typedef struct _cairo_pdf_operators {
     double cur_y;
     int hex_width;
     int num_glyphs;
+    double glyph_buf_x_pos;
     cairo_pdf_glyph_t glyphs[PDF_GLYPH_BUFFER_SIZE];
 
     /* PDF line style */
diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c
index 601011a..f60fbef 100644
--- a/src/cairo-pdf-operators.c
+++ b/src/cairo-pdf-operators.c
@@ -990,6 +990,7 @@ _cairo_pdf_operators_flush_glyphs (cairo_pdf_operators_t    *pdf_operators)
     }
 
     pdf_operators->num_glyphs = 0;
+    pdf_operators->glyph_buf_x_pos = pdf_operators->cur_x;
     status2 = _cairo_output_stream_destroy (word_wrap_stream);
     if (status == CAIRO_STATUS_SUCCESS)
 	status = status2;
@@ -1012,6 +1013,7 @@ _cairo_pdf_operators_add_glyph (cairo_pdf_operators_t             *pdf_operators
     pdf_operators->glyphs[pdf_operators->num_glyphs].x_position = x_position;
     pdf_operators->glyphs[pdf_operators->num_glyphs].glyph_index = glyph->subset_glyph_index;
     pdf_operators->glyphs[pdf_operators->num_glyphs].x_advance = x;
+    pdf_operators->glyph_buf_x_pos += x;
     pdf_operators->num_glyphs++;
     if (pdf_operators->num_glyphs == PDF_GLYPH_BUFFER_SIZE)
 	return _cairo_pdf_operators_flush_glyphs (pdf_operators);
@@ -1036,6 +1038,7 @@ _cairo_pdf_operators_set_text_matrix (cairo_pdf_operators_t  *pdf_operators,
     pdf_operators->text_matrix = *matrix;
     pdf_operators->cur_x = 0;
     pdf_operators->cur_y = 0;
+    pdf_operators->glyph_buf_x_pos = 0;
     _cairo_output_stream_printf (pdf_operators->stream,
 				 "%f %f %f %f %f %f Tm\n",
 				 pdf_operators->text_matrix.xx,
@@ -1091,6 +1094,7 @@ _cairo_pdf_operators_set_text_position (cairo_pdf_operators_t  *pdf_operators,
 				 translate.y0);
     pdf_operators->cur_x = 0;
     pdf_operators->cur_y = 0;
+    pdf_operators->glyph_buf_x_pos = 0;
 
     pdf_operators->cairo_to_pdftext = pdf_operators->text_matrix;
     status = cairo_matrix_invert (&pdf_operators->cairo_to_pdftext);
@@ -1140,6 +1144,7 @@ _cairo_pdf_operators_begin_text (cairo_pdf_operators_t    *pdf_operators)
 
     pdf_operators->in_text_object = TRUE;
     pdf_operators->num_glyphs = 0;
+    pdf_operators->glyph_buf_x_pos = 0;
 
     return _cairo_output_stream_get_status (pdf_operators->stream);
 }
@@ -1244,7 +1249,7 @@ _cairo_pdf_operators_emit_glyph (cairo_pdf_operators_t             *pdf_operator
      * PDF consumers that do not handle very large position
      * adjustments in TJ.
      */
-    if (fabs(x - pdf_operators->cur_x) > 10 ||
+    if (fabs(x - pdf_operators->glyph_buf_x_pos) > 10 ||
 	fabs(y - pdf_operators->cur_y) > GLYPH_POSITION_TOLERANCE)
     {
 	status = _cairo_pdf_operators_flush_glyphs (pdf_operators);
commit 43c93f2b101f534f8aa4213403af3281fcdc17fb
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Fri Oct 1 17:41:28 2010 +0930

    Fix font metrics in PDF Type 1 fonts
    
    edcefa87 introduced a bug in the Type 1 font metrics in PDF files.
    (cherry picked from commit 3f817dcfd39ffdb73ac694fd90a47d9d3a42af74)

diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index d92c860..9c0a2cf 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -1356,12 +1356,12 @@ _cairo_type1_subset_init (cairo_type1_subset_t		*type1_subset,
 	    font.glyphs[i].width;
     }
 
-    type1_subset->x_min = font.base.x_min;
-    type1_subset->y_min = font.base.y_min;
-    type1_subset->x_max = font.base.x_max;
-    type1_subset->y_max = font.base.y_max;
-    type1_subset->ascent = font.base.ascent;
-    type1_subset->descent = font.base.descent;
+    type1_subset->x_min = font.base.x_min/1000.0;
+    type1_subset->y_min = font.base.y_min/1000.0;
+    type1_subset->x_max = font.base.x_max/1000.0;
+    type1_subset->y_max = font.base.y_max/1000.0;
+    type1_subset->ascent = font.base.ascent/1000.0;
+    type1_subset->descent = font.base.descent/1000.0;
 
     length = font.base.header_size +
 	     font.base.data_size +


More information about the cairo-commit mailing list