This pdf from the cairo test suite demonstrates the problem:

http://annarchy.freedesktop.org/~ajohnson/user-font-pdf-argb32-out.pdf

That pdf works correctly with the splash renderer so i don't see why a patch on Gfx.cc is needed, i'd say a patch for the cairo renderer is needed.

Attaching a new patch for the cairo renderer to fix the bug.

>From f1084249785b56f10f97cc23b5f03382e2217bf7 Mon Sep 17 00:00:00 2001
From: Adrian Johnson <[EMAIL PROTECTED]>
Date: Sun, 8 Jun 2008 18:00:05 +0930
Subject: [PATCH] Ensure cairo renders Type 3 glyphs with only the fill color

---
 poppler/CairoOutputDev.cc |    3 +++
 poppler/CairoOutputDev.h  |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index 57c3ac5..05fe1a8 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -616,10 +616,13 @@ GBool CairoOutputDev::beginType3Char(GfxState *state, double x, double y,
     cairo_set_matrix(cairo_shape, &orig_matrix);
     cairo_transform(cairo_shape, &matrix);
   }
+  old_stroke_pattern = stroke_pattern;
+  stroke_pattern = fill_pattern;
   return gFalse;
 }
 
 void CairoOutputDev::endType3Char(GfxState *state) {
+  stroke_pattern = old_stroke_pattern;
   cairo_restore (cairo);
   if (cairo_shape) {
     cairo_restore (cairo_shape);
diff --git a/poppler/CairoOutputDev.h b/poppler/CairoOutputDev.h
index 5d2b658..f6f9e13 100644
--- a/poppler/CairoOutputDev.h
+++ b/poppler/CairoOutputDev.h
@@ -199,7 +199,7 @@ protected:
   void doPath(cairo_t *cairo, GfxState *state, GfxPath *path);
   
   GfxRGB fill_color, stroke_color;
-  cairo_pattern_t *fill_pattern, *stroke_pattern;
+  cairo_pattern_t *fill_pattern, *stroke_pattern, *old_stroke_pattern;
   double fill_opacity;
   double stroke_opacity;
   CairoFont *currentFont;
-- 
1.5.2.4

_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to