From d743821ec3b71e00af5dc5541d4e7bf5b003c55e Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sun, 24 Apr 2022 03:42:26 +0000 Subject: xpdf 4.04 git-svn-id: svn://tug.org/texlive/trunk@63119 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc | 82 ++++++++++++++++++++-- 1 file changed, 75 insertions(+), 7 deletions(-) (limited to 'Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc') diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc index 5ff932479d1..e7cc594b12d 100644 --- a/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc +++ b/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc @@ -5,9 +5,6 @@ // Copyright 2001-2003 Glyph & Cog, LLC // //======================================================================== -// Modified for TeX Live by Peter Breitenlohner -// See top-level ChangeLog for a list of all modifications -//======================================================================== #include @@ -219,7 +216,7 @@ GString *SysFontInfo::mungeName1(GString *in) { return out; } -// Remove trailing "Identity-H"/"Identity-V" from the name. +// Remove trailing encoding tags from the name. // Split the name into tokens at space/comma/dash/underscore. // Remove trailing "MT" or "BT" from tokens. // Remove trailing "PS" and "WGL4" from tokens. @@ -229,7 +226,9 @@ GString *SysFontInfo::mungeName2(GString *in) { GString *out = new GString(); char *p0 = in->getCString(); while (*p0) { - if (!strcmp(p0, "Identity-H") || !strcmp(p0, "Identity-V")) { + if (!strcmp(p0, "Identity-H") || !strcmp(p0, "Identity-V") || + !strcmp(p0, "GB2312") || + !strcmp(p0, "UniGB-UCS2-H") || !strcmp(p0, "UniGB-UCS2-V")) { break; } char *p1; @@ -729,6 +728,7 @@ GlobalParams::GlobalParams(const char *cfgFileName) { disableFreeTypeHinting = gFalse; antialias = gTrue; vectorAntialias = gTrue; + imageMaskAntialias = gTrue; antialiasPrinting = gFalse; strokeAdjust = strokeAdjustNormal; screenType = screenUnset; @@ -741,6 +741,7 @@ GlobalParams::GlobalParams(const char *cfgFileName) { enablePathSimplification = gFalse; drawAnnotations = gTrue; drawFormFields = gTrue; + enableXFA = gTrue; overprintPreview = gFalse; paperColor = new GString("#ffffff"); matteColor = new GString("#808080"); @@ -753,11 +754,14 @@ GlobalParams::GlobalParams(const char *cfgFileName) { mapNumericCharNames = gTrue; mapUnknownCharNames = gFalse; mapExtTrueTypeFontsViaUnicode = gTrue; + useTrueTypeUnicodeMapping = gFalse; droppedFonts = new GHash(gTrue); createDefaultKeyBindings(); popupMenuCmds = new GList(); tabStateFile = appendToPath(getHomeDir(), ".xpdf.tab-state"); + savePageNumbers = gTrue; printCommands = gFalse; + printStatusInfo = gFalse; errQuiet = gFalse; debugLogFile = NULL; @@ -1186,6 +1190,9 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) { } else if (!cmd->cmp("vectorAntialias")) { parseYesNo("vectorAntialias", &vectorAntialias, tokens, fileName, line); + } else if (!cmd->cmp("imageMaskAntialias")) { + parseYesNo("imageMaskAntialias", &imageMaskAntialias, + tokens, fileName, line); } else if (!cmd->cmp("antialiasPrinting")) { parseYesNo("antialiasPrinting", &antialiasPrinting, tokens, fileName, line); @@ -1219,6 +1226,9 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) { } else if (!cmd->cmp("drawFormFields")) { parseYesNo("drawFormFields", &drawFormFields, tokens, fileName, line); + } else if (!cmd->cmp("enableXFA")) { + parseYesNo("enableXFA", &enableXFA, + tokens, fileName, line); } else if (!cmd->cmp("overprintPreview")) { parseYesNo("overprintPreview", &overprintPreview, tokens, fileName, line); @@ -1250,6 +1260,10 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) { parseYesNo("mapExtTrueTypeFontsViaUnicode", &mapExtTrueTypeFontsViaUnicode, tokens, fileName, line); + } else if (!cmd->cmp("useTrueTypeUnicodeMapping")) { + parseYesNo("useTrueTypeUnicodeMapping", + &useTrueTypeUnicodeMapping, + tokens, fileName, line); } else if (!cmd->cmp("dropFont")) { parseDropFont(tokens, fileName, line); } else if (!cmd->cmp("bind")) { @@ -1260,8 +1274,12 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) { parsePopupMenuCmd(tokens, fileName, line); } else if (!cmd->cmp("tabStateFile")) { parseString("tabStateFile", &tabStateFile, tokens, fileName, line); + } else if (!cmd->cmp("savePageNumbers")) { + parseYesNo("savePageNumbers", &savePageNumbers, tokens, fileName, line); } else if (!cmd->cmp("printCommands")) { parseYesNo("printCommands", &printCommands, tokens, fileName, line); + } else if (!cmd->cmp("printStatusInfo")) { + parseYesNo("printStatusInfo", &printStatusInfo, tokens, fileName, line); } else if (!cmd->cmp("errQuiet")) { parseYesNo("errQuiet", &errQuiet, tokens, fileName, line); } else if (!cmd->cmp("debugLogFile")) { @@ -1281,8 +1299,6 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) { } else if (!cmd->cmp("fontpath") || !cmd->cmp("fontmap")) { error(errConfig, -1, "The config file format has changed since Xpdf 0.9x"); - } else if (!cmd->cmp("enableXFA")) { - error(errConfig, -1, "The enableXFA option is no longer used"); } } } @@ -2115,6 +2131,7 @@ GlobalParams::~GlobalParams() { deleteGList(keyBindings, KeyBinding); deleteGList(popupMenuCmds, PopupMenuCmd); delete tabStateFile; + delete debugLogFile; cMapDirs->startIter(&iter); while (cMapDirs->getNext(&iter, &key, (void **)&list)) { @@ -3060,6 +3077,15 @@ GBool GlobalParams::getVectorAntialias() { return f; } +GBool GlobalParams::getImageMaskAntialias() { + GBool f; + + lockGlobalParams; + f = imageMaskAntialias; + unlockGlobalParams; + return f; +} + GBool GlobalParams::getAntialiasPrinting() { GBool f; @@ -3168,6 +3194,15 @@ GBool GlobalParams::getDrawFormFields() { return draw; } +GBool GlobalParams::getEnableXFA() { + GBool xfa; + + lockGlobalParams; + xfa = enableXFA; + unlockGlobalParams; + return xfa; +} + GString *GlobalParams::getPaperColor() { @@ -3251,6 +3286,15 @@ GBool GlobalParams::getMapExtTrueTypeFontsViaUnicode() { return map; } +GBool GlobalParams::getUseTrueTypeUnicodeMapping() { + GBool use; + + lockGlobalParams; + use = useTrueTypeUnicodeMapping; + unlockGlobalParams; + return use; +} + GBool GlobalParams::isDroppedFont(const char *fontName) { GBool isDropped; @@ -3321,6 +3365,15 @@ GString *GlobalParams::getTabStateFile() { return s; } +GBool GlobalParams::getSavePageNumbers() { + GBool s; + + lockGlobalParams; + s = savePageNumbers; + unlockGlobalParams; + return s; +} + GBool GlobalParams::getPrintCommands() { GBool p; @@ -3330,6 +3383,15 @@ GBool GlobalParams::getPrintCommands() { return p; } +GBool GlobalParams::getPrintStatusInfo() { + GBool p; + + lockGlobalParams; + p = printStatusInfo; + unlockGlobalParams; + return p; +} + GBool GlobalParams::getErrQuiet() { // no locking -- this function may get called from inside a locked // section @@ -3759,6 +3821,12 @@ void GlobalParams::setPrintCommands(GBool printCommandsA) { unlockGlobalParams; } +void GlobalParams::setPrintStatusInfo(GBool printStatusInfoA) { + lockGlobalParams; + printStatusInfo = printStatusInfoA; + unlockGlobalParams; +} + void GlobalParams::setErrQuiet(GBool errQuietA) { lockGlobalParams; errQuiet = errQuietA; -- cgit v1.2.3