Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf/xpdf/FontFile.h
diff options
context:
space:
mode:
Diffstat (limited to 'pdf/xpdf/FontFile.h')
-rw-r--r--pdf/xpdf/FontFile.h38
1 files changed, 23 insertions, 15 deletions
diff --git a/pdf/xpdf/FontFile.h b/pdf/xpdf/FontFile.h
index 7293992..a71653c 100644
--- a/pdf/xpdf/FontFile.h
+++ b/pdf/xpdf/FontFile.h
@@ -2,7 +2,7 @@
//
// FontFile.h
//
-// Copyright 1999-2002 Glyph & Cog, LLC
+// Copyright 1999-2003 Glyph & Cog, LLC
//
//========================================================================
@@ -75,6 +75,7 @@ public:
Type1CFontFile(char *fileA, int lenA);
virtual ~Type1CFontFile();
+ GBool isOk() { return ok; }
virtual char *getName();
virtual char **getEncoding();
@@ -97,14 +98,14 @@ public:
private:
- void readNameAndEncoding();
+ void readEncoding();
void readTopDict(Type1CTopDict *dict);
void readPrivateDict(Type1CPrivateDict *privateDict,
int offset, int size);
Gushort *readCharset(int charset, int nGlyphs);
void eexecWrite(char *s);
- void eexecCvtGlyph(char *glyphName, Guchar *s, int n);
- void cvtGlyph(Guchar *s, int n);
+ void eexecCvtGlyph(char *glyphName, int pos, int n);
+ void cvtGlyph(int pos, int n, GBool top);
void cvtGlyphWidth(GBool useOp);
void eexecDumpNum(double x, GBool fpA);
void eexecDumpOp1(int opA);
@@ -112,29 +113,33 @@ private:
void eexecWriteCharstring(Guchar *s, int n);
void getDeltaInt(char *buf, char *key, double *opA, int n);
void getDeltaReal(char *buf, char *key, double *opA, int n);
- int getIndexLen(Guchar *indexPtr);
- Guchar *getIndexValPtr(Guchar *indexPtr, int i);
- Guchar *getIndexEnd(Guchar *indexPtr);
- Guint getWord(Guchar *ptr, int size);
- double getNum(Guchar **ptr, GBool *fp);
+ int getIndexLen(int indexPos);
+ int getIndexValPos(int indexPos, int i, int *valLen);
+ int getIndexEnd(int indexPos);
+ Guint getWord(int pos, int size);
+ double getNum(int *pos, GBool *fp);
char *getString(int sid, char *buf);
- char *file;
+ Guchar *file;
int len;
GString *name;
char **encoding;
- int topOffSize;
- Guchar *topDictIdxPtr;
- Guchar *stringIdxPtr;
- Guchar *gsubrIdxPtr;
+ int topDictIdxPos;
+ int stringIdxPos;
+ int gsubrIdxPos;
+ int subrIdxPos;
+ int gsubrBias;
+ int subrBias;
FontFileOutputFunc outputFunc;
void *outputStream;
double op[48]; // operands
GBool fp[48]; // true if operand is fixed point
int nOps; // number of operands
+ int nHints; // number of hints for the current glyph
+ GBool firstOp; // true if we haven't hit the first op yet
double defaultWidthX; // default glyph width
double nominalWidthX; // nominal glyph width
GBool defaultWidthXFP; // true if defaultWidthX is fixed point
@@ -142,6 +147,8 @@ private:
Gushort r1; // eexec encryption key
GString *charBuf; // charstring output buffer
int line; // number of eexec chars on current line
+
+ GBool ok;
};
//------------------------------------------------------------------------
@@ -171,6 +178,7 @@ public:
void convertToType42(char *name, char **encodingA,
CharCodeToUnicode *toUnicode,
GBool pdfFontHasEncoding,
+ GBool pdfFontIsSymbolic,
FontFileOutputFunc outputFunc, void *outputStream);
// Convert to a Type 2 CIDFont, suitable for embedding in a
@@ -217,7 +225,7 @@ private:
void cvtEncoding(char **encodingA, GBool pdfFontHasEncoding,
FontFileOutputFunc outputFunc, void *outputStream);
void cvtCharStrings(char **encodingA, CharCodeToUnicode *toUnicode,
- GBool pdfFontHasEncoding,
+ GBool pdfFontHasEncoding, GBool pdfFontIsSymbolic,
FontFileOutputFunc outputFunc, void *outputStream);
int getCmapEntry(int cmapFmt, int pos, int code);
void cvtSfnts(FontFileOutputFunc outputFunc, void *outputStream,