[PATCH] Ensure cairo renders Type 3 glyphs with only the fill color

Adrian Johnson ajohnson at redneon.com
Sun Jun 8 01:30:05 PDT 2008


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


--------------070601050601070704030503--


More information about the poppler mailing list