fixed font bug
authorMatthias Kramm <kramm@quiss.org>
Thu, 6 May 2010 00:11:20 +0000 (17:11 -0700)
committerMatthias Kramm <kramm@quiss.org>
Thu, 6 May 2010 00:11:20 +0000 (17:11 -0700)
lib/gfxfont.c
lib/gfxfont.h
lib/pdf/InfoOutputDev.cc
lib/pdf/InfoOutputDev.h

index fa75059..e6f96cb 100644 (file)
@@ -143,7 +143,7 @@ static int errorno = 0;
 
 //#define DEBUG 1
 
-gfxfont_t* gfxfont_load(char*id, char*filename, unsigned int flags, double quality)
+gfxfont_t* gfxfont_load(const char*id, const char*filename, unsigned int flags, double quality)
 {
     FT_Face face;
     FT_Error error;
index a553ea4..0c18a56 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 
 /* The quality parameter is given by 1 divided by the zoom factor at which the font
    still looks good. 1=normal, 0.5=double resolution etc. */
-gfxfont_t* gfxfont_load(char*id, char*filename, unsigned int flags, double quality);
+gfxfont_t* gfxfont_load(const char*id, const char*filename, unsigned int flags, double quality);
 void gfxfont_save(gfxfont_t*font, const char*filename);
 void gfxfont_save_eot(gfxfont_t*font, const char*filename);
 void gfxfont_fix_unicode(gfxfont_t*font);
index 83dd43f..8fb751a 100644 (file)
@@ -544,6 +544,16 @@ void InfoOutputDev::endType3Char(GfxState *state)
     currentglyph->path->lineTo(x1,y2);
     currentglyph->path->close();
 }
+    
+void InfoOutputDev::saveState(GfxState *state)
+{
+    updateAll(state);
+}
+
+void InfoOutputDev::restoreState(GfxState *state)
+{
+    updateAll(state);
+}
 
 void InfoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
                           int width, int height, GBool invert,
index 66958da..4198b7d 100644 (file)
@@ -122,6 +122,9 @@ class InfoOutputDev: public OutputDev
     virtual void drawLink(Link *link, Catalog *catalog);
     virtual double getMaximumFontSize(char*id);
     virtual void updateFont(GfxState *state);
+  
+    virtual void saveState(GfxState *state);
+    virtual void restoreState(GfxState *state);
 
     virtual GBool beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen);
     virtual void type3D0(GfxState *state, double wx, double wy);