diff options
author | Martin Kretzschmar <mkretzschmar@src.gnome.org> | 2003-04-01 19:47:11 (GMT) |
---|---|---|
committer | Martin Kretzschmar <mkretzschmar@src.gnome.org> | 2003-04-01 19:47:11 (GMT) |
commit | 7c5ab64d4db75e4bb6dadedb578e10178554d0db (patch) | |
tree | 595854215de7ef2d85e6c624e804966c54eb422c /pdf/xpdf/GlobalParams.cc | |
parent | bfd0b848c8c81ab10698f74b77f9f0904c3161e1 (diff) |
Merge with Xpdf 2.02 and make it build
Diffstat (limited to 'pdf/xpdf/GlobalParams.cc')
-rw-r--r-- | pdf/xpdf/GlobalParams.cc | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/pdf/xpdf/GlobalParams.cc b/pdf/xpdf/GlobalParams.cc index ded583f..c5083b2 100644 --- a/pdf/xpdf/GlobalParams.cc +++ b/pdf/xpdf/GlobalParams.cc @@ -2,7 +2,7 @@ // // GlobalParams.cc // -// Copyright 2001-2002 Glyph & Cog, LLC +// Copyright 2001-2003 Glyph & Cog, LLC // //======================================================================== @@ -353,6 +353,12 @@ void GlobalParams::parseFile(GString *fileName, FILE *f) { } else if (!cmd->cmp("displayCIDFontT1")) { parseDisplayFont(tokens, displayCIDFonts, displayFontT1, fileName, line); + } else if (!cmd->cmp("displayNamedCIDFontTT")) { + parseDisplayFont(tokens, displayNamedCIDFonts, + displayFontTT, fileName, line); + } else if (!cmd->cmp("displayCIDFontTT")) { + parseDisplayFont(tokens, displayCIDFonts, + displayFontTT, fileName, line); } else if (!cmd->cmp("psFile")) { parsePSFile(tokens, fileName, line); } else if (!cmd->cmp("psFont")) { @@ -1061,26 +1067,17 @@ GBool GlobalParams::getTextKeepTinyChars() { return tiny; } -GString *GlobalParams::findFontFile(GString *fontName, - char *ext1, char *ext2) { +GString *GlobalParams::findFontFile(GString *fontName, char **exts) { GString *dir, *fileName; + char **ext; FILE *f; int i; for (i = 0; i < fontDirs->getLength(); ++i) { dir = (GString *)fontDirs->get(i); - if (ext1) { - fileName = appendToPath(dir->copy(), fontName->getCString()); - fileName->append(ext1); - if ((f = fopen(fileName->getCString(), "r"))) { - fclose(f); - return fileName; - } - delete fileName; - } - if (ext2) { + for (ext = exts; *ext; ++ext) { fileName = appendToPath(dir->copy(), fontName->getCString()); - fileName->append(ext2); + fileName->append(*ext); if ((f = fopen(fileName->getCString(), "r"))) { fclose(f); return fileName; @@ -1218,7 +1215,9 @@ void GlobalParams::setPSFile(char *file) { GBool GlobalParams::setPSPaperSize(char *size) { globalParamsLock; - if (!strcmp(size, "letter")) { + if (!strcmp(size, "match")) { + psPaperWidth = psPaperHeight = -1; + } else if (!strcmp(size, "letter")) { psPaperWidth = 612; psPaperHeight = 792; } else if (!strcmp(size, "legal")) { |