[cairo-commit] src/cairo-pdf-surface.c test/show-text-current-point-pdf-argb32-ref.png test/text-antialias-gray-pdf-argb32-ref.png test/text-antialias-none-pdf-argb32-ref.png test/text-antialias-subpixel-pdf-argb32-ref.png

Carl Worth cworth at kemper.freedesktop.org
Wed Apr 19 11:10:28 PDT 2006


 src/cairo-pdf-surface.c                         |   27 +++++++-
 test/show-text-current-point-pdf-argb32-ref.png |binary
 test/text-antialias-gray-pdf-argb32-ref.png     |   80 ++++++++++++++++++++++++
 test/text-antialias-none-pdf-argb32-ref.png     |   80 ++++++++++++++++++++++++
 test/text-antialias-subpixel-pdf-argb32-ref.png |   80 ++++++++++++++++++++++++
 5 files changed, 264 insertions(+), 3 deletions(-)

New commits:
diff-tree c5d5687ac09049ca5b942993fc259e54ad5b6721 (from ab2546009ff246bd0e7bbc07437330cf307e00f7)
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Apr 19 11:04:37 2006 -0700

    PDF: Add simple implementation of _cairo_pdf_surface_show_glyphs (text as paths).
    
    This isn't very exciting text output---it simply turns every call to
    cairo_show_glyphs into a single filled path. But at the very least,
    text will no longer trigger image fallbacks for the PDF backend.
    
    With this commit, the following tests change from all-fallback to
    all-native for the PDF backend:
    
    	show-text-current-point
    	text-antialias-gray
    	text-antialias-none
    	text-antialias-subpixel
    	text-cache-crash
    	text-rotate
    
    There are rasterization differences in the output (cairo vs. freetype)
    so this commit also adds new PDF-specific reference images for some of
    those tests so that the suite continues to report PASS.

diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 64b5641..8c2252a 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -41,6 +41,7 @@
 #include "cairo-font-subset-private.h"
 #include "cairo-ft-private.h"
 #include "cairo-paginated-surface-private.h"
+#include "cairo-path-fixed-private.h"
 
 #include <time.h>
 #include <zlib.h>
@@ -2342,13 +2343,33 @@ _cairo_pdf_surface_show_glyphs (void			*
 				cairo_scaled_font_t	*scaled_font)
 {
     cairo_pdf_surface_t *surface = abstract_surface;
+    cairo_pdf_document_t *document = surface->document;
+    cairo_path_fixed_t path;
+    cairo_status_t status;
 
     if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
-	return CAIRO_INT_STATUS_UNSUPPORTED;
+	return _analyze_operation (surface, op, source);
 
-    ASSERT_NOT_REACHED;
+    assert (_operation_supported (surface, op, source));
 
-    return CAIRO_INT_STATUS_UNSUPPORTED;
+    status = emit_pattern (surface, source);
+    if (status)
+	return status;
+
+    /* After emitting the pattern the current stream should belong to
+     * this surface, so no need to _cairo_pdf_surface_ensure_stream()
+     */
+    assert (document->current_stream != NULL &&
+	    document->current_stream == surface->current_stream);
+
+    _cairo_path_fixed_init (&path);
+    _cairo_scaled_font_glyph_path (scaled_font, glyphs, num_glyphs, &path);
+    status = _cairo_pdf_surface_fill (surface, op, source,
+				      &path, CAIRO_FILL_RULE_WINDING,
+				      0.1, scaled_font->options.antialias);
+    _cairo_path_fixed_fini (&path);
+
+    return status;
 }
 
 static void
diff --git a/test/show-text-current-point-pdf-argb32-ref.png b/test/show-text-current-point-pdf-argb32-ref.png
new file mode 100644
index 0000000..c024a4d
Binary files /dev/null and b/test/show-text-current-point-pdf-argb32-ref.png differ
diff --git a/test/text-antialias-gray-pdf-argb32-ref.png b/test/text-antialias-gray-pdf-argb32-ref.png
new file mode 100644
index 0000000..fd0e716
--- /dev/null
+++ b/test/text-antialias-gray-pdf-argb32-ref.png
@@ -0,0 +1,80 @@
+%PDF-1.4
+2 0 obj
+<< /Length 3 0 R
+   /Type /XObject
+   /Subtype /Form
+   /BBox [ 0 0 31 22 ]
+>>
+stream
+1 0 0 -1 0 22 cm
+1 1 1 RG 1 1 1 rg /a0 gs
+0 0 31 22 re f
+0 0 0 RG 0 0 0 rg /a0 gs
+0 0 0 RG 0 0 0 rg /a0 gs
+4.84375 6.71875 m 4.84375 5.927094 4.677078 5.307297 4.34375 4.859375 c 4.020828 4.411469 3.57811 4.1875 3.015625 4.1875 c 2.442703 4.1875 1.989578 4.411469 1.65625 4.859375 c 1.333328 5.307297 1.171875 5.927094 1.171875 6.71875 c 1.171875 7.510422 1.333328 8.135422 1.65625 8.59375 c 1.989578 9.041672 2.442703 9.265625 3.015625 9.265625 c 3.57811 9.265625 4.020828 9.041672 4.34375 8.59375 c 4.677078 8.135422 4.84375 7.510422 4.84375 6.71875 c h
+1.171875 4.4375 m 1.401031 4.041672 1.6875 3.75 2.03125 3.5625 c 2.374985 3.375015 2.786453 3.28125 3.265625 3.28125 c 4.067703 3.28125 4.71875 3.598969 5.21875 4.234375 c 5.718735 4.859375 5.96875 5.687515 5.96875 6.71875 c 5.96875 7.75 5.718735 8.583344 5.21875 9.21875 c 4.71875 9.854172 4.067703 10.171875 3.265625 10.171875 c 2.786453 10.171875 2.374985 10.07811 2.03125 9.890625 c 1.6875 9.692719 1.401031 9.401047 1.171875 9.015625 c 1.171875 10 l 0.09375 10 l 0.09375 0.875 l 1.171875 0.875 l 1.171875 4.4375 l h
+8.125 0.875 m 9.203125 0.875 l 9.203125 10 l 8.125 10 l 8.125 0.875 l h
+14.109375 6.703125 m 13.244781 6.703125 12.64061 6.802094 12.296875 7 c 11.963531 7.197922 11.796875 7.536469 11.796875 8.015625 c 11.796875 8.401047 11.921875 8.708344 12.171875 8.9375 c 12.432281 9.15625 12.776031 9.265625 13.203125 9.265625 c 13.807281 9.265625 14.286453 9.057297 14.640625 8.640625 c 15.005203 8.213547 15.1875 7.645844 15.1875 6.9375 c 15.1875 6.703125 l 14.109375 6.703125 l h
+16.265625 6.25 m 16.265625 10 l 15.1875 10 l 15.1875 9 l 14.9375 9.395844 14.630203 9.692719 14.265625 9.890625 c 13.901031 10.07811 13.45311 10.171875 12.921875 10.171875 c 12.244781 10.171875 11.708328 9.984375 11.3125 9.609375 c 10.916656 9.223969 10.71875 8.71875 10.71875 8.09375 c 10.71875 7.354172 10.963531 6.796875 11.453125 6.421875 c 11.95311 6.04689 12.692703 5.859375 13.671875 5.859375 c 15.1875 5.859375 l 15.1875 5.75 l 15.1875 5.250015 15.020828 4.864594 14.6875 4.59375 c 14.364578 4.322922 13.911453 4.1875 13.328125 4.1875 c 12.953125 4.1875 12.583328 4.23439 12.21875 4.328125 c 11.864578 4.421875 11.526031 4.557297 11.203125 4.734375 c 11.203125 3.734375 l 11.598953 3.57814 11.979156 3.463547 12.34375 3.390625 c 12.718735 3.317719 13.083328 3.28125 13.4375 3.28125 c 14.385406 3.28125 15.09375 3.526047 15.5625 4.015625 c 16.031235 4.505219 16.265625 5.250015 16.265625 6.25 c h
+22.859375 3.6875 m 22.859375 4.703125 l 22.546875 4.526047 22.239578 4.395844 21.9375 4.3125 c 21.635406 4.229172 21.32811 4.1875 21.015625 4.1875 c 20.307281 4.1875 19.760406 4.411469 19.375 4.859375 c 18.989578 5.296875 18.796875 5.916672 18.796875 6.71875 c 18.796875 7.520844 18.989578 8.145844 19.375 8.59375 c 19.760406 9.03125 20.307281 9.25 21.015625 9.25 c 21.32811 9.25 21.635406 9.208344 21.9375 9.125 c 22.239578 9.041672 22.546875 8.916672 22.859375 8.75 c 22.859375 9.75 l 22.557281 9.885422 22.244781 9.989594 21.921875 10.0625 c 21.598953 10.135406 21.255203 10.171875 20.890625 10.171875 c 19.901031 10.171875 19.114578 9.864594 18.53125 9.25 c 17.947906 8.625015 17.65625 7.78125 17.65625 6.71875 c 17.65625 5.656265 17.947906 4.817719 18.53125 4.203125 c 19.124985 3.588547 19.9375 3.28125 20.96875 3.28125 c 21.291656 3.28125 21.609375 3.317719 21.921875 3.390625 c 22.244781 3.453125 22.557281 3.552094 22.859375 3.6875 c h
+25.09375 0.875 m 26.171875 0.875 l 26.171875 6.265625 l 29.390625 3.4375 l 30.765625 3.4375 l 27.28125 6.5 l 30.921875 10 l 29.515625 10 l 26.171875 6.796875 l 26.171875 10 l 25.09375 10 l 25.09375 0.875 l h
+f
+0 0 1 RG 0 0 1 rg /a0 gs
+0 0 1 RG 0 0 1 rg /a0 gs
+4.84375 17.71875 m 4.84375 16.927094 4.677078 16.307297 4.34375 15.859375 c 4.020828 15.411469 3.57811 15.1875 3.015625 15.1875 c 2.442703 15.1875 1.989578 15.411469 1.65625 15.859375 c 1.333328 16.307297 1.171875 16.927094 1.171875 17.71875 c 1.171875 18.510422 1.333328 19.135422 1.65625 19.59375 c 1.989578 20.041672 2.442703 20.265625 3.015625 20.265625 c 3.57811 20.265625 4.020828 20.041672 4.34375 19.59375 c 4.677078 19.135422 4.84375 18.510422 4.84375 17.71875 c h
+1.171875 15.4375 m 1.401031 15.041672 1.6875 14.75 2.03125 14.5625 c 2.374985 14.375015 2.786453 14.28125 3.265625 14.28125 c 4.067703 14.28125 4.71875 14.598969 5.21875 15.234375 c 5.718735 15.859375 5.96875 16.687515 5.96875 17.71875 c 5.96875 18.75 5.718735 19.583344 5.21875 20.21875 c 4.71875 20.854172 4.067703 21.171875 3.265625 21.171875 c 2.786453 21.171875 2.374985 21.07811 2.03125 20.890625 c 1.6875 20.692719 1.401031 20.401047 1.171875 20.015625 c 1.171875 21 l 0.09375 21 l 0.09375 11.875 l 1.171875 11.875 l 1.171875 15.4375 l h
+8.125 11.875 m 9.203125 11.875 l 9.203125 21 l 8.125 21 l 8.125 11.875 l h
+11.015625 18.40625 m 11.015625 14.4375 l 12.09375 14.4375 l 12.09375 18.375 l 12.09375 18.989594 12.213531 19.45314 12.453125 19.765625 c 12.70311 20.078125 13.067703 20.234375 13.546875 20.234375 c 14.130203 20.234375 14.588531 20.052094 14.921875 19.6875 c 15.26561 19.312515 15.4375 18.802094 15.4375 18.15625 c 15.4375 14.4375 l 16.515625 14.4375 l 16.515625 21 l 15.4375 21 l 15.4375 19.984375 l 15.177078 20.390625 14.874985 20.692719 14.53125 20.890625 c 14.1875 21.07811 13.786453 21.171875 13.328125 21.171875 c 12.567703 21.171875 11.989578 20.9375 11.59375 20.46875 c 11.208328 20.000015 11.015625 19.3125 11.015625 18.40625 c h
+24.75 17.453125 m 24.75 17.96875 l 19.78125 17.96875 l 19.833328 18.71875 20.057281 19.286469 20.453125 19.671875 c 20.85936 20.057297 21.416656 20.25 22.125 20.25 c 22.541656 20.25 22.942703 20.203125 23.328125 20.109375 c 23.723953 20.005219 24.114578 19.848969 24.5 19.640625 c 24.5 20.671875 l 24.104156 20.828125 23.70311 20.947922 23.296875 21.03125 c 22.890625 21.124985 22.479156 21.171875 22.0625 21.171875 c 21.020828 21.171875 20.192703 20.869797 19.578125 20.265625 c 18.963531 19.651047 18.65625 18.822922 18.65625 17.78125 c 18.65625 16.708344 18.947906 15.859375 19.53125 15.234375 c 20.114578 14.598969 20.895828 14.28125 21.875 14.28125 c 22.760406 14.28125 23.458328 14.567719 23.96875 15.140625 c 24.489578 15.703125 24.75 16.473969 24.75 17.453125 c h
+23.671875 17.125 m 23.661453 16.541672 23.494781 16.072922 23.171875 15.71875 c 22.848953 15.364594 22.42186 15.1875 21.890625 15.1875 c 21.286453 15.1875 20.802078 15.35939 20.4375 15.703125 c 20.083328 16.046875 19.880203 16.526047 19.828125 17.140625 c 23.671875 17.125 l h
+f
+endstream
+endobj
+3 0 obj
+   6465
+endobj
+4 0 obj
+<< /Type /Page
+   /Parent 1 0 R
+   /Contents [ 2 0 R ]
+   /Resources <<
+      /ExtGState <<
+         /a0 << /CA 1 /ca 1 >>
+      >>
+   >>
+>>
+endobj
+1 0 obj
+<< /Type /Pages
+   /Kids [ 4 0 R ]
+   /Count 1
+   /MediaBox [ 0 0 31 22 ]
+>>
+endobj
+5 0 obj
+<< /Creator (cairographics.org)
+   /Producer (cairographics.org)
+>>
+endobj
+6 0 obj
+<< /Type /Catalog
+   /Pages 1 0 R
+>>
+endobj
+xref
+0 7
+0000000000 65535 f
+0000006788 00000 n
+0000000010 00000 n
+0000006595 00000 n
+0000006621 00000 n
+0000006887 00000 n
+0000006975 00000 n
+trailer
+<< /Size 7
+   /Root 6 0 R
+   /Info 5 0 R
+>>
+startxref
+7032
+%%EOF
diff --git a/test/text-antialias-none-pdf-argb32-ref.png b/test/text-antialias-none-pdf-argb32-ref.png
new file mode 100644
index 0000000..fd0e716
--- /dev/null
+++ b/test/text-antialias-none-pdf-argb32-ref.png
@@ -0,0 +1,80 @@
+%PDF-1.4
+2 0 obj
+<< /Length 3 0 R
+   /Type /XObject
+   /Subtype /Form
+   /BBox [ 0 0 31 22 ]
+>>
+stream
+1 0 0 -1 0 22 cm
+1 1 1 RG 1 1 1 rg /a0 gs
+0 0 31 22 re f
+0 0 0 RG 0 0 0 rg /a0 gs
+0 0 0 RG 0 0 0 rg /a0 gs
+4.84375 6.71875 m 4.84375 5.927094 4.677078 5.307297 4.34375 4.859375 c 4.020828 4.411469 3.57811 4.1875 3.015625 4.1875 c 2.442703 4.1875 1.989578 4.411469 1.65625 4.859375 c 1.333328 5.307297 1.171875 5.927094 1.171875 6.71875 c 1.171875 7.510422 1.333328 8.135422 1.65625 8.59375 c 1.989578 9.041672 2.442703 9.265625 3.015625 9.265625 c 3.57811 9.265625 4.020828 9.041672 4.34375 8.59375 c 4.677078 8.135422 4.84375 7.510422 4.84375 6.71875 c h
+1.171875 4.4375 m 1.401031 4.041672 1.6875 3.75 2.03125 3.5625 c 2.374985 3.375015 2.786453 3.28125 3.265625 3.28125 c 4.067703 3.28125 4.71875 3.598969 5.21875 4.234375 c 5.718735 4.859375 5.96875 5.687515 5.96875 6.71875 c 5.96875 7.75 5.718735 8.583344 5.21875 9.21875 c 4.71875 9.854172 4.067703 10.171875 3.265625 10.171875 c 2.786453 10.171875 2.374985 10.07811 2.03125 9.890625 c 1.6875 9.692719 1.401031 9.401047 1.171875 9.015625 c 1.171875 10 l 0.09375 10 l 0.09375 0.875 l 1.171875 0.875 l 1.171875 4.4375 l h
+8.125 0.875 m 9.203125 0.875 l 9.203125 10 l 8.125 10 l 8.125 0.875 l h
+14.109375 6.703125 m 13.244781 6.703125 12.64061 6.802094 12.296875 7 c 11.963531 7.197922 11.796875 7.536469 11.796875 8.015625 c 11.796875 8.401047 11.921875 8.708344 12.171875 8.9375 c 12.432281 9.15625 12.776031 9.265625 13.203125 9.265625 c 13.807281 9.265625 14.286453 9.057297 14.640625 8.640625 c 15.005203 8.213547 15.1875 7.645844 15.1875 6.9375 c 15.1875 6.703125 l 14.109375 6.703125 l h
+16.265625 6.25 m 16.265625 10 l 15.1875 10 l 15.1875 9 l 14.9375 9.395844 14.630203 9.692719 14.265625 9.890625 c 13.901031 10.07811 13.45311 10.171875 12.921875 10.171875 c 12.244781 10.171875 11.708328 9.984375 11.3125 9.609375 c 10.916656 9.223969 10.71875 8.71875 10.71875 8.09375 c 10.71875 7.354172 10.963531 6.796875 11.453125 6.421875 c 11.95311 6.04689 12.692703 5.859375 13.671875 5.859375 c 15.1875 5.859375 l 15.1875 5.75 l 15.1875 5.250015 15.020828 4.864594 14.6875 4.59375 c 14.364578 4.322922 13.911453 4.1875 13.328125 4.1875 c 12.953125 4.1875 12.583328 4.23439 12.21875 4.328125 c 11.864578 4.421875 11.526031 4.557297 11.203125 4.734375 c 11.203125 3.734375 l 11.598953 3.57814 11.979156 3.463547 12.34375 3.390625 c 12.718735 3.317719 13.083328 3.28125 13.4375 3.28125 c 14.385406 3.28125 15.09375 3.526047 15.5625 4.015625 c 16.031235 4.505219 16.265625 5.250015 16.265625 6.25 c h
+22.859375 3.6875 m 22.859375 4.703125 l 22.546875 4.526047 22.239578 4.395844 21.9375 4.3125 c 21.635406 4.229172 21.32811 4.1875 21.015625 4.1875 c 20.307281 4.1875 19.760406 4.411469 19.375 4.859375 c 18.989578 5.296875 18.796875 5.916672 18.796875 6.71875 c 18.796875 7.520844 18.989578 8.145844 19.375 8.59375 c 19.760406 9.03125 20.307281 9.25 21.015625 9.25 c 21.32811 9.25 21.635406 9.208344 21.9375 9.125 c 22.239578 9.041672 22.546875 8.916672 22.859375 8.75 c 22.859375 9.75 l 22.557281 9.885422 22.244781 9.989594 21.921875 10.0625 c 21.598953 10.135406 21.255203 10.171875 20.890625 10.171875 c 19.901031 10.171875 19.114578 9.864594 18.53125 9.25 c 17.947906 8.625015 17.65625 7.78125 17.65625 6.71875 c 17.65625 5.656265 17.947906 4.817719 18.53125 4.203125 c 19.124985 3.588547 19.9375 3.28125 20.96875 3.28125 c 21.291656 3.28125 21.609375 3.317719 21.921875 3.390625 c 22.244781 3.453125 22.557281 3.552094 22.859375 3.6875 c h
+25.09375 0.875 m 26.171875 0.875 l 26.171875 6.265625 l 29.390625 3.4375 l 30.765625 3.4375 l 27.28125 6.5 l 30.921875 10 l 29.515625 10 l 26.171875 6.796875 l 26.171875 10 l 25.09375 10 l 25.09375 0.875 l h
+f
+0 0 1 RG 0 0 1 rg /a0 gs
+0 0 1 RG 0 0 1 rg /a0 gs
+4.84375 17.71875 m 4.84375 16.927094 4.677078 16.307297 4.34375 15.859375 c 4.020828 15.411469 3.57811 15.1875 3.015625 15.1875 c 2.442703 15.1875 1.989578 15.411469 1.65625 15.859375 c 1.333328 16.307297 1.171875 16.927094 1.171875 17.71875 c 1.171875 18.510422 1.333328 19.135422 1.65625 19.59375 c 1.989578 20.041672 2.442703 20.265625 3.015625 20.265625 c 3.57811 20.265625 4.020828 20.041672 4.34375 19.59375 c 4.677078 19.135422 4.84375 18.510422 4.84375 17.71875 c h
+1.171875 15.4375 m 1.401031 15.041672 1.6875 14.75 2.03125 14.5625 c 2.374985 14.375015 2.786453 14.28125 3.265625 14.28125 c 4.067703 14.28125 4.71875 14.598969 5.21875 15.234375 c 5.718735 15.859375 5.96875 16.687515 5.96875 17.71875 c 5.96875 18.75 5.718735 19.583344 5.21875 20.21875 c 4.71875 20.854172 4.067703 21.171875 3.265625 21.171875 c 2.786453 21.171875 2.374985 21.07811 2.03125 20.890625 c 1.6875 20.692719 1.401031 20.401047 1.171875 20.015625 c 1.171875 21 l 0.09375 21 l 0.09375 11.875 l 1.171875 11.875 l 1.171875 15.4375 l h
+8.125 11.875 m 9.203125 11.875 l 9.203125 21 l 8.125 21 l 8.125 11.875 l h
+11.015625 18.40625 m 11.015625 14.4375 l 12.09375 14.4375 l 12.09375 18.375 l 12.09375 18.989594 12.213531 19.45314 12.453125 19.765625 c 12.70311 20.078125 13.067703 20.234375 13.546875 20.234375 c 14.130203 20.234375 14.588531 20.052094 14.921875 19.6875 c 15.26561 19.312515 15.4375 18.802094 15.4375 18.15625 c 15.4375 14.4375 l 16.515625 14.4375 l 16.515625 21 l 15.4375 21 l 15.4375 19.984375 l 15.177078 20.390625 14.874985 20.692719 14.53125 20.890625 c 14.1875 21.07811 13.786453 21.171875 13.328125 21.171875 c 12.567703 21.171875 11.989578 20.9375 11.59375 20.46875 c 11.208328 20.000015 11.015625 19.3125 11.015625 18.40625 c h
+24.75 17.453125 m 24.75 17.96875 l 19.78125 17.96875 l 19.833328 18.71875 20.057281 19.286469 20.453125 19.671875 c 20.85936 20.057297 21.416656 20.25 22.125 20.25 c 22.541656 20.25 22.942703 20.203125 23.328125 20.109375 c 23.723953 20.005219 24.114578 19.848969 24.5 19.640625 c 24.5 20.671875 l 24.104156 20.828125 23.70311 20.947922 23.296875 21.03125 c 22.890625 21.124985 22.479156 21.171875 22.0625 21.171875 c 21.020828 21.171875 20.192703 20.869797 19.578125 20.265625 c 18.963531 19.651047 18.65625 18.822922 18.65625 17.78125 c 18.65625 16.708344 18.947906 15.859375 19.53125 15.234375 c 20.114578 14.598969 20.895828 14.28125 21.875 14.28125 c 22.760406 14.28125 23.458328 14.567719 23.96875 15.140625 c 24.489578 15.703125 24.75 16.473969 24.75 17.453125 c h
+23.671875 17.125 m 23.661453 16.541672 23.494781 16.072922 23.171875 15.71875 c 22.848953 15.364594 22.42186 15.1875 21.890625 15.1875 c 21.286453 15.1875 20.802078 15.35939 20.4375 15.703125 c 20.083328 16.046875 19.880203 16.526047 19.828125 17.140625 c 23.671875 17.125 l h
+f
+endstream
+endobj
+3 0 obj
+   6465
+endobj
+4 0 obj
+<< /Type /Page
+   /Parent 1 0 R
+   /Contents [ 2 0 R ]
+   /Resources <<
+      /ExtGState <<
+         /a0 << /CA 1 /ca 1 >>
+      >>
+   >>
+>>
+endobj
+1 0 obj
+<< /Type /Pages
+   /Kids [ 4 0 R ]
+   /Count 1
+   /MediaBox [ 0 0 31 22 ]
+>>
+endobj
+5 0 obj
+<< /Creator (cairographics.org)
+   /Producer (cairographics.org)
+>>
+endobj
+6 0 obj
+<< /Type /Catalog
+   /Pages 1 0 R
+>>
+endobj
+xref
+0 7
+0000000000 65535 f
+0000006788 00000 n
+0000000010 00000 n
+0000006595 00000 n
+0000006621 00000 n
+0000006887 00000 n
+0000006975 00000 n
+trailer
+<< /Size 7
+   /Root 6 0 R
+   /Info 5 0 R
+>>
+startxref
+7032
+%%EOF
diff --git a/test/text-antialias-subpixel-pdf-argb32-ref.png b/test/text-antialias-subpixel-pdf-argb32-ref.png
new file mode 100644
index 0000000..fd0e716
--- /dev/null
+++ b/test/text-antialias-subpixel-pdf-argb32-ref.png
@@ -0,0 +1,80 @@
+%PDF-1.4
+2 0 obj
+<< /Length 3 0 R
+   /Type /XObject
+   /Subtype /Form
+   /BBox [ 0 0 31 22 ]
+>>
+stream
+1 0 0 -1 0 22 cm
+1 1 1 RG 1 1 1 rg /a0 gs
+0 0 31 22 re f
+0 0 0 RG 0 0 0 rg /a0 gs
+0 0 0 RG 0 0 0 rg /a0 gs
+4.84375 6.71875 m 4.84375 5.927094 4.677078 5.307297 4.34375 4.859375 c 4.020828 4.411469 3.57811 4.1875 3.015625 4.1875 c 2.442703 4.1875 1.989578 4.411469 1.65625 4.859375 c 1.333328 5.307297 1.171875 5.927094 1.171875 6.71875 c 1.171875 7.510422 1.333328 8.135422 1.65625 8.59375 c 1.989578 9.041672 2.442703 9.265625 3.015625 9.265625 c 3.57811 9.265625 4.020828 9.041672 4.34375 8.59375 c 4.677078 8.135422 4.84375 7.510422 4.84375 6.71875 c h
+1.171875 4.4375 m 1.401031 4.041672 1.6875 3.75 2.03125 3.5625 c 2.374985 3.375015 2.786453 3.28125 3.265625 3.28125 c 4.067703 3.28125 4.71875 3.598969 5.21875 4.234375 c 5.718735 4.859375 5.96875 5.687515 5.96875 6.71875 c 5.96875 7.75 5.718735 8.583344 5.21875 9.21875 c 4.71875 9.854172 4.067703 10.171875 3.265625 10.171875 c 2.786453 10.171875 2.374985 10.07811 2.03125 9.890625 c 1.6875 9.692719 1.401031 9.401047 1.171875 9.015625 c 1.171875 10 l 0.09375 10 l 0.09375 0.875 l 1.171875 0.875 l 1.171875 4.4375 l h
+8.125 0.875 m 9.203125 0.875 l 9.203125 10 l 8.125 10 l 8.125 0.875 l h
+14.109375 6.703125 m 13.244781 6.703125 12.64061 6.802094 12.296875 7 c 11.963531 7.197922 11.796875 7.536469 11.796875 8.015625 c 11.796875 8.401047 11.921875 8.708344 12.171875 8.9375 c 12.432281 9.15625 12.776031 9.265625 13.203125 9.265625 c 13.807281 9.265625 14.286453 9.057297 14.640625 8.640625 c 15.005203 8.213547 15.1875 7.645844 15.1875 6.9375 c 15.1875 6.703125 l 14.109375 6.703125 l h
+16.265625 6.25 m 16.265625 10 l 15.1875 10 l 15.1875 9 l 14.9375 9.395844 14.630203 9.692719 14.265625 9.890625 c 13.901031 10.07811 13.45311 10.171875 12.921875 10.171875 c 12.244781 10.171875 11.708328 9.984375 11.3125 9.609375 c 10.916656 9.223969 10.71875 8.71875 10.71875 8.09375 c 10.71875 7.354172 10.963531 6.796875 11.453125 6.421875 c 11.95311 6.04689 12.692703 5.859375 13.671875 5.859375 c 15.1875 5.859375 l 15.1875 5.75 l 15.1875 5.250015 15.020828 4.864594 14.6875 4.59375 c 14.364578 4.322922 13.911453 4.1875 13.328125 4.1875 c 12.953125 4.1875 12.583328 4.23439 12.21875 4.328125 c 11.864578 4.421875 11.526031 4.557297 11.203125 4.734375 c 11.203125 3.734375 l 11.598953 3.57814 11.979156 3.463547 12.34375 3.390625 c 12.718735 3.317719 13.083328 3.28125 13.4375 3.28125 c 14.385406 3.28125 15.09375 3.526047 15.5625 4.015625 c 16.031235 4.505219 16.265625 5.250015 16.265625 6.25 c h
+22.859375 3.6875 m 22.859375 4.703125 l 22.546875 4.526047 22.239578 4.395844 21.9375 4.3125 c 21.635406 4.229172 21.32811 4.1875 21.015625 4.1875 c 20.307281 4.1875 19.760406 4.411469 19.375 4.859375 c 18.989578 5.296875 18.796875 5.916672 18.796875 6.71875 c 18.796875 7.520844 18.989578 8.145844 19.375 8.59375 c 19.760406 9.03125 20.307281 9.25 21.015625 9.25 c 21.32811 9.25 21.635406 9.208344 21.9375 9.125 c 22.239578 9.041672 22.546875 8.916672 22.859375 8.75 c 22.859375 9.75 l 22.557281 9.885422 22.244781 9.989594 21.921875 10.0625 c 21.598953 10.135406 21.255203 10.171875 20.890625 10.171875 c 19.901031 10.171875 19.114578 9.864594 18.53125 9.25 c 17.947906 8.625015 17.65625 7.78125 17.65625 6.71875 c 17.65625 5.656265 17.947906 4.817719 18.53125 4.203125 c 19.124985 3.588547 19.9375 3.28125 20.96875 3.28125 c 21.291656 3.28125 21.609375 3.317719 21.921875 3.390625 c 22.244781 3.453125 22.557281 3.552094 22.859375 3.6875 c h
+25.09375 0.875 m 26.171875 0.875 l 26.171875 6.265625 l 29.390625 3.4375 l 30.765625 3.4375 l 27.28125 6.5 l 30.921875 10 l 29.515625 10 l 26.171875 6.796875 l 26.171875 10 l 25.09375 10 l 25.09375 0.875 l h
+f
+0 0 1 RG 0 0 1 rg /a0 gs
+0 0 1 RG 0 0 1 rg /a0 gs
+4.84375 17.71875 m 4.84375 16.927094 4.677078 16.307297 4.34375 15.859375 c 4.020828 15.411469 3.57811 15.1875 3.015625 15.1875 c 2.442703 15.1875 1.989578 15.411469 1.65625 15.859375 c 1.333328 16.307297 1.171875 16.927094 1.171875 17.71875 c 1.171875 18.510422 1.333328 19.135422 1.65625 19.59375 c 1.989578 20.041672 2.442703 20.265625 3.015625 20.265625 c 3.57811 20.265625 4.020828 20.041672 4.34375 19.59375 c 4.677078 19.135422 4.84375 18.510422 4.84375 17.71875 c h
+1.171875 15.4375 m 1.401031 15.041672 1.6875 14.75 2.03125 14.5625 c 2.374985 14.375015 2.786453 14.28125 3.265625 14.28125 c 4.067703 14.28125 4.71875 14.598969 5.21875 15.234375 c 5.718735 15.859375 5.96875 16.687515 5.96875 17.71875 c 5.96875 18.75 5.718735 19.583344 5.21875 20.21875 c 4.71875 20.854172 4.067703 21.171875 3.265625 21.171875 c 2.786453 21.171875 2.374985 21.07811 2.03125 20.890625 c 1.6875 20.692719 1.401031 20.401047 1.171875 20.015625 c 1.171875 21 l 0.09375 21 l 0.09375 11.875 l 1.171875 11.875 l 1.171875 15.4375 l h
+8.125 11.875 m 9.203125 11.875 l 9.203125 21 l 8.125 21 l 8.125 11.875 l h
+11.015625 18.40625 m 11.015625 14.4375 l 12.09375 14.4375 l 12.09375 18.375 l 12.09375 18.989594 12.213531 19.45314 12.453125 19.765625 c 12.70311 20.078125 13.067703 20.234375 13.546875 20.234375 c 14.130203 20.234375 14.588531 20.052094 14.921875 19.6875 c 15.26561 19.312515 15.4375 18.802094 15.4375 18.15625 c 15.4375 14.4375 l 16.515625 14.4375 l 16.515625 21 l 15.4375 21 l 15.4375 19.984375 l 15.177078 20.390625 14.874985 20.692719 14.53125 20.890625 c 14.1875 21.07811 13.786453 21.171875 13.328125 21.171875 c 12.567703 21.171875 11.989578 20.9375 11.59375 20.46875 c 11.208328 20.000015 11.015625 19.3125 11.015625 18.40625 c h
+24.75 17.453125 m 24.75 17.96875 l 19.78125 17.96875 l 19.833328 18.71875 20.057281 19.286469 20.453125 19.671875 c 20.85936 20.057297 21.416656 20.25 22.125 20.25 c 22.541656 20.25 22.942703 20.203125 23.328125 20.109375 c 23.723953 20.005219 24.114578 19.848969 24.5 19.640625 c 24.5 20.671875 l 24.104156 20.828125 23.70311 20.947922 23.296875 21.03125 c 22.890625 21.124985 22.479156 21.171875 22.0625 21.171875 c 21.020828 21.171875 20.192703 20.869797 19.578125 20.265625 c 18.963531 19.651047 18.65625 18.822922 18.65625 17.78125 c 18.65625 16.708344 18.947906 15.859375 19.53125 15.234375 c 20.114578 14.598969 20.895828 14.28125 21.875 14.28125 c 22.760406 14.28125 23.458328 14.567719 23.96875 15.140625 c 24.489578 15.703125 24.75 16.473969 24.75 17.453125 c h
+23.671875 17.125 m 23.661453 16.541672 23.494781 16.072922 23.171875 15.71875 c 22.848953 15.364594 22.42186 15.1875 21.890625 15.1875 c 21.286453 15.1875 20.802078 15.35939 20.4375 15.703125 c 20.083328 16.046875 19.880203 16.526047 19.828125 17.140625 c 23.671875 17.125 l h
+f
+endstream
+endobj
+3 0 obj
+   6465
+endobj
+4 0 obj
+<< /Type /Page
+   /Parent 1 0 R
+   /Contents [ 2 0 R ]
+   /Resources <<
+      /ExtGState <<
+         /a0 << /CA 1 /ca 1 >>
+      >>
+   >>
+>>
+endobj
+1 0 obj
+<< /Type /Pages
+   /Kids [ 4 0 R ]
+   /Count 1
+   /MediaBox [ 0 0 31 22 ]
+>>
+endobj
+5 0 obj
+<< /Creator (cairographics.org)
+   /Producer (cairographics.org)
+>>
+endobj
+6 0 obj
+<< /Type /Catalog
+   /Pages 1 0 R
+>>
+endobj
+xref
+0 7
+0000000000 65535 f
+0000006788 00000 n
+0000000010 00000 n
+0000006595 00000 n
+0000006621 00000 n
+0000006887 00000 n
+0000006975 00000 n
+trailer
+<< /Size 7
+   /Root 6 0 R
+   /Info 5 0 R
+>>
+startxref
+7032
+%%EOF


More information about the cairo-commit mailing list