author | sandman <sandman> | 2002-05-23 23:51:52 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-05-23 23:51:52 (UTC) |
commit | 2f3bb7b07f833273d966d41813e68bfe8b9d8d76 (patch) (unidiff) | |
tree | 00beb1bd9e7f4ba79e22334a0d258269b28f4564 /noncore/unsupported/qpdf/xpdf/GfxFont.h | |
parent | 6e82b45dd416ceeba78765717b700e853c96a137 (diff) | |
download | opie-2f3bb7b07f833273d966d41813e68bfe8b9d8d76.zip opie-2f3bb7b07f833273d966d41813e68bfe8b9d8d76.tar.gz opie-2f3bb7b07f833273d966d41813e68bfe8b9d8d76.tar.bz2 |
Port to xpdf 1.01
Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/GfxFont.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/xpdf/GfxFont.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/GfxFont.h b/noncore/unsupported/qpdf/xpdf/GfxFont.h index b1aa952..8e9fe38 100644 --- a/noncore/unsupported/qpdf/xpdf/GfxFont.h +++ b/noncore/unsupported/qpdf/xpdf/GfxFont.h | |||
@@ -2,7 +2,7 @@ | |||
2 | // | 2 | // |
3 | // GfxFont.h | 3 | // GfxFont.h |
4 | // | 4 | // |
5 | // Copyright 1996-2001 Derek B. Noonburg | 5 | // Copyright 1996-2002 Glyph & Cog, LLC |
6 | // | 6 | // |
7 | //======================================================================== | 7 | //======================================================================== |
8 | 8 | ||
@@ -113,8 +113,7 @@ public: | |||
113 | 113 | ||
114 | // Get the PostScript font name for the embedded font. Returns | 114 | // Get the PostScript font name for the embedded font. Returns |
115 | // NULL if there is no embedded font. | 115 | // NULL if there is no embedded font. |
116 | char *getEmbeddedFontName() | 116 | GString *getEmbeddedFontName() { return embFontName; } |
117 | { return embFontName ? embFontName->getCString() : (char *)NULL; } | ||
118 | 117 | ||
119 | // Get the name of the external font file. Returns NULL if there | 118 | // Get the name of the external font file. Returns NULL if there |
120 | // is no external font file. | 119 | // is no external font file. |
@@ -137,6 +136,9 @@ public: | |||
137 | fouble getAscent() { return ascent; } | 136 | fouble getAscent() { return ascent; } |
138 | fouble getDescent() { return descent; } | 137 | fouble getDescent() { return descent; } |
139 | 138 | ||
139 | // Return the writing mode (0=horizontal, 1=vertical). | ||
140 | virtual int getWMode() { return 0; } | ||
141 | |||
140 | // Read an external or embedded font file into a buffer. | 142 | // Read an external or embedded font file into a buffer. |
141 | char *readExtFontFile(int *len); | 143 | char *readExtFontFile(int *len); |
142 | char *readEmbFontFile(XRef *xref, int *len); | 144 | char *readEmbFontFile(XRef *xref, int *len); |
@@ -155,7 +157,7 @@ protected: | |||
155 | 157 | ||
156 | void readFontDescriptor(XRef *xref, Dict *fontDict); | 158 | void readFontDescriptor(XRef *xref, Dict *fontDict); |
157 | CharCodeToUnicode *readToUnicodeCMap(Dict *fontDict, int nBits); | 159 | CharCodeToUnicode *readToUnicodeCMap(Dict *fontDict, int nBits); |
158 | void GfxFont::findExtFontFile(); | 160 | void findExtFontFile(); |
159 | 161 | ||
160 | GString *tag; // PDF font tag | 162 | GString *tag; // PDF font tag |
161 | Ref id; // reference (used as unique ID) | 163 | Ref id; // reference (used as unique ID) |
@@ -166,7 +168,7 @@ protected: | |||
166 | Ref embFontID; // ref to embedded font file stream | 168 | Ref embFontID; // ref to embedded font file stream |
167 | GString *extFontFile; // external font file name | 169 | GString *extFontFile; // external font file name |
168 | fouble fontMat[6]; // font matrix (Type 3 only) | 170 | fouble fontMat[6]; // font matrix (Type 3 only) |
169 | fouble fontBBox[4]; // font bounding box | 171 | fouble fontBBox[4]; // font bounding box (Type 3 only) |
170 | fouble missingWidth; // "default" width | 172 | fouble missingWidth; // "default" width |
171 | fouble ascent; // max height above baseline | 173 | fouble ascent; // max height above baseline |
172 | fouble descent; // max depth below baseline | 174 | fouble descent; // max depth below baseline |
@@ -204,9 +206,15 @@ public: | |||
204 | // Get width of a character or string. | 206 | // Get width of a character or string. |
205 | fouble getWidth(Guchar c) { return widths[c]; } | 207 | fouble getWidth(Guchar c) { return widths[c]; } |
206 | 208 | ||
209 | // Return the Type 3 CharProc dictionary, or NULL if none. | ||
210 | Dict *getCharProcs(); | ||
211 | |||
207 | // Return the Type 3 CharProc for the character associated with <code>. | 212 | // Return the Type 3 CharProc for the character associated with <code>. |
208 | Object *getCharProc(int code, Object *proc); | 213 | Object *getCharProc(int code, Object *proc); |
209 | 214 | ||
215 | // Return the Type 3 Resources dictionary, or NULL if none. | ||
216 | Dict *getResources(); | ||
217 | |||
210 | private: | 218 | private: |
211 | 219 | ||
212 | char *enc[256]; // char code --> char name | 220 | char *enc[256]; // char code --> char name |
@@ -215,7 +223,8 @@ private: | |||
215 | CharCodeToUnicode *ctu;// char code --> Unicode | 223 | CharCodeToUnicode *ctu;// char code --> Unicode |
216 | GBool hasEncoding; | 224 | GBool hasEncoding; |
217 | fouble widths[256]; // character widths | 225 | fouble widths[256]; // character widths |
218 | Object charProcs; // Type3 CharProcs dictionary | 226 | Object charProcs; // Type 3 CharProcs dictionary |
227 | Object resources; // Type 3 Resources dictionary | ||
219 | }; | 228 | }; |
220 | 229 | ||
221 | //------------------------------------------------------------------------ | 230 | //------------------------------------------------------------------------ |
@@ -236,6 +245,9 @@ public: | |||
236 | Unicode *u, int uSize, int *uLen, | 245 | Unicode *u, int uSize, int *uLen, |
237 | fouble *dx, fouble *dy, fouble *ox, fouble *oy); | 246 | fouble *dx, fouble *dy, fouble *ox, fouble *oy); |
238 | 247 | ||
248 | // Return the writing mode (0=horizontal, 1=vertical). | ||
249 | virtual int getWMode(); | ||
250 | |||
239 | // Return the Unicode map. | 251 | // Return the Unicode map. |
240 | CharCodeToUnicode *getToUnicode(); | 252 | CharCodeToUnicode *getToUnicode(); |
241 | 253 | ||