Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdf/xpdf/GfxFont.cc
diff options
context:
space:
mode:
authorMartin Kretzschmar <mkretzschmar@src.gnome.org>2003-03-31 21:08:43 (GMT)
committer Martin Kretzschmar <mkretzschmar@src.gnome.org>2003-03-31 21:08:43 (GMT)
commit64676031423465996e83c4a685290f0c3d97a249 (patch)
treecef578bc8c300722abb3fe1693181e68895a94a7 /pdf/xpdf/GfxFont.cc
parent28c37dbcf87665a4ccec58bef9ef8ff0697022dd (diff)
kill traces of ltk, incorporate new sources
* xpdf/Makefile.am: kill traces of ltk, incorporate new sources * Makefile.am, configure.in: don't build the ltk subdir * ANNOUNCE, CHANGES, ChangeLog, README, aconf-dj.h, aconf-win32.h, dj_make.bat, ms_make.bat, vms_make.com: update * xpdf/LTKOutputDev.cc, xpdf/LTKOutputDev.h, xpdf/postscript.xbm, xpdf/xpdf-flip.ltk, xpdf/xpdf-ltk.h, xpdf/xpdf-top.ltk, xpdf/xpdf.ltk: remove. * xpdf/Annot.cc, xpdf/Annot.h, xpdf/Array.cc, xpdf/Array.h, xpdf/BuiltinFont.cc, xpdf/BuiltinFont.h, xpdf/BuiltinFontTables.cc, xpdf/CMap.cc, xpdf/CMap.h, xpdf/Catalog.cc, xpdf/Catalog.h, xpdf/CharCodeToUnicode.cc, xpdf/CharCodeToUnicode.h, xpdf/Decrypt.cc, xpdf/Decrypt.h, xpdf/Dict.cc, xpdf/Dict.h, xpdf/Error.cc, xpdf/Error.h, xpdf/FTFont.cc, xpdf/FTFont.h, xpdf/FontFile.cc, xpdf/FontFile.h, xpdf/Function.cc, xpdf/Function.h, xpdf/Gfx.cc, xpdf/Gfx.h, xpdf/GfxFont.cc, xpdf/GfxFont.h, xpdf/GfxState.cc, xpdf/GfxState.h, xpdf/GlobalParams.cc, xpdf/GlobalParams.h, xpdf/ImageOutputDev.cc, xpdf/ImageOutputDev.h, xpdf/Lexer.cc, xpdf/Lexer.h, xpdf/Link.cc, xpdf/Link.h, xpdf/NameToCharCode.cc, xpdf/NameToCharCode.h, xpdf/NameToUnicodeTable.h, xpdf/Object.cc, xpdf/Object.h, xpdf/OutputDev.cc, xpdf/OutputDev.h, xpdf/PBMOutputDev.cc, xpdf/PBMOutputDev.h, xpdf/PDFDoc.cc, xpdf/PDFDoc.h, xpdf/PSOutputDev.cc, xpdf/PSOutputDev.h, xpdf/PSTokenizer.cc, xpdf/PSTokenizer.h, xpdf/Page.cc, xpdf/Page.h, xpdf/Parser.cc, xpdf/Parser.h, xpdf/SFont.cc, xpdf/SFont.h, xpdf/Stream.cc, xpdf/Stream.h, xpdf/T1Font.cc, xpdf/T1Font.h, xpdf/TTFont.cc, xpdf/TTFont.h, xpdf/TextOutputDev.cc, xpdf/TextOutputDev.h, xpdf/UnicodeMap.cc, xpdf/UnicodeMap.h, xpdf/XOutputDev.cc, xpdf/XOutputDev.h, xpdf/XRef.cc, xpdf/XRef.h, xpdf/config.h, xpdf/pdffonts.cc, xpdf/pdfimages.cc, xpdf/pdfinfo.cc, xpdf/pdftopbm.cc, xpdf/pdftops.cc, xpdf/pdftotext.cc, xpdf/vms_make.com, xpdf/xpdf.cc: update. * goo/GHash.cc, goo/GHash.h, goo/GList.cc, goo/GList.h, goo/GString.cc, goo/GString.h: mostly Mac OS X gcc fixage. * doc/pdffonts.1, doc/pdffonts.cat, doc/pdffonts.hlp, doc/pdfimages.1, doc/pdfimages.cat, doc/pdfimages.hlp, doc/pdfinfo.1, doc/pdfinfo.cat, doc/pdfinfo.hlp, doc/pdftopbm.1, doc/pdftopbm.cat, doc/pdftopbm.hlp, doc/pdftops.1, doc/pdftops.cat, doc/pdftops.hlp, doc/pdftotext.1, doc/pdftotext.cat, doc/pdftotext.hlp, doc/xpdf.1, doc/xpdf.cat, doc/xpdf.hlp, doc/xpdfrc.5, doc/xpdfrc.cat, doc/xpdfrc.hlp: update docs.
Diffstat (limited to 'pdf/xpdf/GfxFont.cc')
-rw-r--r--pdf/xpdf/GfxFont.cc24
1 files changed, 18 insertions, 6 deletions
diff --git a/pdf/xpdf/GfxFont.cc b/pdf/xpdf/GfxFont.cc
index 8dcd8e7..5acb845 100644
--- a/pdf/xpdf/GfxFont.cc
+++ b/pdf/xpdf/GfxFont.cc
@@ -6,11 +6,12 @@
//
//========================================================================
-#ifdef __GNUC__
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
#pragma implementation
#endif
-#include <aconf.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -564,8 +565,9 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
if (!baseEnc) {
if (builtinFont) {
baseEnc = builtinFont->defaultBaseEnc;
+ hasEncoding = gTrue;
} else if (type == fontTrueType) {
- baseEnc = macRomanEncoding;
+ baseEnc = winAnsiEncoding;
} else {
baseEnc = standardEncoding;
}
@@ -1240,21 +1242,31 @@ GString *GfxCIDFont::getCollection() {
GfxFontDict::GfxFontDict(XRef *xref, Dict *fontDict) {
int i;
Object obj1, obj2;
+ Ref r;
numFonts = fontDict->getLength();
fonts = (GfxFont **)gmalloc(numFonts * sizeof(GfxFont *));
for (i = 0; i < numFonts; ++i) {
fontDict->getValNF(i, &obj1);
obj1.fetch(xref, &obj2);
- if (obj1.isRef() && obj2.isDict()) {
+ if (obj2.isDict()) {
+ if (obj1.isRef()) {
+ r = obj1.getRef();
+ } else {
+ // no indirect reference for this font, so invent a unique one
+ // (legal generation numbers are five digits, so any 6-digit
+ // number would be safe)
+ r.num = i;
+ r.gen = 999999;
+ }
fonts[i] = GfxFont::makeFont(xref, fontDict->getKey(i),
- obj1.getRef(), obj2.getDict());
+ r, obj2.getDict());
if (fonts[i] && !fonts[i]->isOk()) {
delete fonts[i];
fonts[i] = NULL;
}
} else {
- error(-1, "font resource is not a dictionary reference");
+ error(-1, "font resource is not a dictionary");
fonts[i] = NULL;
}
obj1.free();