diff options
-rw-r--r-- | poppler/GfxFont.cc | 2 | ||||
-rw-r--r-- | poppler/GfxFont.h | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc index 9cfa4f94..9ae54e6a 100644 --- a/poppler/GfxFont.cc +++ b/poppler/GfxFont.cc @@ -2054,7 +2054,7 @@ GfxFontDict::GfxFontDict(XRef *xref, Ref *fontDictRef, Dict *fontDict) { // NULL and !isOk() so that when we do lookups // we can tell the difference between a missing font // and a font that is just !isOk() - delete fonts[i]; + fonts[i]->decRefCnt(); fonts[i] = NULL; } } else { diff --git a/poppler/GfxFont.h b/poppler/GfxFont.h index 75a35d25..55f8692e 100644 --- a/poppler/GfxFont.h +++ b/poppler/GfxFont.h @@ -135,8 +135,6 @@ public: GfxFont(char *tagA, Ref idA, GooString *nameA); - virtual ~GfxFont(); - GBool isOk() { return ok; } void incRefCnt(); @@ -229,6 +227,8 @@ public: DisplayFontParam *dfp; protected: + virtual ~GfxFont(); + void readFontDescriptor(XRef *xref, Dict *fontDict); CharCodeToUnicode *readToUnicodeCMap(Dict *fontDict, int nBits, CharCodeToUnicode *ctu); @@ -265,8 +265,6 @@ public: Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GooString *nameA, GfxFontType typeA, Dict *fontDict); - virtual ~Gfx8BitFont(); - virtual int getNextChar(char *s, int len, CharCode *code, Unicode **u, int *uLen, double *dx, double *dy, double *ox, double *oy); @@ -303,6 +301,7 @@ public: Dict *getResources(); private: + virtual ~Gfx8BitFont(); char *enc[256]; // char code --> char name char encFree[256]; // boolean for each char name: if set, @@ -325,8 +324,6 @@ public: GfxCIDFont(XRef *xref, char *tagA, Ref idA, GooString *nameA, Dict *fontDict); - virtual ~GfxCIDFont(); - virtual GBool isCIDFont() { return gTrue; } virtual int getNextChar(char *s, int len, CharCode *code, @@ -352,6 +349,8 @@ public: double getWidth(char* s, int len); private: + virtual ~GfxCIDFont(); + Gushort mapCodeToGID(FoFiTrueType *ff, int cmapi, Unicode unicode, GBool wmode); |