From 65517741888cae83c2dc2c59de9233db6729d029 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sat, 22 Nov 2008 21:48:37 +1030 Subject: [PATCH] Don't compare print flag for non Type 3 fonts in cairo font cache --- poppler/CairoFontEngine.cc | 7 ++++++- poppler/CairoFontEngine.h | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc index a45d76d..3c34fc5 100644 --- a/poppler/CairoFontEngine.cc +++ b/poppler/CairoFontEngine.cc @@ -79,7 +79,7 @@ CairoFont::~CairoFont() { GBool CairoFont::matches(Ref &other, GBool printingA) { - return (other.num == ref.num && other.gen == ref.gen && printing == printingA); + return (other.num == ref.num && other.gen == ref.gen); } cairo_font_face_t * @@ -704,6 +704,11 @@ CairoType3Font::CairoType3Font(Ref ref, CairoType3Font::~CairoType3Font() { } +GBool +CairoType3Font::matches(Ref &other, GBool printingA) { + return (other.num == ref.num && other.gen == ref.gen && printing == printingA); +} + //------------------------------------------------------------------------ // CairoFontEngine diff --git a/poppler/CairoFontEngine.h b/poppler/CairoFontEngine.h index 7088357..f156cab 100644 --- a/poppler/CairoFontEngine.h +++ b/poppler/CairoFontEngine.h @@ -50,7 +50,7 @@ public: GBool printing); virtual ~CairoFont(); - GBool matches(Ref &other, GBool printing); + virtual GBool matches(Ref &other, GBool printing); cairo_font_face_t *getFontFace(void); unsigned long getGlyph(CharCode code, Unicode *u, int uLen); double getSubstitutionCorrection(GfxFont *gfxFont); @@ -89,6 +89,8 @@ public: GBool printing); virtual ~CairoType3Font(); + virtual GBool matches(Ref &other, GBool printing); + private: CairoType3Font(Ref ref, XRef *xref, Catalog *catalog, cairo_font_face_t *cairo_font_face, -- 1.5.6.3