summaryrefslogtreecommitdiff
path: root/Build/source/libs/xpdf/xpdf-src/xpdf
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-02-25 03:01:12 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-02-25 03:01:12 +0000
commit3112e1aed533fe7ee58dd8cba2e4cd768372dfd6 (patch)
tree02077f80cf4a13a6c571bace448a53a38a9b6768 /Build/source/libs/xpdf/xpdf-src/xpdf
parent73052dd2c8e70e61b653151192fe1f000fcf626d (diff)
xpdf-4.01
git-svn-id: svn://tug.org/texlive/trunk@50122 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/xpdf')
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/AcroForm.cc57
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Annot.cc4
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Array.cc4
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Array.h12
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/BuiltinFont.h1
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/BuiltinFontTables.cc7528
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/CMakeLists.txt56
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Catalog.cc9
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Decrypt.cc94
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Dict.h10
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Function.cc6
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Gfx.cc211
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/GfxFont.cc89
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/GfxFont.h7
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/GfxState.cc84
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/GfxState.h30
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc187
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.h29
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/HTMLGen.cc45
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/ImageOutputDev.cc2
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/JArithmeticDecoder.cc14
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/JBIG2Stream.cc90
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/JPXStream.cc272
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc16
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/NameToUnicodeTable.h1
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Object.cc4
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Object.h6
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/OptionalContent.cc51
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/OptionalContent.h4
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/OutputDev.h1
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/PDF417Barcode.cc1916
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/PDF417Barcode.h32
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/PDFCore.cc27
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/PDFCore.h2
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.cc111
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.h9
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc353
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.h10
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/PSTokenizer.cc8
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/PreScanOutputDev.cc16
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/SplashOutputDev.cc380
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/SplashOutputDev.h5
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Stream.cc197
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/Stream.h4
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.cc150
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h21
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/TileCompositor.cc23
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/TileMap.cc63
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/TileMap.h4
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/UTF8.cc4
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.cc178
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.h51
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/XFAForm.cc596
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/XFAForm.h23
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/XRef.cc81
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h8
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/config.h20
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc6
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdffonts.cc5
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdfimages.cc5
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdfinfo.cc300
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdftohtml.cc5
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdftopng.cc5
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdftoppm.cc9
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdftops.cc20
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc18
66 files changed, 8467 insertions, 5122 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/AcroForm.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/AcroForm.cc
index 834841fd512..9bbafac6839 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/AcroForm.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/AcroForm.cc
@@ -875,14 +875,15 @@ void AcroFormField::drawNewAppearance(Gfx *gfx, Dict *annot,
GString *appearBuf;
Object appearance, mkObj, ftObj, appearDict, drObj, apObj, asObj;
Object resources, fontResources, defaultFont, gfxStateDict;
- Object obj1, obj2, obj3;
+ Object obj1, obj2, obj3, obj4;
Dict *mkDict;
MemStream *appearStream;
GfxFontDict *fontDict;
GBool hasCaption;
double dx, dy, r;
- GString *caption, *da;
+ GString *val, *caption, *da;
GString **text;
+ GBool done;
GBool *selection;
AnnotBorderType borderType;
double borderWidth;
@@ -1200,10 +1201,7 @@ void AcroFormField::drawNewAppearance(Gfx *gfx, Dict *annot,
}
} else if (ftObj.isName("Tx")) {
//~ value strings can be Unicode
- if (!fieldLookup("V", &obj1)->isString()) {
- obj1.free();
- fieldLookup("DV", &obj1);
- }
+ fieldLookup("V", &obj1);
if (obj1.isString()) {
if (fieldLookup("Q", &obj2)->isInt()) {
quadding = obj2.getInt();
@@ -1235,9 +1233,30 @@ void AcroFormField::drawNewAppearance(Gfx *gfx, Dict *annot,
// combo box
if (flags & acroFormFlagCombo) {
if (fieldLookup("V", &obj1)->isString()) {
- drawText(obj1.getString(), da, fontDict,
+ val = obj1.getString()->copy();
+ if (fieldObj.dictLookup("Opt", &obj2)->isArray()) {
+ for (i = 0, done = false; i < obj2.arrayGetLength() && !done; ++i) {
+ obj2.arrayGet(i, &obj3);
+ if (obj3.isArray() && obj3.arrayGetLength() == 2) {
+ if (obj3.arrayGet(0, &obj4)->isString() &&
+ obj4.getString()->cmp(val) == 0) {
+ obj4.free();
+ if (obj3.arrayGet(1, &obj4)->isString()) {
+ delete val;
+ val = obj4.getString()->copy();
+ }
+ done = gTrue;
+ }
+ obj4.free();
+ }
+ obj3.free();
+ }
+ }
+ obj2.free();
+ drawText(val, da, fontDict,
gFalse, 0, quadding, gTrue, gFalse, rot,
xMin, yMin, xMax, yMax, borderWidth, appearBuf);
+ delete val;
//~ Acrobat draws a popup icon on the right side
}
obj1.free();
@@ -1470,6 +1489,12 @@ void AcroFormField::drawText(GString *text, GString *da, GfxFontDict *fontDict,
} else {
text2 = text;
}
+ if (text2->getLength() == 0) {
+ if (text2 != text) {
+ delete text2;
+ }
+ return;
+ }
// parse the default appearance string
tfPos = tmPos = -1;
@@ -1630,11 +1655,11 @@ void AcroFormField::drawText(GString *text, GString *da, GfxFontDict *fontDict,
c = text2->getChar(i) & 0xff;
if (c == '(' || c == ')' || c == '\\') {
appearBuf->append('\\');
- appearBuf->append(c);
+ appearBuf->append((char)c);
} else if (c < 0x20 || c >= 0x80) {
appearBuf->appendf("\\{0:03o}", c);
} else {
- appearBuf->append(c);
+ appearBuf->append((char)c);
}
}
appearBuf->append(") Tj\n");
@@ -1716,11 +1741,11 @@ void AcroFormField::drawText(GString *text, GString *da, GfxFontDict *fontDict,
c = text2->getChar(i) & 0xff;
if (c == '(' || c == ')' || c == '\\') {
appearBuf->append('\\');
- appearBuf->append(c);
+ appearBuf->append((char)c);
} else if (c < 0x20 || c >= 0x80) {
appearBuf->appendf("{0:.4f} 0 Td\n", w);
} else {
- appearBuf->append(c);
+ appearBuf->append((char)c);
}
appearBuf->append(") Tj\n");
}
@@ -1798,11 +1823,11 @@ void AcroFormField::drawText(GString *text, GString *da, GfxFontDict *fontDict,
c = text2->getChar(i) & 0xff;
if (c == '(' || c == ')' || c == '\\') {
appearBuf->append('\\');
- appearBuf->append(c);
+ appearBuf->append((char)c);
} else if (c < 0x20 || c >= 0x80) {
appearBuf->appendf("\\{0:03o}", c);
} else {
- appearBuf->append(c);
+ appearBuf->append((char)c);
}
}
appearBuf->append(") Tj\n");
@@ -1986,11 +2011,11 @@ void AcroFormField::drawListBox(GString **text, GBool *selection,
c = text[i]->getChar(j) & 0xff;
if (c == '(' || c == ')' || c == '\\') {
appearBuf->append('\\');
- appearBuf->append(c);
+ appearBuf->append((char)c);
} else if (c < 0x20 || c >= 0x80) {
appearBuf->appendf("\\{0:03o}", c);
} else {
- appearBuf->append(c);
+ appearBuf->append((char)c);
}
}
appearBuf->append(") Tj\n");
@@ -2027,7 +2052,7 @@ void AcroFormField::getNextLine(GString *text, int start,
break;
}
if (font && !font->isCIDFont()) {
- dw = ((Gfx8BitFont *)font)->getWidth(c) * fontSize;
+ dw = ((Gfx8BitFont *)font)->getWidth((Guchar)c) * fontSize;
} else {
// otherwise, make a crude estimate
dw = 0.5 * fontSize;
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Annot.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Annot.cc
index f2075feaea2..850c6b25651 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Annot.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Annot.cc
@@ -1287,11 +1287,11 @@ void Annot::drawText(GString *text, GString *da, int quadding, double margin,
c = text2->getChar(i) & 0xff;
if (c == '(' || c == ')' || c == '\\') {
appearBuf->append('\\');
- appearBuf->append(c);
+ appearBuf->append((char)c);
} else if (c < 0x20 || c >= 0x80) {
appearBuf->appendf("\\{0:03o}", c);
} else {
- appearBuf->append(c);
+ appearBuf->append((char)c);
}
}
appearBuf->append(") Tj\n");
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Array.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Array.cc
index 9fe902d1fe5..2bf948ec65c 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Array.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Array.cc
@@ -51,7 +51,7 @@ void Array::add(Object *elem) {
++length;
}
-Object *Array::get(int i, Object *obj) {
+Object *Array::get(int i, Object *obj, int recursion) {
if (i < 0 || i >= length) {
#ifdef DEBUG_MEM
abort();
@@ -59,7 +59,7 @@ Object *Array::get(int i, Object *obj) {
return obj->initNull();
#endif
}
- return elems[i].fetch(xref, obj);
+ return elems[i].fetch(xref, obj, recursion);
}
Object *Array::getNF(int i, Object *obj) {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Array.h b/Build/source/libs/xpdf/xpdf-src/xpdf/Array.h
index 45bfa8b07bd..8d10eadc8dd 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Array.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Array.h
@@ -37,11 +37,11 @@ public:
// Reference counting.
#if MULTITHREADED
- int incRef() { return gAtomicIncrement(&ref); }
- int decRef() { return gAtomicDecrement(&ref); }
+ long incRef() { return gAtomicIncrement(&ref); }
+ long decRef() { return gAtomicDecrement(&ref); }
#else
- int incRef() { return ++ref; }
- int decRef() { return --ref; }
+ long incRef() { return ++ref; }
+ long decRef() { return --ref; }
#endif
// Get number of elements.
@@ -51,7 +51,7 @@ public:
void add(Object *elem);
// Accessors.
- Object *get(int i, Object *obj);
+ Object *get(int i, Object *obj, int recursion = 0);
Object *getNF(int i, Object *obj);
private:
@@ -63,7 +63,7 @@ private:
#if MULTITHREADED
GAtomicCounter ref; // reference count
#else
- int ref; // reference count
+ long ref; // reference count
#endif
};
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/BuiltinFont.h b/Build/source/libs/xpdf/xpdf-src/xpdf/BuiltinFont.h
index 9cddb0ceef1..f24cbf98f9f 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/BuiltinFont.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/BuiltinFont.h
@@ -25,6 +25,7 @@ class BuiltinFontWidths;
struct BuiltinFont {
const char *name;
const char **defaultBaseEnc;
+ short missingWidth;
short ascent;
short descent;
short bbox[4];
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/BuiltinFontTables.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/BuiltinFontTables.cc
index a210a6fc674..51a468cfb14 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/BuiltinFontTables.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/BuiltinFontTables.cc
@@ -2,7 +2,7 @@
//
// BuiltinFontTables.cc
//
-// Copyright 2001-2003 Glyph & Cog, LLC
+// Copyright 2001-2017 Glyph & Cog, LLC
//
//========================================================================
@@ -13,4235 +13,4235 @@
#include "BuiltinFontTables.h"
static BuiltinFontWidth courierWidthsTab[] = {
- { "Ntilde", 600, NULL },
- { "rcaron", 600, NULL },
- { "kcommaaccent", 600, NULL },
+ { "odieresis", 600, NULL },
+ { "M", 600, NULL },
+ { "Ograve", 600, NULL },
+ { "T", 600, NULL },
+ { "amacron", 600, NULL },
{ "Ncommaaccent", 600, NULL },
- { "Zacute", 600, NULL },
- { "comma", 600, NULL },
- { "cedilla", 600, NULL },
- { "plusminus", 600, NULL },
- { "circumflex", 600, NULL },
- { "dotaccent", 600, NULL },
- { "edotaccent", 600, NULL },
- { "asciitilde", 600, NULL },
- { "colon", 600, NULL },
- { "onehalf", 600, NULL },
- { "dollar", 600, NULL },
- { "Lcaron", 600, NULL },
- { "ntilde", 600, NULL },
+ { "numbersign", 600, NULL },
+ { "emacron", 600, NULL },
+ { "divide", 600, NULL },
+ { "fl", 600, NULL },
+ { "E", 600, NULL },
+ { "quotedblbase", 600, NULL },
+ { "guillemotleft", 600, NULL },
+ { "endash", 600, NULL },
+ { "w", 600, NULL },
+ { "twosuperior", 600, NULL },
+ { "eth", 600, NULL },
+ { "space", 600, NULL },
+ { "Thorn", 600, NULL },
+ { "ecaron", 600, NULL },
+ { "brokenbar", 600, NULL },
{ "Aogonek", 600, NULL },
- { "ncommaaccent", 600, NULL },
+ { "commaaccent", 600, NULL },
+ { "W", 600, NULL },
+ { "bracketright", 600, NULL },
+ { "germandbls", 600, NULL },
+ { "Ugrave", 600, NULL },
+ { "thorn", 600, NULL },
+ { "zero", 600, NULL },
+ { "udieresis", 600, NULL },
+ { "period", 600, NULL },
+ { "scedilla", 600, NULL },
+ { "Ccedilla", 600, NULL },
+ { "Igrave", 600, NULL },
+ { "Ocircumflex", 600, NULL },
+ { "F", 600, NULL },
+ { "Uring", 600, NULL },
+ { "perthousand", 600, NULL },
+ { "Edotaccent", 600, NULL },
+ { "acircumflex", 600, NULL },
+ { "G", 600, NULL },
+ { "circumflex", 600, NULL },
+ { "Zcaron", 600, NULL },
+ { "ogonek", 600, NULL },
+ { "idieresis", 600, NULL },
+ { "cent", 600, NULL },
+ { "ae", 600, NULL },
+ { "less", 600, NULL },
+ { "ocircumflex", 600, NULL },
{ "minus", 600, NULL },
- { "Iogonek", 600, NULL },
- { "zacute", 600, NULL },
+ { "four", 600, NULL },
+ { "dollar", 600, NULL },
+ { "Tcommaaccent", 600, NULL },
+ { "dotaccent", 600, NULL },
+ { "Nacute", 600, NULL },
+ { "v", 600, NULL },
+ { "Kcommaaccent", 600, NULL },
+ { "imacron", 600, NULL },
+ { "rcommaaccent", 600, NULL },
+ { "tilde", 600, NULL },
+ { "underscore", 600, NULL },
+ { "racute", 600, NULL },
+ { "mu", 600, NULL },
+ { "D", 600, NULL },
+ { "Ccaron", 600, NULL },
+ { "j", 600, NULL },
+ { "hungarumlaut", 600, NULL },
+ { "Y", 600, NULL },
{ "yen", 600, NULL },
- { "space", 600, NULL },
+ { "ccaron", 600, NULL },
+ { "lessequal", 600, NULL },
+ { "Ucircumflex", 600, NULL },
{ "Omacron", 600, NULL },
- { "questiondown", 600, NULL },
+ { "quotesinglbase", 600, NULL },
+ { "Scedilla", 600, NULL },
+ { "grave", 600, NULL },
+ { "parenleft", 600, NULL },
+ { "nine", 600, NULL },
+ { "currency", 600, NULL },
+ { "radical", 600, NULL },
+ { "Ntilde", 600, NULL },
+ { "p", 600, NULL },
+ { "dotlessi", 600, NULL },
+ { "cedilla", 600, NULL },
+ { "Idotaccent", 600, NULL },
+ { "plusminus", 600, NULL },
+ { "Eth", 600, NULL },
+ { "quotedblright", 600, NULL },
+ { "ccedilla", 600, NULL },
+ { "colon", 600, NULL },
+ { "g", 600, NULL },
+ { "oe", 600, NULL },
+ { "Odieresis", 600, NULL },
+ { "five", 600, NULL },
+ { "asciicircum", 600, NULL },
+ { "X", 600, NULL },
{ "emdash", 600, NULL },
- { "Agrave", 600, NULL },
- { "three", 600, NULL },
- { "numbersign", 600, NULL },
- { "lcaron", 600, NULL },
- { "A", 600, NULL },
- { "B", 600, NULL },
- { "C", 600, NULL },
+ { "Egrave", 600, NULL },
{ "aogonek", 600, NULL },
- { "D", 600, NULL },
- { "E", 600, NULL },
- { "onequarter", 600, NULL },
- { "F", 600, NULL },
- { "G", 600, NULL },
- { "H", 600, NULL },
- { "I", 600, NULL },
- { "J", 600, NULL },
- { "K", 600, NULL },
+ { "ring", 600, NULL },
+ { "Dcaron", 600, NULL },
+ { "ecircumflex", 600, NULL },
+ { "Z", 600, NULL },
+ { "breve", 600, NULL },
+ { "Amacron", 600, NULL },
+ { "zcaron", 600, NULL },
+ { "paragraph", 600, NULL },
+ { "lcaron", 600, NULL },
+ { "Ydieresis", 600, NULL },
+ { "aring", 600, NULL },
{ "iogonek", 600, NULL },
- { "L", 600, NULL },
- { "backslash", 600, NULL },
- { "periodcentered", 600, NULL },
- { "M", 600, NULL },
- { "N", 600, NULL },
- { "omacron", 600, NULL },
- { "Tcommaaccent", 600, NULL },
- { "O", 600, NULL },
- { "P", 600, NULL },
- { "Q", 600, NULL },
- { "Uhungarumlaut", 600, NULL },
- { "R", 600, NULL },
+ { "florin", 600, NULL },
+ { "Euro", 600, NULL },
+ { "Scaron", 600, NULL },
+ { "degree", 600, NULL },
+ { "section", 600, NULL },
+ { "K", 600, NULL },
{ "Aacute", 600, NULL },
- { "caron", 600, NULL },
- { "S", 600, NULL },
- { "T", 600, NULL },
- { "U", 600, NULL },
- { "agrave", 600, NULL },
- { "V", 600, NULL },
- { "W", 600, NULL },
- { "equal", 600, NULL },
- { "question", 600, NULL },
- { "X", 600, NULL },
- { "Y", 600, NULL },
- { "Z", 600, NULL },
- { "four", 600, NULL },
- { "a", 600, NULL },
- { "Gcommaaccent", 600, NULL },
+ { "Scommaaccent", 600, NULL },
{ "b", 600, NULL },
- { "c", 600, NULL },
- { "d", 600, NULL },
+ { "greater", 600, NULL },
+ { "asterisk", 600, NULL },
+ { "scommaaccent", 600, NULL },
+ { "Emacron", 600, NULL },
+ { "onesuperior", 600, NULL },
+ { "percent", 600, NULL },
+ { "o", 600, NULL },
+ { "icircumflex", 600, NULL },
+ { "iacute", 600, NULL },
{ "e", 600, NULL },
- { "f", 600, NULL },
- { "g", 600, NULL },
- { "bullet", 600, NULL },
- { "h", 600, NULL },
- { "i", 600, NULL },
- { "Oslash", 600, NULL },
+ { "Imacron", 600, NULL },
+ { "abreve", 600, NULL },
+ { "N", 600, NULL },
+ { "equal", 600, NULL },
{ "dagger", 600, NULL },
- { "j", 600, NULL },
- { "k", 600, NULL },
+ { "u", 600, NULL },
+ { "C", 600, NULL },
{ "l", 600, NULL },
- { "m", 600, NULL },
- { "n", 600, NULL },
- { "tcommaaccent", 600, NULL },
- { "o", 600, NULL },
- { "ordfeminine", 600, NULL },
- { "ring", 600, NULL },
- { "p", 600, NULL },
{ "q", 600, NULL },
+ { "quoteleft", 600, NULL },
+ { "registered", 600, NULL },
+ { "Gcommaaccent", 600, NULL },
+ { "Racute", 600, NULL },
+ { "k", 600, NULL },
+ { "copyright", 600, NULL },
+ { "onehalf", 600, NULL },
+ { "lcommaaccent", 600, NULL },
{ "uhungarumlaut", 600, NULL },
- { "r", 600, NULL },
- { "twosuperior", 600, NULL },
- { "aacute", 600, NULL },
- { "s", 600, NULL },
- { "OE", 600, NULL },
- { "t", 600, NULL },
- { "divide", 600, NULL },
- { "u", 600, NULL },
- { "Ccaron", 600, NULL },
- { "v", 600, NULL },
- { "w", 600, NULL },
- { "x", 600, NULL },
- { "y", 600, NULL },
- { "z", 600, NULL },
- { "Gbreve", 600, NULL },
- { "commaaccent", 600, NULL },
- { "hungarumlaut", 600, NULL },
- { "Idotaccent", 600, NULL },
- { "Nacute", 600, NULL },
- { "quotedbl", 600, NULL },
- { "gcommaaccent", 600, NULL },
- { "mu", 600, NULL },
- { "greaterequal", 600, NULL },
- { "Scaron", 600, NULL },
+ { "gbreve", 600, NULL },
+ { "n", 600, NULL },
+ { "Ecaron", 600, NULL },
+ { "zdotaccent", 600, NULL },
+ { "threesuperior", 600, NULL },
+ { "Uacute", 600, NULL },
+ { "Zacute", 600, NULL },
+ { "atilde", 600, NULL },
+ { "fraction", 600, NULL },
+ { "Adieresis", 600, NULL },
+ { "Sacute", 600, NULL },
+ { "asciitilde", 600, NULL },
+ { "lacute", 600, NULL },
+ { "Uogonek", 600, NULL },
+ { "caron", 600, NULL },
{ "Lslash", 600, NULL },
- { "semicolon", 600, NULL },
+ { "sterling", 600, NULL },
+ { "H", 600, NULL },
+ { "at", 600, NULL },
+ { "greaterequal", 600, NULL },
+ { "J", 600, NULL },
+ { "threequarters", 600, NULL },
+ { "ohungarumlaut", 600, NULL },
+ { "Ecircumflex", 600, NULL },
+ { "L", 600, NULL },
+ { "Agrave", 600, NULL },
+ { "exclam", 600, NULL },
+ { "AE", 600, NULL },
+ { "notequal", 600, NULL },
{ "oslash", 600, NULL },
- { "lessequal", 600, NULL },
- { "lozenge", 600, NULL },
+ { "Acircumflex", 600, NULL },
+ { "ograve", 600, NULL },
+ { "Rcommaaccent", 600, NULL },
+ { "Lacute", 600, NULL },
+ { "Idieresis", 600, NULL },
+ { "sacute", 600, NULL },
+ { "f", 600, NULL },
+ { "gcommaaccent", 600, NULL },
+ { "bracketleft", 600, NULL },
+ { "Ohungarumlaut", 600, NULL },
+ { "otilde", 600, NULL },
{ "parenright", 600, NULL },
- { "ccaron", 600, NULL },
- { "Ecircumflex", 600, NULL },
- { "gbreve", 600, NULL },
- { "trademark", 600, NULL },
- { "daggerdbl", 600, NULL },
- { "nacute", 600, NULL },
+ { "questiondown", 600, NULL },
+ { "Lcaron", 600, NULL },
+ { "ordmasculine", 600, NULL },
+ { "backslash", 600, NULL },
+ { "Eogonek", 600, NULL },
{ "macron", 600, NULL },
- { "Otilde", 600, NULL },
- { "Emacron", 600, NULL },
- { "ellipsis", 600, NULL },
- { "scaron", 600, NULL },
- { "AE", 600, NULL },
- { "Ucircumflex", 600, NULL },
- { "lslash", 600, NULL },
- { "quotedblleft", 600, NULL },
- { "hyphen", 600, NULL },
- { "guilsinglright", 600, NULL },
- { "quotesingle", 600, NULL },
- { "eight", 600, NULL },
- { "exclamdown", 600, NULL },
- { "endash", 600, NULL },
- { "oe", 600, NULL },
- { "Abreve", 600, NULL },
- { "Umacron", 600, NULL },
- { "ecircumflex", 600, NULL },
- { "Adieresis", 600, NULL },
- { "copyright", 600, NULL },
- { "Egrave", 600, NULL },
+ { "three", 600, NULL },
{ "slash", 600, NULL },
- { "Edieresis", 600, NULL },
- { "otilde", 600, NULL },
- { "Idieresis", 600, NULL },
- { "parenleft", 600, NULL },
- { "one", 600, NULL },
- { "emacron", 600, NULL },
- { "Odieresis", 600, NULL },
+ { "r", 600, NULL },
{ "ucircumflex", 600, NULL },
- { "bracketleft", 600, NULL },
- { "Ugrave", 600, NULL },
- { "quoteright", 600, NULL },
- { "Udieresis", 600, NULL },
- { "perthousand", 600, NULL },
- { "Ydieresis", 600, NULL },
- { "umacron", 600, NULL },
- { "abreve", 600, NULL },
- { "Eacute", 600, NULL },
+ { "zacute", 600, NULL },
+ { "Umacron", 600, NULL },
{ "adieresis", 600, NULL },
+ { "ncaron", 600, NULL },
+ { "V", 600, NULL },
+ { "lozenge", 600, NULL },
+ { "exclamdown", 600, NULL },
+ { "Q", 600, NULL },
+ { "uogonek", 600, NULL },
+ { "quoteright", 600, NULL },
+ { "guilsinglright", 600, NULL },
+ { "semicolon", 600, NULL },
{ "egrave", 600, NULL },
- { "edieresis", 600, NULL },
- { "idieresis", 600, NULL },
- { "Eth", 600, NULL },
- { "ae", 600, NULL },
- { "asterisk", 600, NULL },
- { "odieresis", 600, NULL },
- { "Uacute", 600, NULL },
- { "ugrave", 600, NULL },
- { "five", 600, NULL },
- { "nine", 600, NULL },
- { "udieresis", 600, NULL },
- { "Zcaron", 600, NULL },
- { "Scommaaccent", 600, NULL },
- { "threequarters", 600, NULL },
- { "guillemotright", 600, NULL },
- { "Ccedilla", 600, NULL },
- { "ydieresis", 600, NULL },
- { "tilde", 600, NULL },
- { "at", 600, NULL },
- { "eacute", 600, NULL },
- { "underscore", 600, NULL },
- { "Euro", 600, NULL },
- { "Dcroat", 600, NULL },
- { "zero", 600, NULL },
- { "multiply", 600, NULL },
- { "eth", 600, NULL },
- { "Scedilla", 600, NULL },
- { "Racute", 600, NULL },
- { "Ograve", 600, NULL },
- { "partialdiff", 600, NULL },
- { "uacute", 600, NULL },
- { "braceleft", 600, NULL },
- { "Thorn", 600, NULL },
- { "zcaron", 600, NULL },
- { "scommaaccent", 600, NULL },
- { "ccedilla", 600, NULL },
- { "Dcaron", 600, NULL },
- { "dcroat", 600, NULL },
- { "scedilla", 600, NULL },
- { "Oacute", 600, NULL },
- { "Ocircumflex", 600, NULL },
- { "ogonek", 600, NULL },
- { "ograve", 600, NULL },
- { "racute", 600, NULL },
- { "Tcaron", 600, NULL },
- { "Eogonek", 600, NULL },
- { "thorn", 600, NULL },
- { "degree", 600, NULL },
- { "registered", 600, NULL },
- { "radical", 600, NULL },
+ { "s", 600, NULL },
+ { "uring", 600, NULL },
+ { "z", 600, NULL },
+ { "Uhungarumlaut", 600, NULL },
+ { "I", 600, NULL },
+ { "one", 600, NULL },
+ { "eight", 600, NULL },
+ { "periodcentered", 600, NULL },
+ { "d", 600, NULL },
+ { "c", 600, NULL },
+ { "agrave", 600, NULL },
+ { "ellipsis", 600, NULL },
{ "Aring", 600, NULL },
- { "percent", 600, NULL },
+ { "t", 600, NULL },
+ { "quotedbl", 600, NULL },
+ { "Oacute", 600, NULL },
+ { "edotaccent", 600, NULL },
{ "six", 600, NULL },
- { "paragraph", 600, NULL },
- { "dcaron", 600, NULL },
- { "Uogonek", 600, NULL },
- { "two", 600, NULL },
- { "summation", 600, NULL },
- { "Igrave", 600, NULL },
- { "Lacute", 600, NULL },
- { "ocircumflex", 600, NULL },
+ { "lslash", 600, NULL },
+ { "P", 600, NULL },
+ { "i", 600, NULL },
+ { "multiply", 600, NULL },
+ { "bar", 600, NULL },
+ { "quotesingle", 600, NULL },
+ { "acute", 600, NULL },
+ { "braceright", 600, NULL },
+ { "braceleft", 600, NULL },
+ { "onequarter", 600, NULL },
+ { "Atilde", 600, NULL },
+ { "Edieresis", 600, NULL },
{ "oacute", 600, NULL },
- { "Uring", 600, NULL },
- { "Lcommaaccent", 600, NULL },
+ { "Yacute", 600, NULL },
+ { "daggerdbl", 600, NULL },
+ { "ncommaaccent", 600, NULL },
+ { "logicalnot", 600, NULL },
+ { "tcommaaccent", 600, NULL },
+ { "Dcroat", 600, NULL },
+ { "cacute", 600, NULL },
{ "tcaron", 600, NULL },
- { "eogonek", 600, NULL },
- { "Delta", 600, NULL },
- { "Ohungarumlaut", 600, NULL },
- { "asciicircum", 600, NULL },
- { "aring", 600, NULL },
- { "grave", 600, NULL },
- { "uogonek", 600, NULL },
- { "bracketright", 600, NULL },
- { "ampersand", 600, NULL },
- { "Iacute", 600, NULL },
- { "lacute", 600, NULL },
- { "igrave", 600, NULL },
+ { "rcaron", 600, NULL },
+ { "Iogonek", 600, NULL },
+ { "y", 600, NULL },
+ { "edieresis", 600, NULL },
+ { "x", 600, NULL },
{ "Ncaron", 600, NULL },
+ { "OE", 600, NULL },
+ { "m", 600, NULL },
+ { "U", 600, NULL },
+ { "partialdiff", 600, NULL },
+ { "dcroat", 600, NULL },
+ { "igrave", 600, NULL },
+ { "summation", 600, NULL },
+ { "question", 600, NULL },
+ { "A", 600, NULL },
+ { "Cacute", 600, NULL },
+ { "h", 600, NULL },
+ { "guilsinglleft", 600, NULL },
{ "plus", 600, NULL },
- { "uring", 600, NULL },
- { "quotesinglbase", 600, NULL },
- { "lcommaaccent", 600, NULL },
- { "Yacute", 600, NULL },
- { "ohungarumlaut", 600, NULL },
- { "threesuperior", 600, NULL },
- { "acute", 600, NULL },
- { "section", 600, NULL },
- { "dieresis", 600, NULL },
- { "quotedblbase", 600, NULL },
- { "iacute", 600, NULL },
- { "ncaron", 600, NULL },
- { "florin", 600, NULL },
+ { "Otilde", 600, NULL },
+ { "umacron", 600, NULL },
+ { "Tcaron", 600, NULL },
+ { "aacute", 600, NULL },
+ { "B", 600, NULL },
+ { "R", 600, NULL },
+ { "ydieresis", 600, NULL },
+ { "Rcaron", 600, NULL },
+ { "kcommaaccent", 600, NULL },
{ "yacute", 600, NULL },
- { "Rcommaaccent", 600, NULL },
+ { "dcaron", 600, NULL },
+ { "ugrave", 600, NULL },
+ { "a", 600, NULL },
+ { "hyphen", 600, NULL },
+ { "Oslash", 600, NULL },
+ { "comma", 600, NULL },
+ { "Delta", 600, NULL },
+ { "omacron", 600, NULL },
+ { "Gbreve", 600, NULL },
+ { "S", 600, NULL },
+ { "quotedblleft", 600, NULL },
+ { "ordfeminine", 600, NULL },
+ { "ampersand", 600, NULL },
+ { "trademark", 600, NULL },
+ { "Lcommaaccent", 600, NULL },
+ { "ntilde", 600, NULL },
{ "fi", 600, NULL },
- { "fl", 600, NULL },
- { "Acircumflex", 600, NULL },
- { "Cacute", 600, NULL },
+ { "dieresis", 600, NULL },
+ { "Eacute", 600, NULL },
+ { "nacute", 600, NULL },
+ { "O", 600, NULL },
{ "Icircumflex", 600, NULL },
- { "guillemotleft", 600, NULL },
- { "germandbls", 600, NULL },
+ { "Udieresis", 600, NULL },
+ { "Abreve", 600, NULL },
+ { "Iacute", 600, NULL },
+ { "uacute", 600, NULL },
+ { "two", 600, NULL },
{ "seven", 600, NULL },
- { "Amacron", 600, NULL },
- { "Sacute", 600, NULL },
- { "ordmasculine", 600, NULL },
- { "dotlessi", 600, NULL },
- { "sterling", 600, NULL },
- { "notequal", 600, NULL },
- { "Imacron", 600, NULL },
- { "rcommaaccent", 600, NULL },
- { "Zdotaccent", 600, NULL },
- { "acircumflex", 600, NULL },
- { "cacute", 600, NULL },
- { "Ecaron", 600, NULL },
- { "braceright", 600, NULL },
- { "icircumflex", 600, NULL },
- { "quotedblright", 600, NULL },
- { "amacron", 600, NULL },
- { "sacute", 600, NULL },
- { "imacron", 600, NULL },
- { "cent", 600, NULL },
- { "currency", 600, NULL },
- { "logicalnot", 600, NULL },
- { "zdotaccent", 600, NULL },
- { "Atilde", 600, NULL },
- { "breve", 600, NULL },
- { "bar", 600, NULL },
- { "fraction", 600, NULL },
- { "less", 600, NULL },
- { "ecaron", 600, NULL },
- { "guilsinglleft", 600, NULL },
- { "exclam", 600, NULL },
- { "period", 600, NULL },
- { "Rcaron", 600, NULL },
- { "Kcommaaccent", 600, NULL },
- { "greater", 600, NULL },
- { "atilde", 600, NULL },
- { "brokenbar", 600, NULL },
- { "quoteleft", 600, NULL },
- { "Edotaccent", 600, NULL },
- { "onesuperior", 600, NULL }
+ { "scaron", 600, NULL },
+ { "guillemotright", 600, NULL },
+ { "bullet", 600, NULL },
+ { "eogonek", 600, NULL },
+ { "eacute", 600, NULL },
+ { "Zdotaccent", 600, NULL }
};
static BuiltinFontWidth courierBoldWidthsTab[] = {
- { "Ntilde", 600, NULL },
- { "rcaron", 600, NULL },
- { "kcommaaccent", 600, NULL },
- { "Ncommaaccent", 600, NULL },
- { "Zacute", 600, NULL },
- { "comma", 600, NULL },
- { "cedilla", 600, NULL },
- { "plusminus", 600, NULL },
- { "circumflex", 600, NULL },
- { "dotaccent", 600, NULL },
- { "edotaccent", 600, NULL },
- { "asciitilde", 600, NULL },
- { "colon", 600, NULL },
- { "onehalf", 600, NULL },
- { "dollar", 600, NULL },
- { "Lcaron", 600, NULL },
- { "ntilde", 600, NULL },
- { "Aogonek", 600, NULL },
- { "ncommaaccent", 600, NULL },
- { "minus", 600, NULL },
- { "Iogonek", 600, NULL },
- { "zacute", 600, NULL },
- { "yen", 600, NULL },
- { "space", 600, NULL },
- { "Omacron", 600, NULL },
- { "questiondown", 600, NULL },
- { "emdash", 600, NULL },
- { "Agrave", 600, NULL },
- { "three", 600, NULL },
- { "numbersign", 600, NULL },
- { "lcaron", 600, NULL },
- { "A", 600, NULL },
- { "B", 600, NULL },
- { "C", 600, NULL },
- { "aogonek", 600, NULL },
- { "D", 600, NULL },
- { "E", 600, NULL },
- { "onequarter", 600, NULL },
- { "F", 600, NULL },
- { "G", 600, NULL },
- { "H", 600, NULL },
+ { "t", 600, NULL },
+ { "quotedbl", 600, NULL },
+ { "Oacute", 600, NULL },
+ { "agrave", 600, NULL },
+ { "ellipsis", 600, NULL },
+ { "Aring", 600, NULL },
+ { "eight", 600, NULL },
{ "I", 600, NULL },
- { "J", 600, NULL },
- { "K", 600, NULL },
- { "iogonek", 600, NULL },
- { "backslash", 600, NULL },
- { "L", 600, NULL },
+ { "one", 600, NULL },
{ "periodcentered", 600, NULL },
- { "M", 600, NULL },
- { "N", 600, NULL },
- { "omacron", 600, NULL },
- { "Tcommaaccent", 600, NULL },
- { "O", 600, NULL },
- { "P", 600, NULL },
- { "Q", 600, NULL },
- { "Uhungarumlaut", 600, NULL },
- { "R", 600, NULL },
- { "Aacute", 600, NULL },
- { "caron", 600, NULL },
- { "S", 600, NULL },
- { "T", 600, NULL },
- { "U", 600, NULL },
- { "agrave", 600, NULL },
- { "V", 600, NULL },
- { "W", 600, NULL },
- { "X", 600, NULL },
- { "question", 600, NULL },
- { "equal", 600, NULL },
- { "Y", 600, NULL },
- { "Z", 600, NULL },
- { "four", 600, NULL },
- { "a", 600, NULL },
- { "Gcommaaccent", 600, NULL },
- { "b", 600, NULL },
{ "c", 600, NULL },
{ "d", 600, NULL },
- { "e", 600, NULL },
- { "f", 600, NULL },
- { "g", 600, NULL },
- { "bullet", 600, NULL },
- { "h", 600, NULL },
- { "i", 600, NULL },
- { "Oslash", 600, NULL },
- { "dagger", 600, NULL },
- { "j", 600, NULL },
- { "k", 600, NULL },
- { "l", 600, NULL },
- { "m", 600, NULL },
- { "n", 600, NULL },
- { "tcommaaccent", 600, NULL },
- { "o", 600, NULL },
- { "ordfeminine", 600, NULL },
- { "ring", 600, NULL },
- { "p", 600, NULL },
- { "q", 600, NULL },
- { "uhungarumlaut", 600, NULL },
- { "r", 600, NULL },
- { "twosuperior", 600, NULL },
- { "aacute", 600, NULL },
+ { "egrave", 600, NULL },
+ { "uring", 600, NULL },
{ "s", 600, NULL },
- { "OE", 600, NULL },
- { "t", 600, NULL },
- { "divide", 600, NULL },
- { "u", 600, NULL },
- { "Ccaron", 600, NULL },
- { "v", 600, NULL },
- { "w", 600, NULL },
- { "x", 600, NULL },
- { "y", 600, NULL },
{ "z", 600, NULL },
- { "Gbreve", 600, NULL },
- { "commaaccent", 600, NULL },
- { "hungarumlaut", 600, NULL },
- { "Idotaccent", 600, NULL },
- { "Nacute", 600, NULL },
- { "quotedbl", 600, NULL },
- { "gcommaaccent", 600, NULL },
- { "mu", 600, NULL },
- { "greaterequal", 600, NULL },
- { "Scaron", 600, NULL },
- { "Lslash", 600, NULL },
+ { "Uhungarumlaut", 600, NULL },
+ { "uogonek", 600, NULL },
+ { "quoteright", 600, NULL },
{ "semicolon", 600, NULL },
- { "oslash", 600, NULL },
- { "lessequal", 600, NULL },
- { "lozenge", 600, NULL },
- { "parenright", 600, NULL },
- { "ccaron", 600, NULL },
- { "Ecircumflex", 600, NULL },
- { "gbreve", 600, NULL },
- { "trademark", 600, NULL },
- { "daggerdbl", 600, NULL },
- { "nacute", 600, NULL },
- { "macron", 600, NULL },
- { "Otilde", 600, NULL },
- { "Emacron", 600, NULL },
- { "ellipsis", 600, NULL },
- { "scaron", 600, NULL },
- { "AE", 600, NULL },
- { "Ucircumflex", 600, NULL },
- { "lslash", 600, NULL },
- { "quotedblleft", 600, NULL },
{ "guilsinglright", 600, NULL },
- { "hyphen", 600, NULL },
- { "quotesingle", 600, NULL },
- { "eight", 600, NULL },
- { "exclamdown", 600, NULL },
- { "endash", 600, NULL },
- { "oe", 600, NULL },
- { "Abreve", 600, NULL },
{ "Umacron", 600, NULL },
- { "ecircumflex", 600, NULL },
- { "Adieresis", 600, NULL },
- { "copyright", 600, NULL },
- { "Egrave", 600, NULL },
+ { "zacute", 600, NULL },
+ { "ncaron", 600, NULL },
+ { "adieresis", 600, NULL },
+ { "lozenge", 600, NULL },
+ { "V", 600, NULL },
+ { "Q", 600, NULL },
+ { "exclamdown", 600, NULL },
+ { "three", 600, NULL },
{ "slash", 600, NULL },
- { "Edieresis", 600, NULL },
- { "otilde", 600, NULL },
- { "Idieresis", 600, NULL },
- { "parenleft", 600, NULL },
- { "one", 600, NULL },
- { "emacron", 600, NULL },
- { "Odieresis", 600, NULL },
+ { "r", 600, NULL },
{ "ucircumflex", 600, NULL },
+ { "macron", 600, NULL },
+ { "Eogonek", 600, NULL },
+ { "Lcaron", 600, NULL },
+ { "ordmasculine", 600, NULL },
+ { "questiondown", 600, NULL },
+ { "backslash", 600, NULL },
+ { "gcommaaccent", 600, NULL },
+ { "Ohungarumlaut", 600, NULL },
{ "bracketleft", 600, NULL },
- { "Ugrave", 600, NULL },
- { "quoteright", 600, NULL },
- { "Udieresis", 600, NULL },
- { "perthousand", 600, NULL },
- { "Ydieresis", 600, NULL },
- { "umacron", 600, NULL },
- { "abreve", 600, NULL },
- { "Eacute", 600, NULL },
- { "adieresis", 600, NULL },
- { "egrave", 600, NULL },
- { "edieresis", 600, NULL },
- { "idieresis", 600, NULL },
- { "Eth", 600, NULL },
- { "ae", 600, NULL },
- { "asterisk", 600, NULL },
- { "odieresis", 600, NULL },
- { "Uacute", 600, NULL },
- { "ugrave", 600, NULL },
- { "nine", 600, NULL },
- { "five", 600, NULL },
- { "udieresis", 600, NULL },
- { "Zcaron", 600, NULL },
- { "Scommaaccent", 600, NULL },
+ { "otilde", 600, NULL },
+ { "parenright", 600, NULL },
+ { "f", 600, NULL },
+ { "Lacute", 600, NULL },
+ { "Idieresis", 600, NULL },
+ { "sacute", 600, NULL },
+ { "Rcommaaccent", 600, NULL },
+ { "ograve", 600, NULL },
{ "threequarters", 600, NULL },
- { "guillemotright", 600, NULL },
- { "Ccedilla", 600, NULL },
- { "ydieresis", 600, NULL },
- { "tilde", 600, NULL },
+ { "J", 600, NULL },
+ { "ohungarumlaut", 600, NULL },
+ { "Ecircumflex", 600, NULL },
+ { "L", 600, NULL },
+ { "notequal", 600, NULL },
+ { "exclam", 600, NULL },
+ { "Agrave", 600, NULL },
+ { "AE", 600, NULL },
+ { "Acircumflex", 600, NULL },
+ { "oslash", 600, NULL },
+ { "Uogonek", 600, NULL },
+ { "caron", 600, NULL },
+ { "Lslash", 600, NULL },
+ { "lacute", 600, NULL },
+ { "sterling", 600, NULL },
+ { "H", 600, NULL },
{ "at", 600, NULL },
+ { "greaterequal", 600, NULL },
+ { "asciitilde", 600, NULL },
+ { "Uacute", 600, NULL },
+ { "atilde", 600, NULL },
+ { "Zacute", 600, NULL },
+ { "fraction", 600, NULL },
+ { "Adieresis", 600, NULL },
+ { "Sacute", 600, NULL },
+ { "scaron", 600, NULL },
+ { "guillemotright", 600, NULL },
+ { "bullet", 600, NULL },
+ { "eogonek", 600, NULL },
{ "eacute", 600, NULL },
- { "underscore", 600, NULL },
- { "Euro", 600, NULL },
- { "Dcroat", 600, NULL },
- { "multiply", 600, NULL },
- { "zero", 600, NULL },
- { "eth", 600, NULL },
- { "Scedilla", 600, NULL },
- { "Ograve", 600, NULL },
- { "Racute", 600, NULL },
- { "partialdiff", 600, NULL },
- { "uacute", 600, NULL },
- { "braceleft", 600, NULL },
- { "Thorn", 600, NULL },
- { "zcaron", 600, NULL },
- { "scommaaccent", 600, NULL },
- { "ccedilla", 600, NULL },
- { "Dcaron", 600, NULL },
- { "dcroat", 600, NULL },
- { "Ocircumflex", 600, NULL },
- { "Oacute", 600, NULL },
- { "scedilla", 600, NULL },
- { "ogonek", 600, NULL },
- { "ograve", 600, NULL },
- { "racute", 600, NULL },
- { "Tcaron", 600, NULL },
- { "Eogonek", 600, NULL },
- { "thorn", 600, NULL },
- { "degree", 600, NULL },
- { "registered", 600, NULL },
- { "radical", 600, NULL },
- { "Aring", 600, NULL },
- { "percent", 600, NULL },
- { "six", 600, NULL },
- { "paragraph", 600, NULL },
- { "dcaron", 600, NULL },
- { "Uogonek", 600, NULL },
+ { "Zdotaccent", 600, NULL },
+ { "Abreve", 600, NULL },
+ { "Udieresis", 600, NULL },
+ { "Iacute", 600, NULL },
{ "two", 600, NULL },
- { "summation", 600, NULL },
- { "Igrave", 600, NULL },
- { "Lacute", 600, NULL },
- { "ocircumflex", 600, NULL },
- { "oacute", 600, NULL },
- { "Uring", 600, NULL },
+ { "uacute", 600, NULL },
+ { "seven", 600, NULL },
+ { "dieresis", 600, NULL },
+ { "Eacute", 600, NULL },
+ { "O", 600, NULL },
+ { "Icircumflex", 600, NULL },
+ { "nacute", 600, NULL },
+ { "trademark", 600, NULL },
+ { "ampersand", 600, NULL },
{ "Lcommaaccent", 600, NULL },
- { "tcaron", 600, NULL },
- { "eogonek", 600, NULL },
+ { "ntilde", 600, NULL },
+ { "fi", 600, NULL },
+ { "quotedblleft", 600, NULL },
+ { "ordfeminine", 600, NULL },
+ { "omacron", 600, NULL },
+ { "comma", 600, NULL },
{ "Delta", 600, NULL },
- { "Ohungarumlaut", 600, NULL },
- { "asciicircum", 600, NULL },
- { "aring", 600, NULL },
- { "grave", 600, NULL },
- { "uogonek", 600, NULL },
- { "bracketright", 600, NULL },
- { "Iacute", 600, NULL },
- { "ampersand", 600, NULL },
+ { "Gbreve", 600, NULL },
+ { "S", 600, NULL },
+ { "B", 600, NULL },
+ { "kcommaaccent", 600, NULL },
+ { "Rcaron", 600, NULL },
+ { "yacute", 600, NULL },
+ { "ydieresis", 600, NULL },
+ { "R", 600, NULL },
+ { "ugrave", 600, NULL },
+ { "dcaron", 600, NULL },
+ { "Oslash", 600, NULL },
+ { "hyphen", 600, NULL },
+ { "a", 600, NULL },
+ { "Otilde", 600, NULL },
+ { "umacron", 600, NULL },
+ { "Tcaron", 600, NULL },
+ { "aacute", 600, NULL },
+ { "guilsinglleft", 600, NULL },
+ { "Cacute", 600, NULL },
+ { "h", 600, NULL },
+ { "plus", 600, NULL },
{ "igrave", 600, NULL },
- { "lacute", 600, NULL },
+ { "dcroat", 600, NULL },
+ { "question", 600, NULL },
+ { "summation", 600, NULL },
+ { "A", 600, NULL },
+ { "x", 600, NULL },
+ { "edieresis", 600, NULL },
+ { "Iogonek", 600, NULL },
+ { "y", 600, NULL },
{ "Ncaron", 600, NULL },
- { "plus", 600, NULL },
- { "uring", 600, NULL },
- { "quotesinglbase", 600, NULL },
- { "lcommaaccent", 600, NULL },
+ { "m", 600, NULL },
+ { "OE", 600, NULL },
+ { "partialdiff", 600, NULL },
+ { "U", 600, NULL },
+ { "ncommaaccent", 600, NULL },
+ { "tcommaaccent", 600, NULL },
+ { "logicalnot", 600, NULL },
+ { "cacute", 600, NULL },
+ { "Dcroat", 600, NULL },
+ { "tcaron", 600, NULL },
+ { "rcaron", 600, NULL },
+ { "Atilde", 600, NULL },
+ { "Edieresis", 600, NULL },
{ "Yacute", 600, NULL },
- { "ohungarumlaut", 600, NULL },
- { "threesuperior", 600, NULL },
+ { "oacute", 600, NULL },
+ { "daggerdbl", 600, NULL },
+ { "braceleft", 600, NULL },
+ { "braceright", 600, NULL },
{ "acute", 600, NULL },
- { "section", 600, NULL },
- { "dieresis", 600, NULL },
- { "iacute", 600, NULL },
- { "quotedblbase", 600, NULL },
- { "ncaron", 600, NULL },
- { "florin", 600, NULL },
- { "yacute", 600, NULL },
- { "Rcommaaccent", 600, NULL },
- { "fi", 600, NULL },
- { "fl", 600, NULL },
- { "Acircumflex", 600, NULL },
- { "Cacute", 600, NULL },
- { "Icircumflex", 600, NULL },
- { "guillemotleft", 600, NULL },
- { "germandbls", 600, NULL },
- { "Amacron", 600, NULL },
- { "seven", 600, NULL },
- { "Sacute", 600, NULL },
- { "ordmasculine", 600, NULL },
- { "dotlessi", 600, NULL },
- { "sterling", 600, NULL },
- { "notequal", 600, NULL },
- { "Imacron", 600, NULL },
+ { "onequarter", 600, NULL },
+ { "i", 600, NULL },
+ { "multiply", 600, NULL },
+ { "quotesingle", 600, NULL },
+ { "bar", 600, NULL },
+ { "six", 600, NULL },
+ { "edotaccent", 600, NULL },
+ { "lslash", 600, NULL },
+ { "P", 600, NULL },
+ { "parenleft", 600, NULL },
+ { "currency", 600, NULL },
+ { "nine", 600, NULL },
+ { "quotesinglbase", 600, NULL },
+ { "grave", 600, NULL },
+ { "Scedilla", 600, NULL },
+ { "ccaron", 600, NULL },
+ { "Ucircumflex", 600, NULL },
+ { "lessequal", 600, NULL },
+ { "Omacron", 600, NULL },
+ { "hungarumlaut", 600, NULL },
+ { "Ccaron", 600, NULL },
+ { "j", 600, NULL },
+ { "Y", 600, NULL },
+ { "yen", 600, NULL },
{ "rcommaaccent", 600, NULL },
- { "Zdotaccent", 600, NULL },
- { "acircumflex", 600, NULL },
- { "cacute", 600, NULL },
- { "Ecaron", 600, NULL },
- { "icircumflex", 600, NULL },
- { "braceright", 600, NULL },
- { "quotedblright", 600, NULL },
- { "amacron", 600, NULL },
- { "sacute", 600, NULL },
+ { "Kcommaaccent", 600, NULL },
{ "imacron", 600, NULL },
+ { "tilde", 600, NULL },
+ { "underscore", 600, NULL },
+ { "mu", 600, NULL },
+ { "D", 600, NULL },
+ { "racute", 600, NULL },
+ { "Tcommaaccent", 600, NULL },
+ { "dollar", 600, NULL },
+ { "Nacute", 600, NULL },
+ { "v", 600, NULL },
+ { "dotaccent", 600, NULL },
{ "cent", 600, NULL },
- { "currency", 600, NULL },
- { "logicalnot", 600, NULL },
- { "zdotaccent", 600, NULL },
- { "Atilde", 600, NULL },
- { "breve", 600, NULL },
- { "bar", 600, NULL },
- { "fraction", 600, NULL },
+ { "ae", 600, NULL },
+ { "ocircumflex", 600, NULL },
{ "less", 600, NULL },
- { "ecaron", 600, NULL },
- { "guilsinglleft", 600, NULL },
- { "exclam", 600, NULL },
+ { "minus", 600, NULL },
+ { "four", 600, NULL },
+ { "circumflex", 600, NULL },
+ { "Zcaron", 600, NULL },
+ { "ogonek", 600, NULL },
+ { "idieresis", 600, NULL },
+ { "G", 600, NULL },
+ { "F", 600, NULL },
+ { "Ocircumflex", 600, NULL },
+ { "Uring", 600, NULL },
+ { "perthousand", 600, NULL },
+ { "Edotaccent", 600, NULL },
+ { "acircumflex", 600, NULL },
+ { "zero", 600, NULL },
{ "period", 600, NULL },
- { "Rcaron", 600, NULL },
- { "Kcommaaccent", 600, NULL },
- { "greater", 600, NULL },
- { "atilde", 600, NULL },
+ { "scedilla", 600, NULL },
+ { "udieresis", 600, NULL },
+ { "Ccedilla", 600, NULL },
+ { "Igrave", 600, NULL },
+ { "commaaccent", 600, NULL },
+ { "W", 600, NULL },
+ { "bracketright", 600, NULL },
+ { "Ugrave", 600, NULL },
+ { "germandbls", 600, NULL },
+ { "thorn", 600, NULL },
+ { "w", 600, NULL },
+ { "Thorn", 600, NULL },
+ { "space", 600, NULL },
+ { "eth", 600, NULL },
+ { "twosuperior", 600, NULL },
+ { "ecaron", 600, NULL },
+ { "Aogonek", 600, NULL },
{ "brokenbar", 600, NULL },
+ { "fl", 600, NULL },
+ { "E", 600, NULL },
+ { "quotedblbase", 600, NULL },
+ { "guillemotleft", 600, NULL },
+ { "endash", 600, NULL },
+ { "amacron", 600, NULL },
+ { "Ncommaaccent", 600, NULL },
+ { "numbersign", 600, NULL },
+ { "divide", 600, NULL },
+ { "emacron", 600, NULL },
+ { "M", 600, NULL },
+ { "odieresis", 600, NULL },
+ { "Ograve", 600, NULL },
+ { "T", 600, NULL },
+ { "n", 600, NULL },
+ { "Ecaron", 600, NULL },
+ { "threesuperior", 600, NULL },
+ { "zdotaccent", 600, NULL },
+ { "lcommaaccent", 600, NULL },
+ { "onehalf", 600, NULL },
+ { "gbreve", 600, NULL },
+ { "uhungarumlaut", 600, NULL },
+ { "Racute", 600, NULL },
+ { "k", 600, NULL },
+ { "copyright", 600, NULL },
{ "quoteleft", 600, NULL },
- { "Edotaccent", 600, NULL },
- { "onesuperior", 600, NULL }
+ { "registered", 600, NULL },
+ { "Gcommaaccent", 600, NULL },
+ { "equal", 600, NULL },
+ { "dagger", 600, NULL },
+ { "N", 600, NULL },
+ { "C", 600, NULL },
+ { "u", 600, NULL },
+ { "q", 600, NULL },
+ { "l", 600, NULL },
+ { "icircumflex", 600, NULL },
+ { "Imacron", 600, NULL },
+ { "abreve", 600, NULL },
+ { "e", 600, NULL },
+ { "iacute", 600, NULL },
+ { "percent", 600, NULL },
+ { "o", 600, NULL },
+ { "greater", 600, NULL },
+ { "Emacron", 600, NULL },
+ { "asterisk", 600, NULL },
+ { "scommaaccent", 600, NULL },
+ { "onesuperior", 600, NULL },
+ { "K", 600, NULL },
+ { "Scommaaccent", 600, NULL },
+ { "Aacute", 600, NULL },
+ { "b", 600, NULL },
+ { "Euro", 600, NULL },
+ { "florin", 600, NULL },
+ { "iogonek", 600, NULL },
+ { "section", 600, NULL },
+ { "Scaron", 600, NULL },
+ { "degree", 600, NULL },
+ { "lcaron", 600, NULL },
+ { "paragraph", 600, NULL },
+ { "zcaron", 600, NULL },
+ { "aring", 600, NULL },
+ { "Ydieresis", 600, NULL },
+ { "Dcaron", 600, NULL },
+ { "Z", 600, NULL },
+ { "ecircumflex", 600, NULL },
+ { "Amacron", 600, NULL },
+ { "breve", 600, NULL },
+ { "emdash", 600, NULL },
+ { "Egrave", 600, NULL },
+ { "aogonek", 600, NULL },
+ { "ring", 600, NULL },
+ { "Odieresis", 600, NULL },
+ { "oe", 600, NULL },
+ { "five", 600, NULL },
+ { "X", 600, NULL },
+ { "asciicircum", 600, NULL },
+ { "plusminus", 600, NULL },
+ { "Idotaccent", 600, NULL },
+ { "cedilla", 600, NULL },
+ { "quotedblright", 600, NULL },
+ { "Eth", 600, NULL },
+ { "colon", 600, NULL },
+ { "g", 600, NULL },
+ { "ccedilla", 600, NULL },
+ { "radical", 600, NULL },
+ { "Ntilde", 600, NULL },
+ { "dotlessi", 600, NULL },
+ { "p", 600, NULL }
};
static BuiltinFontWidth courierBoldObliqueWidthsTab[] = {
+ { "greater", 600, NULL },
+ { "asterisk", 600, NULL },
+ { "Emacron", 600, NULL },
+ { "scommaaccent", 600, NULL },
+ { "onesuperior", 600, NULL },
+ { "percent", 600, NULL },
+ { "o", 600, NULL },
+ { "icircumflex", 600, NULL },
+ { "iacute", 600, NULL },
+ { "e", 600, NULL },
+ { "Imacron", 600, NULL },
+ { "abreve", 600, NULL },
+ { "N", 600, NULL },
+ { "equal", 600, NULL },
+ { "dagger", 600, NULL },
+ { "u", 600, NULL },
+ { "C", 600, NULL },
+ { "l", 600, NULL },
+ { "q", 600, NULL },
+ { "quoteleft", 600, NULL },
+ { "registered", 600, NULL },
+ { "Gcommaaccent", 600, NULL },
+ { "Racute", 600, NULL },
+ { "k", 600, NULL },
+ { "copyright", 600, NULL },
+ { "onehalf", 600, NULL },
+ { "lcommaaccent", 600, NULL },
+ { "uhungarumlaut", 600, NULL },
+ { "gbreve", 600, NULL },
+ { "n", 600, NULL },
+ { "Ecaron", 600, NULL },
+ { "zdotaccent", 600, NULL },
+ { "threesuperior", 600, NULL },
+ { "radical", 600, NULL },
{ "Ntilde", 600, NULL },
- { "rcaron", 600, NULL },
- { "kcommaaccent", 600, NULL },
- { "Ncommaaccent", 600, NULL },
- { "Zacute", 600, NULL },
- { "comma", 600, NULL },
+ { "p", 600, NULL },
+ { "dotlessi", 600, NULL },
{ "cedilla", 600, NULL },
+ { "Idotaccent", 600, NULL },
{ "plusminus", 600, NULL },
- { "circumflex", 600, NULL },
- { "dotaccent", 600, NULL },
- { "edotaccent", 600, NULL },
- { "asciitilde", 600, NULL },
+ { "Eth", 600, NULL },
+ { "quotedblright", 600, NULL },
+ { "ccedilla", 600, NULL },
+ { "g", 600, NULL },
{ "colon", 600, NULL },
- { "onehalf", 600, NULL },
- { "dollar", 600, NULL },
- { "Lcaron", 600, NULL },
- { "ntilde", 600, NULL },
- { "Aogonek", 600, NULL },
- { "ncommaaccent", 600, NULL },
- { "minus", 600, NULL },
- { "Iogonek", 600, NULL },
- { "zacute", 600, NULL },
- { "yen", 600, NULL },
- { "space", 600, NULL },
- { "Omacron", 600, NULL },
- { "questiondown", 600, NULL },
+ { "oe", 600, NULL },
+ { "Odieresis", 600, NULL },
+ { "five", 600, NULL },
+ { "asciicircum", 600, NULL },
+ { "X", 600, NULL },
{ "emdash", 600, NULL },
- { "Agrave", 600, NULL },
- { "three", 600, NULL },
- { "numbersign", 600, NULL },
- { "lcaron", 600, NULL },
- { "A", 600, NULL },
- { "B", 600, NULL },
- { "C", 600, NULL },
{ "aogonek", 600, NULL },
- { "D", 600, NULL },
- { "E", 600, NULL },
- { "onequarter", 600, NULL },
- { "F", 600, NULL },
- { "G", 600, NULL },
- { "H", 600, NULL },
- { "I", 600, NULL },
- { "J", 600, NULL },
- { "K", 600, NULL },
+ { "Egrave", 600, NULL },
+ { "ring", 600, NULL },
+ { "Dcaron", 600, NULL },
+ { "ecircumflex", 600, NULL },
+ { "Z", 600, NULL },
+ { "breve", 600, NULL },
+ { "Amacron", 600, NULL },
+ { "paragraph", 600, NULL },
+ { "zcaron", 600, NULL },
+ { "lcaron", 600, NULL },
+ { "Ydieresis", 600, NULL },
+ { "aring", 600, NULL },
{ "iogonek", 600, NULL },
- { "backslash", 600, NULL },
- { "L", 600, NULL },
- { "periodcentered", 600, NULL },
- { "M", 600, NULL },
- { "N", 600, NULL },
- { "omacron", 600, NULL },
- { "Tcommaaccent", 600, NULL },
- { "O", 600, NULL },
- { "P", 600, NULL },
- { "Q", 600, NULL },
- { "Uhungarumlaut", 600, NULL },
- { "R", 600, NULL },
+ { "florin", 600, NULL },
+ { "Euro", 600, NULL },
+ { "Scaron", 600, NULL },
+ { "degree", 600, NULL },
+ { "section", 600, NULL },
+ { "K", 600, NULL },
{ "Aacute", 600, NULL },
- { "caron", 600, NULL },
- { "S", 600, NULL },
- { "T", 600, NULL },
- { "U", 600, NULL },
- { "agrave", 600, NULL },
- { "V", 600, NULL },
- { "W", 600, NULL },
- { "X", 600, NULL },
- { "question", 600, NULL },
- { "equal", 600, NULL },
- { "Y", 600, NULL },
- { "Z", 600, NULL },
- { "four", 600, NULL },
- { "a", 600, NULL },
- { "Gcommaaccent", 600, NULL },
+ { "Scommaaccent", 600, NULL },
{ "b", 600, NULL },
- { "c", 600, NULL },
- { "d", 600, NULL },
- { "e", 600, NULL },
- { "f", 600, NULL },
- { "g", 600, NULL },
- { "bullet", 600, NULL },
- { "h", 600, NULL },
- { "i", 600, NULL },
- { "Oslash", 600, NULL },
- { "dagger", 600, NULL },
- { "j", 600, NULL },
- { "k", 600, NULL },
- { "l", 600, NULL },
- { "m", 600, NULL },
- { "n", 600, NULL },
- { "tcommaaccent", 600, NULL },
- { "o", 600, NULL },
- { "ordfeminine", 600, NULL },
- { "ring", 600, NULL },
- { "p", 600, NULL },
- { "q", 600, NULL },
- { "uhungarumlaut", 600, NULL },
- { "r", 600, NULL },
- { "twosuperior", 600, NULL },
- { "aacute", 600, NULL },
- { "s", 600, NULL },
- { "OE", 600, NULL },
- { "t", 600, NULL },
- { "divide", 600, NULL },
- { "u", 600, NULL },
- { "Ccaron", 600, NULL },
+ { "circumflex", 600, NULL },
+ { "Zcaron", 600, NULL },
+ { "ogonek", 600, NULL },
+ { "idieresis", 600, NULL },
+ { "ae", 600, NULL },
+ { "cent", 600, NULL },
+ { "less", 600, NULL },
+ { "ocircumflex", 600, NULL },
+ { "minus", 600, NULL },
+ { "four", 600, NULL },
+ { "Tcommaaccent", 600, NULL },
+ { "dollar", 600, NULL },
+ { "dotaccent", 600, NULL },
{ "v", 600, NULL },
- { "w", 600, NULL },
- { "x", 600, NULL },
- { "y", 600, NULL },
- { "z", 600, NULL },
- { "Gbreve", 600, NULL },
- { "commaaccent", 600, NULL },
- { "hungarumlaut", 600, NULL },
- { "Idotaccent", 600, NULL },
{ "Nacute", 600, NULL },
- { "quotedbl", 600, NULL },
- { "gcommaaccent", 600, NULL },
+ { "Kcommaaccent", 600, NULL },
+ { "imacron", 600, NULL },
+ { "rcommaaccent", 600, NULL },
+ { "tilde", 600, NULL },
+ { "underscore", 600, NULL },
+ { "racute", 600, NULL },
{ "mu", 600, NULL },
- { "greaterequal", 600, NULL },
- { "Scaron", 600, NULL },
- { "Lslash", 600, NULL },
- { "semicolon", 600, NULL },
- { "oslash", 600, NULL },
- { "lessequal", 600, NULL },
- { "lozenge", 600, NULL },
- { "parenright", 600, NULL },
+ { "D", 600, NULL },
+ { "Ccaron", 600, NULL },
+ { "j", 600, NULL },
+ { "hungarumlaut", 600, NULL },
+ { "Y", 600, NULL },
+ { "yen", 600, NULL },
{ "ccaron", 600, NULL },
- { "Ecircumflex", 600, NULL },
- { "gbreve", 600, NULL },
- { "trademark", 600, NULL },
- { "daggerdbl", 600, NULL },
- { "nacute", 600, NULL },
- { "macron", 600, NULL },
- { "Otilde", 600, NULL },
- { "Emacron", 600, NULL },
- { "ellipsis", 600, NULL },
- { "scaron", 600, NULL },
- { "AE", 600, NULL },
{ "Ucircumflex", 600, NULL },
- { "lslash", 600, NULL },
- { "quotedblleft", 600, NULL },
- { "guilsinglright", 600, NULL },
- { "hyphen", 600, NULL },
- { "quotesingle", 600, NULL },
- { "eight", 600, NULL },
- { "exclamdown", 600, NULL },
- { "endash", 600, NULL },
- { "oe", 600, NULL },
- { "Abreve", 600, NULL },
- { "Umacron", 600, NULL },
- { "ecircumflex", 600, NULL },
- { "Adieresis", 600, NULL },
- { "copyright", 600, NULL },
- { "Egrave", 600, NULL },
- { "slash", 600, NULL },
- { "Edieresis", 600, NULL },
- { "otilde", 600, NULL },
- { "Idieresis", 600, NULL },
+ { "lessequal", 600, NULL },
+ { "Omacron", 600, NULL },
+ { "quotesinglbase", 600, NULL },
+ { "Scedilla", 600, NULL },
+ { "grave", 600, NULL },
{ "parenleft", 600, NULL },
- { "one", 600, NULL },
+ { "nine", 600, NULL },
+ { "currency", 600, NULL },
+ { "odieresis", 600, NULL },
+ { "M", 600, NULL },
+ { "Ograve", 600, NULL },
+ { "T", 600, NULL },
+ { "amacron", 600, NULL },
+ { "Ncommaaccent", 600, NULL },
+ { "numbersign", 600, NULL },
{ "emacron", 600, NULL },
- { "Odieresis", 600, NULL },
- { "ucircumflex", 600, NULL },
- { "bracketleft", 600, NULL },
+ { "divide", 600, NULL },
+ { "fl", 600, NULL },
+ { "quotedblbase", 600, NULL },
+ { "E", 600, NULL },
+ { "guillemotleft", 600, NULL },
+ { "endash", 600, NULL },
+ { "w", 600, NULL },
+ { "eth", 600, NULL },
+ { "twosuperior", 600, NULL },
+ { "space", 600, NULL },
+ { "Thorn", 600, NULL },
+ { "ecaron", 600, NULL },
+ { "brokenbar", 600, NULL },
+ { "Aogonek", 600, NULL },
+ { "commaaccent", 600, NULL },
+ { "bracketright", 600, NULL },
+ { "W", 600, NULL },
+ { "germandbls", 600, NULL },
{ "Ugrave", 600, NULL },
- { "quoteright", 600, NULL },
- { "Udieresis", 600, NULL },
+ { "thorn", 600, NULL },
+ { "zero", 600, NULL },
+ { "udieresis", 600, NULL },
+ { "scedilla", 600, NULL },
+ { "period", 600, NULL },
+ { "Ccedilla", 600, NULL },
+ { "Igrave", 600, NULL },
+ { "F", 600, NULL },
+ { "Ocircumflex", 600, NULL },
+ { "Uring", 600, NULL },
{ "perthousand", 600, NULL },
- { "Ydieresis", 600, NULL },
+ { "Edotaccent", 600, NULL },
+ { "acircumflex", 600, NULL },
+ { "G", 600, NULL },
+ { "Otilde", 600, NULL },
{ "umacron", 600, NULL },
- { "abreve", 600, NULL },
- { "Eacute", 600, NULL },
- { "adieresis", 600, NULL },
- { "egrave", 600, NULL },
- { "edieresis", 600, NULL },
- { "idieresis", 600, NULL },
- { "Eth", 600, NULL },
- { "ae", 600, NULL },
- { "asterisk", 600, NULL },
- { "odieresis", 600, NULL },
- { "Uacute", 600, NULL },
+ { "Tcaron", 600, NULL },
+ { "aacute", 600, NULL },
+ { "B", 600, NULL },
+ { "ydieresis", 600, NULL },
+ { "R", 600, NULL },
+ { "kcommaaccent", 600, NULL },
+ { "yacute", 600, NULL },
+ { "Rcaron", 600, NULL },
+ { "dcaron", 600, NULL },
{ "ugrave", 600, NULL },
- { "nine", 600, NULL },
- { "five", 600, NULL },
- { "udieresis", 600, NULL },
- { "Zcaron", 600, NULL },
- { "Scommaaccent", 600, NULL },
- { "threequarters", 600, NULL },
+ { "a", 600, NULL },
+ { "hyphen", 600, NULL },
+ { "Oslash", 600, NULL },
+ { "comma", 600, NULL },
+ { "Delta", 600, NULL },
+ { "omacron", 600, NULL },
+ { "Gbreve", 600, NULL },
+ { "S", 600, NULL },
+ { "quotedblleft", 600, NULL },
+ { "ordfeminine", 600, NULL },
+ { "ampersand", 600, NULL },
+ { "trademark", 600, NULL },
+ { "Lcommaaccent", 600, NULL },
+ { "ntilde", 600, NULL },
+ { "fi", 600, NULL },
+ { "dieresis", 600, NULL },
+ { "Eacute", 600, NULL },
+ { "nacute", 600, NULL },
+ { "O", 600, NULL },
+ { "Icircumflex", 600, NULL },
+ { "Udieresis", 600, NULL },
+ { "Abreve", 600, NULL },
+ { "Iacute", 600, NULL },
+ { "uacute", 600, NULL },
+ { "two", 600, NULL },
+ { "seven", 600, NULL },
+ { "scaron", 600, NULL },
{ "guillemotright", 600, NULL },
- { "Ccedilla", 600, NULL },
- { "ydieresis", 600, NULL },
- { "tilde", 600, NULL },
- { "at", 600, NULL },
+ { "eogonek", 600, NULL },
{ "eacute", 600, NULL },
- { "underscore", 600, NULL },
- { "Euro", 600, NULL },
- { "Dcroat", 600, NULL },
+ { "bullet", 600, NULL },
+ { "Zdotaccent", 600, NULL },
+ { "edotaccent", 600, NULL },
+ { "six", 600, NULL },
+ { "lslash", 600, NULL },
+ { "P", 600, NULL },
{ "multiply", 600, NULL },
- { "zero", 600, NULL },
- { "eth", 600, NULL },
- { "Scedilla", 600, NULL },
- { "Ograve", 600, NULL },
- { "Racute", 600, NULL },
- { "partialdiff", 600, NULL },
- { "uacute", 600, NULL },
+ { "i", 600, NULL },
+ { "bar", 600, NULL },
+ { "quotesingle", 600, NULL },
+ { "acute", 600, NULL },
+ { "braceright", 600, NULL },
{ "braceleft", 600, NULL },
- { "Thorn", 600, NULL },
- { "zcaron", 600, NULL },
- { "scommaaccent", 600, NULL },
- { "ccedilla", 600, NULL },
- { "Dcaron", 600, NULL },
- { "dcroat", 600, NULL },
- { "Ocircumflex", 600, NULL },
- { "Oacute", 600, NULL },
- { "scedilla", 600, NULL },
- { "ogonek", 600, NULL },
- { "ograve", 600, NULL },
- { "racute", 600, NULL },
- { "Tcaron", 600, NULL },
- { "Eogonek", 600, NULL },
- { "thorn", 600, NULL },
- { "degree", 600, NULL },
- { "registered", 600, NULL },
- { "radical", 600, NULL },
- { "Aring", 600, NULL },
- { "percent", 600, NULL },
- { "six", 600, NULL },
- { "paragraph", 600, NULL },
- { "dcaron", 600, NULL },
- { "Uogonek", 600, NULL },
- { "two", 600, NULL },
- { "summation", 600, NULL },
- { "Igrave", 600, NULL },
- { "Lacute", 600, NULL },
- { "ocircumflex", 600, NULL },
+ { "onequarter", 600, NULL },
+ { "Atilde", 600, NULL },
+ { "Edieresis", 600, NULL },
+ { "Yacute", 600, NULL },
{ "oacute", 600, NULL },
- { "Uring", 600, NULL },
- { "Lcommaaccent", 600, NULL },
+ { "daggerdbl", 600, NULL },
+ { "ncommaaccent", 600, NULL },
+ { "logicalnot", 600, NULL },
+ { "tcommaaccent", 600, NULL },
+ { "Dcroat", 600, NULL },
+ { "cacute", 600, NULL },
+ { "rcaron", 600, NULL },
{ "tcaron", 600, NULL },
- { "eogonek", 600, NULL },
- { "Delta", 600, NULL },
- { "Ohungarumlaut", 600, NULL },
- { "asciicircum", 600, NULL },
- { "aring", 600, NULL },
- { "grave", 600, NULL },
- { "uogonek", 600, NULL },
- { "bracketright", 600, NULL },
- { "Iacute", 600, NULL },
- { "ampersand", 600, NULL },
- { "igrave", 600, NULL },
- { "lacute", 600, NULL },
+ { "y", 600, NULL },
+ { "Iogonek", 600, NULL },
+ { "edieresis", 600, NULL },
+ { "x", 600, NULL },
{ "Ncaron", 600, NULL },
+ { "OE", 600, NULL },
+ { "m", 600, NULL },
+ { "U", 600, NULL },
+ { "partialdiff", 600, NULL },
+ { "dcroat", 600, NULL },
+ { "igrave", 600, NULL },
+ { "summation", 600, NULL },
+ { "question", 600, NULL },
+ { "A", 600, NULL },
+ { "h", 600, NULL },
+ { "Cacute", 600, NULL },
+ { "guilsinglleft", 600, NULL },
{ "plus", 600, NULL },
- { "uring", 600, NULL },
- { "quotesinglbase", 600, NULL },
- { "lcommaaccent", 600, NULL },
- { "Yacute", 600, NULL },
- { "ohungarumlaut", 600, NULL },
- { "threesuperior", 600, NULL },
- { "acute", 600, NULL },
- { "section", 600, NULL },
- { "dieresis", 600, NULL },
- { "iacute", 600, NULL },
- { "quotedblbase", 600, NULL },
+ { "ordmasculine", 600, NULL },
+ { "Lcaron", 600, NULL },
+ { "backslash", 600, NULL },
+ { "questiondown", 600, NULL },
+ { "macron", 600, NULL },
+ { "Eogonek", 600, NULL },
+ { "three", 600, NULL },
+ { "slash", 600, NULL },
+ { "ucircumflex", 600, NULL },
+ { "r", 600, NULL },
+ { "zacute", 600, NULL },
+ { "Umacron", 600, NULL },
+ { "adieresis", 600, NULL },
{ "ncaron", 600, NULL },
- { "florin", 600, NULL },
- { "yacute", 600, NULL },
- { "Rcommaaccent", 600, NULL },
- { "fi", 600, NULL },
- { "fl", 600, NULL },
- { "Acircumflex", 600, NULL },
- { "Cacute", 600, NULL },
- { "Icircumflex", 600, NULL },
- { "guillemotleft", 600, NULL },
- { "germandbls", 600, NULL },
- { "Amacron", 600, NULL },
- { "seven", 600, NULL },
+ { "V", 600, NULL },
+ { "lozenge", 600, NULL },
+ { "exclamdown", 600, NULL },
+ { "Q", 600, NULL },
+ { "quoteright", 600, NULL },
+ { "uogonek", 600, NULL },
+ { "guilsinglright", 600, NULL },
+ { "semicolon", 600, NULL },
+ { "egrave", 600, NULL },
+ { "s", 600, NULL },
+ { "uring", 600, NULL },
+ { "Uhungarumlaut", 600, NULL },
+ { "z", 600, NULL },
+ { "I", 600, NULL },
+ { "one", 600, NULL },
+ { "eight", 600, NULL },
+ { "periodcentered", 600, NULL },
+ { "d", 600, NULL },
+ { "c", 600, NULL },
+ { "agrave", 600, NULL },
+ { "ellipsis", 600, NULL },
+ { "Aring", 600, NULL },
+ { "t", 600, NULL },
+ { "quotedbl", 600, NULL },
+ { "Oacute", 600, NULL },
+ { "Uacute", 600, NULL },
+ { "Zacute", 600, NULL },
+ { "atilde", 600, NULL },
+ { "fraction", 600, NULL },
+ { "Adieresis", 600, NULL },
{ "Sacute", 600, NULL },
- { "ordmasculine", 600, NULL },
- { "dotlessi", 600, NULL },
+ { "asciitilde", 600, NULL },
+ { "lacute", 600, NULL },
+ { "Uogonek", 600, NULL },
+ { "Lslash", 600, NULL },
+ { "caron", 600, NULL },
{ "sterling", 600, NULL },
+ { "H", 600, NULL },
+ { "greaterequal", 600, NULL },
+ { "at", 600, NULL },
+ { "J", 600, NULL },
+ { "threequarters", 600, NULL },
+ { "ohungarumlaut", 600, NULL },
+ { "Ecircumflex", 600, NULL },
+ { "L", 600, NULL },
+ { "AE", 600, NULL },
+ { "Agrave", 600, NULL },
+ { "exclam", 600, NULL },
{ "notequal", 600, NULL },
- { "Imacron", 600, NULL },
- { "rcommaaccent", 600, NULL },
- { "Zdotaccent", 600, NULL },
- { "acircumflex", 600, NULL },
- { "cacute", 600, NULL },
- { "Ecaron", 600, NULL },
- { "icircumflex", 600, NULL },
- { "braceright", 600, NULL },
- { "quotedblright", 600, NULL },
- { "amacron", 600, NULL },
+ { "oslash", 600, NULL },
+ { "Acircumflex", 600, NULL },
+ { "Rcommaaccent", 600, NULL },
+ { "ograve", 600, NULL },
+ { "Lacute", 600, NULL },
+ { "Idieresis", 600, NULL },
{ "sacute", 600, NULL },
- { "imacron", 600, NULL },
- { "cent", 600, NULL },
- { "currency", 600, NULL },
- { "logicalnot", 600, NULL },
- { "zdotaccent", 600, NULL },
- { "Atilde", 600, NULL },
- { "breve", 600, NULL },
- { "bar", 600, NULL },
- { "fraction", 600, NULL },
- { "less", 600, NULL },
- { "ecaron", 600, NULL },
- { "guilsinglleft", 600, NULL },
- { "exclam", 600, NULL },
- { "period", 600, NULL },
- { "Rcaron", 600, NULL },
- { "Kcommaaccent", 600, NULL },
- { "greater", 600, NULL },
- { "atilde", 600, NULL },
- { "brokenbar", 600, NULL },
- { "quoteleft", 600, NULL },
- { "Edotaccent", 600, NULL },
- { "onesuperior", 600, NULL }
+ { "f", 600, NULL },
+ { "gcommaaccent", 600, NULL },
+ { "bracketleft", 600, NULL },
+ { "Ohungarumlaut", 600, NULL },
+ { "otilde", 600, NULL },
+ { "parenright", 600, NULL }
};
static BuiltinFontWidth courierObliqueWidthsTab[] = {
- { "Ntilde", 600, NULL },
- { "rcaron", 600, NULL },
- { "kcommaaccent", 600, NULL },
- { "Ncommaaccent", 600, NULL },
- { "Zacute", 600, NULL },
- { "comma", 600, NULL },
- { "cedilla", 600, NULL },
- { "plusminus", 600, NULL },
- { "circumflex", 600, NULL },
- { "dotaccent", 600, NULL },
- { "edotaccent", 600, NULL },
- { "asciitilde", 600, NULL },
- { "colon", 600, NULL },
- { "onehalf", 600, NULL },
- { "dollar", 600, NULL },
- { "Lcaron", 600, NULL },
- { "ntilde", 600, NULL },
+ { "ecaron", 600, NULL },
+ { "brokenbar", 600, NULL },
{ "Aogonek", 600, NULL },
- { "ncommaaccent", 600, NULL },
- { "minus", 600, NULL },
- { "Iogonek", 600, NULL },
- { "zacute", 600, NULL },
- { "yen", 600, NULL },
+ { "w", 600, NULL },
+ { "Thorn", 600, NULL },
{ "space", 600, NULL },
- { "Omacron", 600, NULL },
- { "questiondown", 600, NULL },
- { "emdash", 600, NULL },
- { "Agrave", 600, NULL },
- { "three", 600, NULL },
- { "numbersign", 600, NULL },
- { "lcaron", 600, NULL },
- { "A", 600, NULL },
- { "B", 600, NULL },
- { "C", 600, NULL },
- { "aogonek", 600, NULL },
- { "D", 600, NULL },
+ { "eth", 600, NULL },
+ { "twosuperior", 600, NULL },
+ { "guillemotleft", 600, NULL },
+ { "endash", 600, NULL },
+ { "fl", 600, NULL },
{ "E", 600, NULL },
- { "onequarter", 600, NULL },
- { "F", 600, NULL },
- { "G", 600, NULL },
- { "H", 600, NULL },
- { "I", 600, NULL },
- { "J", 600, NULL },
- { "K", 600, NULL },
- { "iogonek", 600, NULL },
- { "backslash", 600, NULL },
- { "L", 600, NULL },
- { "periodcentered", 600, NULL },
- { "M", 600, NULL },
- { "N", 600, NULL },
- { "omacron", 600, NULL },
- { "Tcommaaccent", 600, NULL },
- { "O", 600, NULL },
- { "P", 600, NULL },
- { "Q", 600, NULL },
- { "Uhungarumlaut", 600, NULL },
- { "R", 600, NULL },
- { "Aacute", 600, NULL },
- { "caron", 600, NULL },
- { "S", 600, NULL },
+ { "quotedblbase", 600, NULL },
+ { "numbersign", 600, NULL },
+ { "divide", 600, NULL },
+ { "emacron", 600, NULL },
+ { "amacron", 600, NULL },
+ { "Ncommaaccent", 600, NULL },
{ "T", 600, NULL },
- { "U", 600, NULL },
- { "agrave", 600, NULL },
- { "V", 600, NULL },
+ { "M", 600, NULL },
+ { "odieresis", 600, NULL },
+ { "Ograve", 600, NULL },
+ { "G", 600, NULL },
+ { "perthousand", 600, NULL },
+ { "Edotaccent", 600, NULL },
+ { "acircumflex", 600, NULL },
+ { "Ocircumflex", 600, NULL },
+ { "F", 600, NULL },
+ { "Uring", 600, NULL },
+ { "Ccedilla", 600, NULL },
+ { "Igrave", 600, NULL },
+ { "zero", 600, NULL },
+ { "scedilla", 600, NULL },
+ { "period", 600, NULL },
+ { "udieresis", 600, NULL },
+ { "Ugrave", 600, NULL },
+ { "germandbls", 600, NULL },
+ { "thorn", 600, NULL },
+ { "commaaccent", 600, NULL },
{ "W", 600, NULL },
- { "X", 600, NULL },
- { "question", 600, NULL },
- { "equal", 600, NULL },
- { "Y", 600, NULL },
- { "Z", 600, NULL },
+ { "bracketright", 600, NULL },
+ { "underscore", 600, NULL },
+ { "D", 600, NULL },
+ { "mu", 600, NULL },
+ { "racute", 600, NULL },
+ { "rcommaaccent", 600, NULL },
+ { "imacron", 600, NULL },
+ { "Kcommaaccent", 600, NULL },
+ { "tilde", 600, NULL },
+ { "Tcommaaccent", 600, NULL },
+ { "dollar", 600, NULL },
+ { "v", 600, NULL },
+ { "Nacute", 600, NULL },
+ { "dotaccent", 600, NULL },
+ { "ocircumflex", 600, NULL },
+ { "less", 600, NULL },
+ { "minus", 600, NULL },
{ "four", 600, NULL },
- { "a", 600, NULL },
- { "Gcommaaccent", 600, NULL },
- { "b", 600, NULL },
- { "c", 600, NULL },
- { "d", 600, NULL },
- { "e", 600, NULL },
- { "f", 600, NULL },
- { "g", 600, NULL },
- { "bullet", 600, NULL },
- { "h", 600, NULL },
- { "i", 600, NULL },
- { "Oslash", 600, NULL },
- { "dagger", 600, NULL },
+ { "ae", 600, NULL },
+ { "cent", 600, NULL },
+ { "ogonek", 600, NULL },
+ { "idieresis", 600, NULL },
+ { "circumflex", 600, NULL },
+ { "Zcaron", 600, NULL },
+ { "currency", 600, NULL },
+ { "nine", 600, NULL },
+ { "parenleft", 600, NULL },
+ { "grave", 600, NULL },
+ { "Scedilla", 600, NULL },
+ { "quotesinglbase", 600, NULL },
+ { "lessequal", 600, NULL },
+ { "Omacron", 600, NULL },
+ { "Ucircumflex", 600, NULL },
+ { "ccaron", 600, NULL },
+ { "yen", 600, NULL },
+ { "Y", 600, NULL },
+ { "hungarumlaut", 600, NULL },
+ { "Ccaron", 600, NULL },
{ "j", 600, NULL },
- { "k", 600, NULL },
- { "l", 600, NULL },
- { "m", 600, NULL },
- { "n", 600, NULL },
- { "tcommaaccent", 600, NULL },
- { "o", 600, NULL },
- { "ordfeminine", 600, NULL },
+ { "aogonek", 600, NULL },
+ { "Egrave", 600, NULL },
{ "ring", 600, NULL },
+ { "emdash", 600, NULL },
+ { "five", 600, NULL },
+ { "X", 600, NULL },
+ { "asciicircum", 600, NULL },
+ { "Odieresis", 600, NULL },
+ { "oe", 600, NULL },
+ { "colon", 600, NULL },
+ { "g", 600, NULL },
+ { "ccedilla", 600, NULL },
+ { "plusminus", 600, NULL },
+ { "cedilla", 600, NULL },
+ { "Idotaccent", 600, NULL },
+ { "quotedblright", 600, NULL },
+ { "Eth", 600, NULL },
+ { "dotlessi", 600, NULL },
{ "p", 600, NULL },
+ { "radical", 600, NULL },
+ { "Ntilde", 600, NULL },
+ { "Scommaaccent", 600, NULL },
+ { "Aacute", 600, NULL },
+ { "b", 600, NULL },
+ { "K", 600, NULL },
+ { "section", 600, NULL },
+ { "degree", 600, NULL },
+ { "Scaron", 600, NULL },
+ { "Euro", 600, NULL },
+ { "florin", 600, NULL },
+ { "iogonek", 600, NULL },
+ { "lcaron", 600, NULL },
+ { "paragraph", 600, NULL },
+ { "zcaron", 600, NULL },
+ { "aring", 600, NULL },
+ { "Ydieresis", 600, NULL },
+ { "Amacron", 600, NULL },
+ { "breve", 600, NULL },
+ { "Dcaron", 600, NULL },
+ { "Z", 600, NULL },
+ { "ecircumflex", 600, NULL },
{ "q", 600, NULL },
- { "uhungarumlaut", 600, NULL },
- { "r", 600, NULL },
- { "twosuperior", 600, NULL },
- { "aacute", 600, NULL },
- { "s", 600, NULL },
- { "OE", 600, NULL },
- { "t", 600, NULL },
- { "divide", 600, NULL },
+ { "l", 600, NULL },
+ { "dagger", 600, NULL },
+ { "equal", 600, NULL },
+ { "N", 600, NULL },
+ { "C", 600, NULL },
{ "u", 600, NULL },
- { "Ccaron", 600, NULL },
- { "v", 600, NULL },
- { "w", 600, NULL },
- { "x", 600, NULL },
- { "y", 600, NULL },
- { "z", 600, NULL },
- { "Gbreve", 600, NULL },
- { "commaaccent", 600, NULL },
- { "hungarumlaut", 600, NULL },
- { "Idotaccent", 600, NULL },
- { "Nacute", 600, NULL },
- { "quotedbl", 600, NULL },
- { "gcommaaccent", 600, NULL },
- { "mu", 600, NULL },
+ { "abreve", 600, NULL },
+ { "Imacron", 600, NULL },
+ { "iacute", 600, NULL },
+ { "e", 600, NULL },
+ { "icircumflex", 600, NULL },
+ { "percent", 600, NULL },
+ { "o", 600, NULL },
+ { "asterisk", 600, NULL },
+ { "Emacron", 600, NULL },
+ { "scommaaccent", 600, NULL },
+ { "onesuperior", 600, NULL },
+ { "greater", 600, NULL },
+ { "Ecaron", 600, NULL },
+ { "threesuperior", 600, NULL },
+ { "zdotaccent", 600, NULL },
+ { "n", 600, NULL },
+ { "lcommaaccent", 600, NULL },
+ { "onehalf", 600, NULL },
+ { "gbreve", 600, NULL },
+ { "uhungarumlaut", 600, NULL },
+ { "k", 600, NULL },
+ { "copyright", 600, NULL },
+ { "Racute", 600, NULL },
+ { "Gcommaaccent", 600, NULL },
+ { "quoteleft", 600, NULL },
+ { "registered", 600, NULL },
+ { "notequal", 600, NULL },
+ { "Agrave", 600, NULL },
+ { "AE", 600, NULL },
+ { "exclam", 600, NULL },
+ { "Acircumflex", 600, NULL },
+ { "oslash", 600, NULL },
+ { "threequarters", 600, NULL },
+ { "J", 600, NULL },
+ { "Ecircumflex", 600, NULL },
+ { "ohungarumlaut", 600, NULL },
+ { "L", 600, NULL },
+ { "H", 600, NULL },
+ { "sterling", 600, NULL },
{ "greaterequal", 600, NULL },
- { "Scaron", 600, NULL },
+ { "at", 600, NULL },
+ { "caron", 600, NULL },
+ { "Uogonek", 600, NULL },
{ "Lslash", 600, NULL },
- { "semicolon", 600, NULL },
- { "oslash", 600, NULL },
- { "lessequal", 600, NULL },
- { "lozenge", 600, NULL },
+ { "lacute", 600, NULL },
+ { "asciitilde", 600, NULL },
+ { "fraction", 600, NULL },
+ { "Sacute", 600, NULL },
+ { "Adieresis", 600, NULL },
+ { "Uacute", 600, NULL },
+ { "atilde", 600, NULL },
+ { "Zacute", 600, NULL },
+ { "otilde", 600, NULL },
{ "parenright", 600, NULL },
- { "ccaron", 600, NULL },
- { "Ecircumflex", 600, NULL },
- { "gbreve", 600, NULL },
- { "trademark", 600, NULL },
- { "daggerdbl", 600, NULL },
- { "nacute", 600, NULL },
- { "macron", 600, NULL },
- { "Otilde", 600, NULL },
- { "Emacron", 600, NULL },
- { "ellipsis", 600, NULL },
- { "scaron", 600, NULL },
- { "AE", 600, NULL },
- { "Ucircumflex", 600, NULL },
- { "lslash", 600, NULL },
- { "quotedblleft", 600, NULL },
+ { "gcommaaccent", 600, NULL },
+ { "Ohungarumlaut", 600, NULL },
+ { "bracketleft", 600, NULL },
+ { "f", 600, NULL },
+ { "Lacute", 600, NULL },
+ { "Idieresis", 600, NULL },
+ { "sacute", 600, NULL },
+ { "Rcommaaccent", 600, NULL },
+ { "ograve", 600, NULL },
+ { "quoteright", 600, NULL },
+ { "uogonek", 600, NULL },
+ { "semicolon", 600, NULL },
{ "guilsinglright", 600, NULL },
- { "hyphen", 600, NULL },
- { "quotesingle", 600, NULL },
- { "eight", 600, NULL },
+ { "lozenge", 600, NULL },
+ { "V", 600, NULL },
+ { "Q", 600, NULL },
{ "exclamdown", 600, NULL },
- { "endash", 600, NULL },
- { "oe", 600, NULL },
- { "Abreve", 600, NULL },
{ "Umacron", 600, NULL },
- { "ecircumflex", 600, NULL },
- { "Adieresis", 600, NULL },
- { "copyright", 600, NULL },
- { "Egrave", 600, NULL },
+ { "zacute", 600, NULL },
+ { "ncaron", 600, NULL },
+ { "adieresis", 600, NULL },
{ "slash", 600, NULL },
- { "Edieresis", 600, NULL },
- { "otilde", 600, NULL },
- { "Idieresis", 600, NULL },
- { "parenleft", 600, NULL },
- { "one", 600, NULL },
- { "emacron", 600, NULL },
- { "Odieresis", 600, NULL },
{ "ucircumflex", 600, NULL },
- { "bracketleft", 600, NULL },
- { "Ugrave", 600, NULL },
- { "quoteright", 600, NULL },
- { "Udieresis", 600, NULL },
- { "perthousand", 600, NULL },
- { "Ydieresis", 600, NULL },
- { "umacron", 600, NULL },
- { "abreve", 600, NULL },
- { "Eacute", 600, NULL },
- { "adieresis", 600, NULL },
- { "egrave", 600, NULL },
- { "edieresis", 600, NULL },
- { "idieresis", 600, NULL },
- { "Eth", 600, NULL },
- { "ae", 600, NULL },
- { "asterisk", 600, NULL },
- { "odieresis", 600, NULL },
- { "Uacute", 600, NULL },
- { "ugrave", 600, NULL },
- { "nine", 600, NULL },
- { "five", 600, NULL },
- { "udieresis", 600, NULL },
- { "Zcaron", 600, NULL },
- { "Scommaaccent", 600, NULL },
- { "threequarters", 600, NULL },
- { "guillemotright", 600, NULL },
- { "Ccedilla", 600, NULL },
- { "ydieresis", 600, NULL },
- { "tilde", 600, NULL },
- { "at", 600, NULL },
- { "eacute", 600, NULL },
- { "underscore", 600, NULL },
- { "Euro", 600, NULL },
- { "Dcroat", 600, NULL },
- { "multiply", 600, NULL },
- { "zero", 600, NULL },
- { "eth", 600, NULL },
- { "Scedilla", 600, NULL },
- { "Ograve", 600, NULL },
- { "Racute", 600, NULL },
- { "partialdiff", 600, NULL },
- { "uacute", 600, NULL },
- { "braceleft", 600, NULL },
- { "Thorn", 600, NULL },
- { "zcaron", 600, NULL },
- { "scommaaccent", 600, NULL },
- { "ccedilla", 600, NULL },
- { "Dcaron", 600, NULL },
- { "dcroat", 600, NULL },
- { "Ocircumflex", 600, NULL },
- { "Oacute", 600, NULL },
- { "scedilla", 600, NULL },
- { "ogonek", 600, NULL },
- { "ograve", 600, NULL },
- { "racute", 600, NULL },
- { "Tcaron", 600, NULL },
+ { "r", 600, NULL },
+ { "three", 600, NULL },
{ "Eogonek", 600, NULL },
- { "thorn", 600, NULL },
- { "degree", 600, NULL },
- { "registered", 600, NULL },
- { "radical", 600, NULL },
+ { "macron", 600, NULL },
+ { "Lcaron", 600, NULL },
+ { "ordmasculine", 600, NULL },
+ { "backslash", 600, NULL },
+ { "questiondown", 600, NULL },
+ { "Oacute", 600, NULL },
+ { "t", 600, NULL },
+ { "quotedbl", 600, NULL },
+ { "ellipsis", 600, NULL },
{ "Aring", 600, NULL },
- { "percent", 600, NULL },
- { "six", 600, NULL },
- { "paragraph", 600, NULL },
- { "dcaron", 600, NULL },
- { "Uogonek", 600, NULL },
- { "two", 600, NULL },
- { "summation", 600, NULL },
- { "Igrave", 600, NULL },
- { "Lacute", 600, NULL },
- { "ocircumflex", 600, NULL },
- { "oacute", 600, NULL },
- { "Uring", 600, NULL },
- { "Lcommaaccent", 600, NULL },
- { "tcaron", 600, NULL },
- { "eogonek", 600, NULL },
- { "Delta", 600, NULL },
- { "Ohungarumlaut", 600, NULL },
- { "asciicircum", 600, NULL },
- { "aring", 600, NULL },
- { "grave", 600, NULL },
- { "uogonek", 600, NULL },
- { "bracketright", 600, NULL },
- { "Iacute", 600, NULL },
- { "ampersand", 600, NULL },
- { "igrave", 600, NULL },
- { "lacute", 600, NULL },
- { "Ncaron", 600, NULL },
- { "plus", 600, NULL },
+ { "agrave", 600, NULL },
+ { "c", 600, NULL },
+ { "d", 600, NULL },
+ { "one", 600, NULL },
+ { "I", 600, NULL },
+ { "eight", 600, NULL },
+ { "periodcentered", 600, NULL },
+ { "z", 600, NULL },
+ { "Uhungarumlaut", 600, NULL },
+ { "egrave", 600, NULL },
{ "uring", 600, NULL },
- { "quotesinglbase", 600, NULL },
- { "lcommaaccent", 600, NULL },
+ { "s", 600, NULL },
+ { "oacute", 600, NULL },
{ "Yacute", 600, NULL },
- { "ohungarumlaut", 600, NULL },
- { "threesuperior", 600, NULL },
+ { "daggerdbl", 600, NULL },
+ { "Atilde", 600, NULL },
+ { "Edieresis", 600, NULL },
+ { "onequarter", 600, NULL },
+ { "braceleft", 600, NULL },
+ { "braceright", 600, NULL },
{ "acute", 600, NULL },
- { "section", 600, NULL },
- { "dieresis", 600, NULL },
- { "iacute", 600, NULL },
- { "quotedblbase", 600, NULL },
- { "ncaron", 600, NULL },
- { "florin", 600, NULL },
- { "yacute", 600, NULL },
- { "Rcommaaccent", 600, NULL },
- { "fi", 600, NULL },
- { "fl", 600, NULL },
- { "Acircumflex", 600, NULL },
+ { "quotesingle", 600, NULL },
+ { "bar", 600, NULL },
+ { "i", 600, NULL },
+ { "multiply", 600, NULL },
+ { "lslash", 600, NULL },
+ { "P", 600, NULL },
+ { "six", 600, NULL },
+ { "edotaccent", 600, NULL },
+ { "guilsinglleft", 600, NULL },
+ { "h", 600, NULL },
{ "Cacute", 600, NULL },
- { "Icircumflex", 600, NULL },
- { "guillemotleft", 600, NULL },
- { "germandbls", 600, NULL },
- { "Amacron", 600, NULL },
- { "seven", 600, NULL },
- { "Sacute", 600, NULL },
- { "ordmasculine", 600, NULL },
- { "dotlessi", 600, NULL },
- { "sterling", 600, NULL },
- { "notequal", 600, NULL },
- { "Imacron", 600, NULL },
- { "rcommaaccent", 600, NULL },
- { "Zdotaccent", 600, NULL },
- { "acircumflex", 600, NULL },
+ { "plus", 600, NULL },
+ { "question", 600, NULL },
+ { "summation", 600, NULL },
+ { "A", 600, NULL },
+ { "igrave", 600, NULL },
+ { "dcroat", 600, NULL },
+ { "m", 600, NULL },
+ { "OE", 600, NULL },
+ { "partialdiff", 600, NULL },
+ { "U", 600, NULL },
+ { "x", 600, NULL },
+ { "y", 600, NULL },
+ { "Iogonek", 600, NULL },
+ { "edieresis", 600, NULL },
+ { "Ncaron", 600, NULL },
{ "cacute", 600, NULL },
- { "Ecaron", 600, NULL },
- { "icircumflex", 600, NULL },
- { "braceright", 600, NULL },
- { "quotedblright", 600, NULL },
- { "amacron", 600, NULL },
- { "sacute", 600, NULL },
- { "imacron", 600, NULL },
- { "cent", 600, NULL },
- { "currency", 600, NULL },
+ { "Dcroat", 600, NULL },
+ { "rcaron", 600, NULL },
+ { "tcaron", 600, NULL },
+ { "ncommaaccent", 600, NULL },
+ { "tcommaaccent", 600, NULL },
{ "logicalnot", 600, NULL },
- { "zdotaccent", 600, NULL },
- { "Atilde", 600, NULL },
- { "breve", 600, NULL },
- { "bar", 600, NULL },
- { "fraction", 600, NULL },
- { "less", 600, NULL },
- { "ecaron", 600, NULL },
- { "guilsinglleft", 600, NULL },
- { "exclam", 600, NULL },
- { "period", 600, NULL },
+ { "ordfeminine", 600, NULL },
+ { "quotedblleft", 600, NULL },
+ { "S", 600, NULL },
+ { "omacron", 600, NULL },
+ { "Delta", 600, NULL },
+ { "comma", 600, NULL },
+ { "Gbreve", 600, NULL },
+ { "ugrave", 600, NULL },
+ { "dcaron", 600, NULL },
+ { "hyphen", 600, NULL },
+ { "Oslash", 600, NULL },
+ { "a", 600, NULL },
+ { "B", 600, NULL },
{ "Rcaron", 600, NULL },
- { "Kcommaaccent", 600, NULL },
- { "greater", 600, NULL },
- { "atilde", 600, NULL },
- { "brokenbar", 600, NULL },
- { "quoteleft", 600, NULL },
- { "Edotaccent", 600, NULL },
- { "onesuperior", 600, NULL }
+ { "kcommaaccent", 600, NULL },
+ { "yacute", 600, NULL },
+ { "ydieresis", 600, NULL },
+ { "R", 600, NULL },
+ { "aacute", 600, NULL },
+ { "umacron", 600, NULL },
+ { "Otilde", 600, NULL },
+ { "Tcaron", 600, NULL },
+ { "eogonek", 600, NULL },
+ { "bullet", 600, NULL },
+ { "eacute", 600, NULL },
+ { "Zdotaccent", 600, NULL },
+ { "scaron", 600, NULL },
+ { "guillemotright", 600, NULL },
+ { "two", 600, NULL },
+ { "uacute", 600, NULL },
+ { "seven", 600, NULL },
+ { "Abreve", 600, NULL },
+ { "Udieresis", 600, NULL },
+ { "Iacute", 600, NULL },
+ { "Icircumflex", 600, NULL },
+ { "O", 600, NULL },
+ { "nacute", 600, NULL },
+ { "dieresis", 600, NULL },
+ { "Eacute", 600, NULL },
+ { "ntilde", 600, NULL },
+ { "fi", 600, NULL },
+ { "trademark", 600, NULL },
+ { "ampersand", 600, NULL },
+ { "Lcommaaccent", 600, NULL }
};
static BuiltinFontWidth helveticaWidthsTab[] = {
+ { "lcommaaccent", 222, NULL },
+ { "onehalf", 834, NULL },
+ { "uhungarumlaut", 556, NULL },
+ { "gbreve", 556, NULL },
+ { "n", 556, NULL },
+ { "Ecaron", 667, NULL },
+ { "threesuperior", 333, NULL },
+ { "zdotaccent", 500, NULL },
+ { "quoteleft", 222, NULL },
+ { "registered", 737, NULL },
+ { "Gcommaaccent", 778, NULL },
+ { "Racute", 722, NULL },
+ { "k", 500, NULL },
+ { "copyright", 737, NULL },
+ { "icircumflex", 278, NULL },
+ { "abreve", 556, NULL },
+ { "Imacron", 278, NULL },
+ { "iacute", 278, NULL },
+ { "e", 556, NULL },
+ { "equal", 584, NULL },
+ { "dagger", 556, NULL },
+ { "N", 722, NULL },
+ { "C", 722, NULL },
+ { "u", 556, NULL },
+ { "q", 556, NULL },
+ { "l", 222, NULL },
+ { "greater", 584, NULL },
+ { "asterisk", 389, NULL },
+ { "Emacron", 667, NULL },
+ { "scommaaccent", 500, NULL },
+ { "onesuperior", 333, NULL },
+ { "percent", 889, NULL },
+ { "o", 556, NULL },
+ { "Euro", 556, NULL },
+ { "florin", 556, NULL },
+ { "iogonek", 222, NULL },
+ { "section", 556, NULL },
+ { "Scaron", 667, NULL },
+ { "degree", 400, NULL },
+ { "K", 667, NULL },
+ { "Scommaaccent", 667, NULL },
+ { "Aacute", 667, NULL },
+ { "b", 556, NULL },
+ { "Dcaron", 722, NULL },
+ { "Z", 611, NULL },
+ { "ecircumflex", 556, NULL },
+ { "Amacron", 667, NULL },
+ { "breve", 333, NULL },
+ { "lcaron", 299, NULL },
+ { "paragraph", 537, NULL },
+ { "zcaron", 500, NULL },
+ { "aring", 556, NULL },
+ { "Ydieresis", 667, NULL },
+ { "Odieresis", 778, NULL },
+ { "oe", 944, NULL },
+ { "five", 556, NULL },
+ { "X", 667, NULL },
+ { "asciicircum", 469, NULL },
+ { "emdash", 1000, NULL },
+ { "Egrave", 667, NULL },
+ { "aogonek", 556, NULL },
+ { "ring", 333, NULL },
{ "Ntilde", 722, NULL },
- { "rcaron", 333, NULL },
- { "kcommaaccent", 500, NULL },
- { "Ncommaaccent", 722, NULL },
- { "Zacute", 611, NULL },
- { "comma", 278, NULL },
- { "cedilla", 333, NULL },
+ { "radical", 453, NULL },
+ { "dotlessi", 278, NULL },
+ { "p", 556, NULL },
{ "plusminus", 584, NULL },
- { "circumflex", 333, NULL },
- { "dotaccent", 333, NULL },
- { "edotaccent", 556, NULL },
- { "asciitilde", 584, NULL },
+ { "cedilla", 333, NULL },
+ { "Idotaccent", 278, NULL },
+ { "quotedblright", 333, NULL },
+ { "Eth", 722, NULL },
+ { "g", 556, NULL },
{ "colon", 278, NULL },
- { "onehalf", 834, NULL },
- { "dollar", 556, NULL },
- { "Lcaron", 556, NULL },
- { "ntilde", 556, NULL },
- { "Aogonek", 667, NULL },
- { "ncommaaccent", 556, NULL },
- { "minus", 584, NULL },
- { "Iogonek", 278, NULL },
- { "zacute", 500, NULL },
+ { "ccedilla", 500, NULL },
+ { "quotesinglbase", 222, NULL },
+ { "grave", 333, NULL },
+ { "Scedilla", 667, NULL },
+ { "parenleft", 333, NULL },
+ { "currency", 556, NULL },
+ { "nine", 556, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Ccaron", 722, NULL },
+ { "j", 222, NULL },
{ "yen", 556, NULL },
- { "space", 278, NULL },
+ { "Y", 667, NULL },
+ { "ccaron", 500, NULL },
{ "Omacron", 778, NULL },
- { "questiondown", 611, NULL },
- { "emdash", 1000, NULL },
- { "Agrave", 667, NULL },
- { "three", 556, NULL },
- { "numbersign", 556, NULL },
- { "lcaron", 299, NULL },
- { "A", 667, NULL },
- { "B", 667, NULL },
- { "C", 722, NULL },
- { "aogonek", 556, NULL },
+ { "lessequal", 549, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "dollar", 556, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "Nacute", 722, NULL },
+ { "v", 500, NULL },
+ { "dotaccent", 333, NULL },
+ { "rcommaaccent", 333, NULL },
+ { "Kcommaaccent", 667, NULL },
+ { "imacron", 278, NULL },
+ { "tilde", 333, NULL },
+ { "underscore", 556, NULL },
+ { "mu", 556, NULL },
{ "D", 722, NULL },
- { "E", 667, NULL },
- { "onequarter", 834, NULL },
+ { "racute", 333, NULL },
+ { "circumflex", 333, NULL },
+ { "Zcaron", 611, NULL },
+ { "ogonek", 333, NULL },
+ { "idieresis", 278, NULL },
+ { "cent", 556, NULL },
+ { "ae", 889, NULL },
+ { "ocircumflex", 556, NULL },
+ { "less", 584, NULL },
+ { "minus", 584, NULL },
+ { "four", 556, NULL },
{ "F", 611, NULL },
+ { "Ocircumflex", 778, NULL },
+ { "Uring", 722, NULL },
+ { "Edotaccent", 667, NULL },
+ { "perthousand", 1000, NULL },
+ { "acircumflex", 556, NULL },
{ "G", 778, NULL },
- { "H", 722, NULL },
- { "I", 278, NULL },
- { "J", 500, NULL },
- { "K", 667, NULL },
- { "iogonek", 222, NULL },
- { "backslash", 278, NULL },
- { "L", 556, NULL },
- { "periodcentered", 278, NULL },
+ { "commaaccent", 250, NULL },
+ { "W", 944, NULL },
+ { "bracketright", 278, NULL },
+ { "Ugrave", 722, NULL },
+ { "germandbls", 611, NULL },
+ { "thorn", 556, NULL },
+ { "zero", 556, NULL },
+ { "period", 278, NULL },
+ { "scedilla", 500, NULL },
+ { "udieresis", 556, NULL },
+ { "Ccedilla", 722, NULL },
+ { "Igrave", 278, NULL },
+ { "fl", 500, NULL },
+ { "quotedblbase", 333, NULL },
+ { "E", 667, NULL },
+ { "endash", 556, NULL },
+ { "guillemotleft", 556, NULL },
+ { "w", 722, NULL },
+ { "space", 278, NULL },
+ { "Thorn", 667, NULL },
+ { "eth", 556, NULL },
+ { "twosuperior", 333, NULL },
+ { "ecaron", 556, NULL },
+ { "brokenbar", 260, NULL },
+ { "Aogonek", 667, NULL },
{ "M", 833, NULL },
- { "N", 722, NULL },
- { "omacron", 556, NULL },
- { "Tcommaaccent", 611, NULL },
+ { "odieresis", 556, NULL },
+ { "Ograve", 778, NULL },
+ { "T", 611, NULL },
+ { "amacron", 556, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "numbersign", 556, NULL },
+ { "divide", 584, NULL },
+ { "emacron", 556, NULL },
+ { "Abreve", 667, NULL },
+ { "Udieresis", 722, NULL },
+ { "Iacute", 278, NULL },
+ { "two", 556, NULL },
+ { "uacute", 556, NULL },
+ { "seven", 556, NULL },
+ { "scaron", 500, NULL },
+ { "guillemotright", 556, NULL },
+ { "bullet", 350, NULL },
+ { "eogonek", 556, NULL },
+ { "eacute", 556, NULL },
+ { "Zdotaccent", 611, NULL },
+ { "trademark", 1000, NULL },
+ { "ampersand", 667, NULL },
+ { "Lcommaaccent", 556, NULL },
+ { "ntilde", 556, NULL },
+ { "fi", 500, NULL },
+ { "dieresis", 333, NULL },
+ { "Eacute", 667, NULL },
{ "O", 778, NULL },
- { "P", 667, NULL },
- { "Q", 778, NULL },
- { "Uhungarumlaut", 722, NULL },
- { "R", 722, NULL },
- { "Aacute", 667, NULL },
- { "caron", 333, NULL },
+ { "Icircumflex", 278, NULL },
+ { "nacute", 556, NULL },
+ { "omacron", 556, NULL },
+ { "comma", 278, NULL },
+ { "Delta", 612, NULL },
+ { "Gbreve", 778, NULL },
{ "S", 667, NULL },
- { "T", 611, NULL },
- { "U", 722, NULL },
- { "agrave", 556, NULL },
- { "V", 667, NULL },
- { "W", 944, NULL },
- { "X", 667, NULL },
- { "question", 556, NULL },
- { "equal", 584, NULL },
- { "Y", 667, NULL },
- { "Z", 611, NULL },
- { "four", 556, NULL },
+ { "quotedblleft", 333, NULL },
+ { "ordfeminine", 370, NULL },
+ { "Otilde", 778, NULL },
+ { "umacron", 556, NULL },
+ { "Tcaron", 611, NULL },
+ { "aacute", 556, NULL },
+ { "B", 667, NULL },
+ { "kcommaaccent", 500, NULL },
+ { "Rcaron", 722, NULL },
+ { "yacute", 500, NULL },
+ { "ydieresis", 500, NULL },
+ { "R", 722, NULL },
+ { "ugrave", 556, NULL },
+ { "dcaron", 643, NULL },
+ { "hyphen", 333, NULL },
+ { "Oslash", 778, NULL },
{ "a", 556, NULL },
- { "Gcommaaccent", 778, NULL },
- { "b", 556, NULL },
- { "c", 500, NULL },
- { "d", 556, NULL },
- { "e", 556, NULL },
- { "f", 278, NULL },
- { "g", 556, NULL },
- { "bullet", 350, NULL },
+ { "igrave", 278, NULL },
+ { "dcroat", 556, NULL },
+ { "question", 556, NULL },
+ { "summation", 600, NULL },
+ { "A", 667, NULL },
+ { "guilsinglleft", 333, NULL },
{ "h", 556, NULL },
- { "i", 222, NULL },
- { "Oslash", 778, NULL },
- { "dagger", 556, NULL },
- { "j", 222, NULL },
- { "k", 500, NULL },
- { "l", 222, NULL },
- { "m", 833, NULL },
- { "n", 556, NULL },
+ { "Cacute", 722, NULL },
+ { "plus", 584, NULL },
+ { "ncommaaccent", 556, NULL },
{ "tcommaaccent", 278, NULL },
- { "o", 556, NULL },
- { "ordfeminine", 370, NULL },
- { "ring", 333, NULL },
- { "p", 556, NULL },
- { "q", 556, NULL },
- { "uhungarumlaut", 556, NULL },
- { "r", 333, NULL },
- { "twosuperior", 333, NULL },
- { "aacute", 556, NULL },
- { "s", 500, NULL },
- { "OE", 1000, NULL },
- { "t", 278, NULL },
- { "divide", 584, NULL },
- { "u", 556, NULL },
- { "Ccaron", 722, NULL },
- { "v", 500, NULL },
- { "w", 722, NULL },
+ { "logicalnot", 584, NULL },
+ { "cacute", 500, NULL },
+ { "Dcroat", 722, NULL },
+ { "tcaron", 317, NULL },
+ { "rcaron", 333, NULL },
{ "x", 500, NULL },
+ { "Iogonek", 278, NULL },
{ "y", 500, NULL },
- { "z", 500, NULL },
- { "Gbreve", 778, NULL },
- { "commaaccent", 250, NULL },
- { "hungarumlaut", 333, NULL },
- { "Idotaccent", 278, NULL },
- { "Nacute", 722, NULL },
- { "quotedbl", 355, NULL },
- { "gcommaaccent", 556, NULL },
- { "mu", 556, NULL },
- { "greaterequal", 549, NULL },
- { "Scaron", 667, NULL },
- { "Lslash", 556, NULL },
- { "semicolon", 278, NULL },
- { "oslash", 611, NULL },
- { "lessequal", 549, NULL },
- { "lozenge", 471, NULL },
- { "parenright", 333, NULL },
- { "ccaron", 500, NULL },
- { "Ecircumflex", 667, NULL },
- { "gbreve", 556, NULL },
- { "trademark", 1000, NULL },
+ { "edieresis", 556, NULL },
+ { "Ncaron", 722, NULL },
+ { "m", 833, NULL },
+ { "OE", 1000, NULL },
+ { "U", 722, NULL },
+ { "partialdiff", 476, NULL },
+ { "braceright", 334, NULL },
+ { "braceleft", 334, NULL },
+ { "acute", 333, NULL },
+ { "onequarter", 834, NULL },
+ { "Atilde", 667, NULL },
+ { "Edieresis", 667, NULL },
+ { "Yacute", 667, NULL },
+ { "oacute", 556, NULL },
{ "daggerdbl", 556, NULL },
- { "nacute", 556, NULL },
- { "macron", 333, NULL },
- { "Otilde", 778, NULL },
- { "Emacron", 667, NULL },
- { "ellipsis", 1000, NULL },
- { "scaron", 500, NULL },
- { "AE", 1000, NULL },
- { "Ucircumflex", 722, NULL },
+ { "six", 556, NULL },
+ { "edotaccent", 556, NULL },
+ { "P", 667, NULL },
{ "lslash", 222, NULL },
- { "quotedblleft", 333, NULL },
- { "guilsinglright", 333, NULL },
- { "hyphen", 333, NULL },
+ { "multiply", 584, NULL },
+ { "i", 222, NULL },
{ "quotesingle", 191, NULL },
+ { "bar", 260, NULL },
+ { "agrave", 556, NULL },
+ { "ellipsis", 1000, NULL },
+ { "Aring", 667, NULL },
+ { "t", 278, NULL },
+ { "quotedbl", 355, NULL },
+ { "Oacute", 778, NULL },
+ { "egrave", 556, NULL },
+ { "uring", 556, NULL },
+ { "s", 500, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "z", 500, NULL },
{ "eight", 556, NULL },
- { "exclamdown", 333, NULL },
- { "endash", 556, NULL },
- { "oe", 944, NULL },
- { "Abreve", 667, NULL },
+ { "I", 278, NULL },
+ { "one", 556, NULL },
+ { "periodcentered", 278, NULL },
+ { "c", 500, NULL },
+ { "d", 556, NULL },
+ { "zacute", 500, NULL },
{ "Umacron", 722, NULL },
- { "ecircumflex", 556, NULL },
- { "Adieresis", 667, NULL },
- { "copyright", 737, NULL },
- { "Egrave", 667, NULL },
+ { "ncaron", 556, NULL },
+ { "adieresis", 556, NULL },
+ { "lozenge", 471, NULL },
+ { "V", 667, NULL },
+ { "Q", 778, NULL },
+ { "exclamdown", 333, NULL },
+ { "quoteright", 222, NULL },
+ { "uogonek", 556, NULL },
+ { "semicolon", 278, NULL },
+ { "guilsinglright", 333, NULL },
+ { "Eogonek", 667, NULL },
+ { "macron", 333, NULL },
+ { "ordmasculine", 365, NULL },
+ { "Lcaron", 556, NULL },
+ { "backslash", 278, NULL },
+ { "questiondown", 611, NULL },
+ { "three", 556, NULL },
{ "slash", 278, NULL },
- { "Edieresis", 667, NULL },
- { "otilde", 556, NULL },
- { "Idieresis", 278, NULL },
- { "parenleft", 333, NULL },
- { "one", 556, NULL },
- { "emacron", 556, NULL },
- { "Odieresis", 778, NULL },
{ "ucircumflex", 556, NULL },
+ { "r", 333, NULL },
+ { "f", 278, NULL },
+ { "gcommaaccent", 556, NULL },
+ { "Ohungarumlaut", 778, NULL },
{ "bracketleft", 278, NULL },
- { "Ugrave", 722, NULL },
- { "quoteright", 222, NULL },
- { "Udieresis", 722, NULL },
- { "perthousand", 1000, NULL },
- { "Ydieresis", 667, NULL },
- { "umacron", 556, NULL },
- { "abreve", 556, NULL },
- { "Eacute", 667, NULL },
- { "adieresis", 556, NULL },
- { "egrave", 556, NULL },
- { "edieresis", 556, NULL },
- { "idieresis", 278, NULL },
- { "Eth", 722, NULL },
- { "ae", 889, NULL },
- { "asterisk", 389, NULL },
- { "odieresis", 556, NULL },
- { "Uacute", 722, NULL },
- { "ugrave", 556, NULL },
- { "nine", 556, NULL },
- { "five", 556, NULL },
- { "udieresis", 556, NULL },
- { "Zcaron", 611, NULL },
- { "Scommaaccent", 667, NULL },
- { "threequarters", 834, NULL },
- { "guillemotright", 556, NULL },
- { "Ccedilla", 722, NULL },
- { "ydieresis", 500, NULL },
- { "tilde", 333, NULL },
- { "at", 1015, NULL },
- { "eacute", 556, NULL },
- { "underscore", 556, NULL },
- { "Euro", 556, NULL },
- { "Dcroat", 722, NULL },
- { "multiply", 584, NULL },
- { "zero", 556, NULL },
- { "eth", 556, NULL },
- { "Scedilla", 667, NULL },
- { "Ograve", 778, NULL },
- { "Racute", 722, NULL },
- { "partialdiff", 476, NULL },
- { "uacute", 556, NULL },
- { "braceleft", 334, NULL },
- { "Thorn", 667, NULL },
- { "zcaron", 500, NULL },
- { "scommaaccent", 500, NULL },
- { "ccedilla", 500, NULL },
- { "Dcaron", 722, NULL },
- { "dcroat", 556, NULL },
- { "Ocircumflex", 778, NULL },
- { "Oacute", 778, NULL },
- { "scedilla", 500, NULL },
- { "ogonek", 333, NULL },
+ { "otilde", 556, NULL },
+ { "parenright", 333, NULL },
+ { "Rcommaaccent", 722, NULL },
{ "ograve", 556, NULL },
- { "racute", 333, NULL },
- { "Tcaron", 611, NULL },
- { "Eogonek", 667, NULL },
- { "thorn", 556, NULL },
- { "degree", 400, NULL },
- { "registered", 737, NULL },
- { "radical", 453, NULL },
- { "Aring", 667, NULL },
- { "percent", 889, NULL },
- { "six", 556, NULL },
- { "paragraph", 537, NULL },
- { "dcaron", 643, NULL },
- { "Uogonek", 722, NULL },
- { "two", 556, NULL },
- { "summation", 600, NULL },
- { "Igrave", 278, NULL },
{ "Lacute", 556, NULL },
- { "ocircumflex", 556, NULL },
- { "oacute", 556, NULL },
- { "Uring", 722, NULL },
- { "Lcommaaccent", 556, NULL },
- { "tcaron", 317, NULL },
- { "eogonek", 556, NULL },
- { "Delta", 612, NULL },
- { "Ohungarumlaut", 778, NULL },
- { "asciicircum", 469, NULL },
- { "aring", 556, NULL },
- { "grave", 333, NULL },
- { "uogonek", 556, NULL },
- { "bracketright", 278, NULL },
- { "Iacute", 278, NULL },
- { "ampersand", 667, NULL },
- { "igrave", 278, NULL },
+ { "sacute", 500, NULL },
+ { "Idieresis", 278, NULL },
+ { "Uogonek", 722, NULL },
+ { "Lslash", 556, NULL },
+ { "caron", 333, NULL },
{ "lacute", 222, NULL },
- { "Ncaron", 722, NULL },
- { "plus", 584, NULL },
- { "uring", 556, NULL },
- { "quotesinglbase", 222, NULL },
- { "lcommaaccent", 222, NULL },
- { "Yacute", 667, NULL },
- { "ohungarumlaut", 556, NULL },
- { "threesuperior", 333, NULL },
- { "acute", 333, NULL },
- { "section", 556, NULL },
- { "dieresis", 333, NULL },
- { "iacute", 278, NULL },
- { "quotedblbase", 333, NULL },
- { "ncaron", 556, NULL },
- { "florin", 556, NULL },
- { "yacute", 500, NULL },
- { "Rcommaaccent", 722, NULL },
- { "fi", 500, NULL },
- { "fl", 500, NULL },
- { "Acircumflex", 667, NULL },
- { "Cacute", 722, NULL },
- { "Icircumflex", 278, NULL },
- { "guillemotleft", 556, NULL },
- { "germandbls", 611, NULL },
- { "Amacron", 667, NULL },
- { "seven", 556, NULL },
- { "Sacute", 667, NULL },
- { "ordmasculine", 365, NULL },
- { "dotlessi", 278, NULL },
{ "sterling", 556, NULL },
+ { "H", 722, NULL },
+ { "at", 1015, NULL },
+ { "greaterequal", 549, NULL },
+ { "threequarters", 834, NULL },
+ { "J", 500, NULL },
+ { "L", 556, NULL },
+ { "ohungarumlaut", 556, NULL },
+ { "Ecircumflex", 667, NULL },
{ "notequal", 549, NULL },
- { "Imacron", 278, NULL },
- { "rcommaaccent", 333, NULL },
- { "Zdotaccent", 611, NULL },
- { "acircumflex", 556, NULL },
- { "cacute", 500, NULL },
- { "Ecaron", 667, NULL },
- { "icircumflex", 278, NULL },
- { "braceright", 334, NULL },
- { "quotedblright", 333, NULL },
- { "amacron", 556, NULL },
- { "sacute", 500, NULL },
- { "imacron", 278, NULL },
- { "cent", 556, NULL },
- { "currency", 556, NULL },
- { "logicalnot", 584, NULL },
- { "zdotaccent", 500, NULL },
- { "Atilde", 667, NULL },
- { "breve", 333, NULL },
- { "bar", 260, NULL },
- { "fraction", 167, NULL },
- { "less", 584, NULL },
- { "ecaron", 556, NULL },
- { "guilsinglleft", 333, NULL },
{ "exclam", 278, NULL },
- { "period", 278, NULL },
- { "Rcaron", 722, NULL },
- { "Kcommaaccent", 667, NULL },
- { "greater", 584, NULL },
+ { "Agrave", 667, NULL },
+ { "AE", 1000, NULL },
+ { "Acircumflex", 667, NULL },
+ { "oslash", 611, NULL },
+ { "Uacute", 722, NULL },
{ "atilde", 556, NULL },
- { "brokenbar", 260, NULL },
- { "quoteleft", 222, NULL },
- { "Edotaccent", 667, NULL },
- { "onesuperior", 333, NULL }
+ { "Zacute", 611, NULL },
+ { "fraction", 167, NULL },
+ { "Sacute", 667, NULL },
+ { "Adieresis", 667, NULL },
+ { "asciitilde", 584, NULL }
};
static BuiltinFontWidth helveticaBoldWidthsTab[] = {
- { "Ntilde", 722, NULL },
- { "rcaron", 389, NULL },
- { "kcommaaccent", 556, NULL },
- { "Ncommaaccent", 722, NULL },
- { "Zacute", 611, NULL },
- { "comma", 278, NULL },
- { "cedilla", 333, NULL },
- { "plusminus", 584, NULL },
- { "circumflex", 333, NULL },
- { "dotaccent", 333, NULL },
- { "edotaccent", 556, NULL },
- { "asciitilde", 584, NULL },
- { "colon", 333, NULL },
- { "onehalf", 834, NULL },
- { "dollar", 556, NULL },
- { "Lcaron", 611, NULL },
- { "ntilde", 611, NULL },
- { "Aogonek", 722, NULL },
- { "ncommaaccent", 611, NULL },
- { "minus", 584, NULL },
- { "Iogonek", 278, NULL },
+ { "uogonek", 611, NULL },
+ { "quoteright", 278, NULL },
+ { "guilsinglright", 333, NULL },
+ { "semicolon", 333, NULL },
+ { "V", 667, NULL },
+ { "lozenge", 494, NULL },
+ { "exclamdown", 333, NULL },
+ { "Q", 778, NULL },
{ "zacute", 500, NULL },
- { "yen", 556, NULL },
- { "space", 278, NULL },
- { "Omacron", 778, NULL },
- { "questiondown", 611, NULL },
- { "emdash", 1000, NULL },
- { "Agrave", 722, NULL },
+ { "Umacron", 722, NULL },
+ { "adieresis", 556, NULL },
+ { "ncaron", 611, NULL },
+ { "slash", 278, NULL },
+ { "r", 389, NULL },
+ { "ucircumflex", 611, NULL },
{ "three", 556, NULL },
- { "numbersign", 556, NULL },
- { "lcaron", 400, NULL },
- { "A", 722, NULL },
- { "B", 722, NULL },
- { "C", 722, NULL },
- { "aogonek", 556, NULL },
- { "D", 722, NULL },
- { "E", 667, NULL },
- { "onequarter", 834, NULL },
- { "F", 611, NULL },
- { "G", 778, NULL },
- { "H", 722, NULL },
- { "I", 278, NULL },
- { "J", 556, NULL },
- { "K", 722, NULL },
- { "iogonek", 278, NULL },
+ { "ordmasculine", 365, NULL },
+ { "Lcaron", 611, NULL },
{ "backslash", 278, NULL },
- { "L", 611, NULL },
- { "periodcentered", 278, NULL },
- { "M", 833, NULL },
- { "N", 722, NULL },
- { "omacron", 611, NULL },
- { "Tcommaaccent", 611, NULL },
- { "O", 778, NULL },
- { "P", 667, NULL },
- { "Q", 778, NULL },
- { "Uhungarumlaut", 722, NULL },
- { "R", 722, NULL },
- { "Aacute", 722, NULL },
- { "caron", 333, NULL },
- { "S", 667, NULL },
- { "T", 611, NULL },
- { "U", 722, NULL },
+ { "questiondown", 611, NULL },
+ { "macron", 333, NULL },
+ { "Eogonek", 667, NULL },
+ { "Oacute", 778, NULL },
+ { "t", 333, NULL },
+ { "quotedbl", 474, NULL },
+ { "ellipsis", 1000, NULL },
+ { "Aring", 722, NULL },
{ "agrave", 556, NULL },
- { "V", 667, NULL },
- { "W", 944, NULL },
- { "X", 667, NULL },
- { "question", 611, NULL },
- { "equal", 584, NULL },
- { "Y", 667, NULL },
- { "Z", 611, NULL },
- { "four", 556, NULL },
- { "a", 556, NULL },
- { "Gcommaaccent", 778, NULL },
- { "b", 611, NULL },
- { "c", 556, NULL },
{ "d", 611, NULL },
- { "e", 556, NULL },
- { "f", 333, NULL },
- { "g", 611, NULL },
- { "bullet", 350, NULL },
- { "h", 611, NULL },
- { "i", 278, NULL },
- { "Oslash", 778, NULL },
- { "dagger", 556, NULL },
- { "j", 278, NULL },
- { "k", 556, NULL },
- { "l", 278, NULL },
- { "m", 889, NULL },
- { "n", 611, NULL },
- { "tcommaaccent", 333, NULL },
- { "o", 611, NULL },
- { "ordfeminine", 370, NULL },
- { "ring", 333, NULL },
- { "p", 611, NULL },
- { "q", 611, NULL },
- { "uhungarumlaut", 611, NULL },
- { "r", 389, NULL },
- { "twosuperior", 333, NULL },
- { "aacute", 556, NULL },
- { "s", 556, NULL },
- { "OE", 1000, NULL },
- { "t", 333, NULL },
- { "divide", 584, NULL },
- { "u", 611, NULL },
- { "Ccaron", 722, NULL },
- { "v", 556, NULL },
- { "w", 778, NULL },
- { "x", 556, NULL },
- { "y", 556, NULL },
+ { "c", 556, NULL },
+ { "I", 278, NULL },
+ { "one", 556, NULL },
+ { "eight", 556, NULL },
+ { "periodcentered", 278, NULL },
{ "z", 500, NULL },
- { "Gbreve", 778, NULL },
- { "commaaccent", 250, NULL },
- { "hungarumlaut", 333, NULL },
- { "Idotaccent", 278, NULL },
- { "Nacute", 722, NULL },
- { "quotedbl", 474, NULL },
- { "gcommaaccent", 611, NULL },
- { "mu", 611, NULL },
- { "greaterequal", 549, NULL },
- { "Scaron", 667, NULL },
- { "Lslash", 611, NULL },
- { "semicolon", 333, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "egrave", 556, NULL },
+ { "s", 556, NULL },
+ { "uring", 611, NULL },
+ { "Agrave", 722, NULL },
+ { "AE", 1000, NULL },
+ { "exclam", 333, NULL },
+ { "notequal", 549, NULL },
{ "oslash", 611, NULL },
- { "lessequal", 549, NULL },
- { "lozenge", 494, NULL },
- { "parenright", 333, NULL },
- { "ccaron", 556, NULL },
+ { "Acircumflex", 722, NULL },
+ { "J", 556, NULL },
+ { "threequarters", 834, NULL },
+ { "ohungarumlaut", 611, NULL },
+ { "L", 611, NULL },
{ "Ecircumflex", 667, NULL },
- { "gbreve", 611, NULL },
- { "trademark", 1000, NULL },
- { "daggerdbl", 556, NULL },
- { "nacute", 611, NULL },
- { "macron", 333, NULL },
- { "Otilde", 778, NULL },
- { "Emacron", 667, NULL },
- { "ellipsis", 1000, NULL },
- { "scaron", 556, NULL },
- { "AE", 1000, NULL },
- { "Ucircumflex", 722, NULL },
- { "lslash", 278, NULL },
- { "quotedblleft", 500, NULL },
- { "guilsinglright", 333, NULL },
- { "hyphen", 333, NULL },
- { "quotesingle", 238, NULL },
- { "eight", 556, NULL },
- { "exclamdown", 333, NULL },
- { "endash", 556, NULL },
- { "oe", 944, NULL },
- { "Abreve", 722, NULL },
- { "Umacron", 722, NULL },
- { "ecircumflex", 556, NULL },
+ { "H", 722, NULL },
+ { "sterling", 556, NULL },
+ { "greaterequal", 549, NULL },
+ { "at", 975, NULL },
+ { "lacute", 278, NULL },
+ { "Uogonek", 722, NULL },
+ { "caron", 333, NULL },
+ { "Lslash", 611, NULL },
+ { "asciitilde", 584, NULL },
+ { "fraction", 167, NULL },
{ "Adieresis", 722, NULL },
- { "copyright", 737, NULL },
- { "Egrave", 667, NULL },
- { "slash", 278, NULL },
- { "Edieresis", 667, NULL },
+ { "Sacute", 667, NULL },
+ { "Uacute", 722, NULL },
+ { "Zacute", 611, NULL },
+ { "atilde", 556, NULL },
{ "otilde", 611, NULL },
- { "Idieresis", 278, NULL },
- { "parenleft", 333, NULL },
- { "one", 556, NULL },
- { "emacron", 556, NULL },
- { "Odieresis", 778, NULL },
- { "ucircumflex", 611, NULL },
+ { "parenright", 333, NULL },
+ { "gcommaaccent", 611, NULL },
{ "bracketleft", 333, NULL },
- { "Ugrave", 722, NULL },
- { "quoteright", 278, NULL },
- { "Udieresis", 722, NULL },
- { "perthousand", 1000, NULL },
- { "Ydieresis", 667, NULL },
- { "umacron", 611, NULL },
- { "abreve", 556, NULL },
- { "Eacute", 667, NULL },
- { "adieresis", 556, NULL },
- { "egrave", 556, NULL },
- { "edieresis", 556, NULL },
- { "idieresis", 278, NULL },
- { "Eth", 722, NULL },
- { "ae", 889, NULL },
- { "asterisk", 389, NULL },
- { "odieresis", 611, NULL },
- { "Uacute", 722, NULL },
+ { "Ohungarumlaut", 778, NULL },
+ { "f", 333, NULL },
+ { "Lacute", 611, NULL },
+ { "sacute", 556, NULL },
+ { "Idieresis", 278, NULL },
+ { "ograve", 611, NULL },
+ { "Rcommaaccent", 722, NULL },
+ { "ordfeminine", 370, NULL },
+ { "quotedblleft", 500, NULL },
+ { "S", 667, NULL },
+ { "comma", 278, NULL },
+ { "Delta", 612, NULL },
+ { "omacron", 611, NULL },
+ { "Gbreve", 778, NULL },
+ { "dcaron", 743, NULL },
{ "ugrave", 611, NULL },
- { "nine", 556, NULL },
- { "five", 556, NULL },
- { "udieresis", 611, NULL },
- { "Zcaron", 611, NULL },
- { "Scommaaccent", 667, NULL },
- { "threequarters", 834, NULL },
- { "guillemotright", 556, NULL },
- { "Ccedilla", 722, NULL },
+ { "a", 556, NULL },
+ { "hyphen", 333, NULL },
+ { "Oslash", 778, NULL },
+ { "B", 722, NULL },
+ { "R", 722, NULL },
{ "ydieresis", 556, NULL },
- { "tilde", 333, NULL },
- { "dbldaggerumlaut", 556, NULL },
- { "at", 975, NULL },
+ { "yacute", 556, NULL },
+ { "kcommaaccent", 556, NULL },
+ { "Rcaron", 722, NULL },
+ { "aacute", 556, NULL },
+ { "Otilde", 778, NULL },
+ { "umacron", 611, NULL },
+ { "Tcaron", 611, NULL },
+ { "bullet", 350, NULL },
+ { "eogonek", 556, NULL },
{ "eacute", 556, NULL },
- { "underscore", 556, NULL },
- { "Euro", 556, NULL },
- { "Dcroat", 722, NULL },
- { "multiply", 584, NULL },
- { "zero", 556, NULL },
- { "eth", 611, NULL },
- { "Scedilla", 667, NULL },
- { "Ograve", 778, NULL },
- { "Racute", 722, NULL },
- { "partialdiff", 494, NULL },
+ { "Zdotaccent", 611, NULL },
+ { "scaron", 556, NULL },
+ { "guillemotright", 556, NULL },
{ "uacute", 611, NULL },
- { "braceleft", 389, NULL },
- { "Thorn", 667, NULL },
- { "zcaron", 500, NULL },
- { "scommaaccent", 556, NULL },
- { "ccedilla", 556, NULL },
- { "Dcaron", 722, NULL },
- { "dcroat", 611, NULL },
- { "Ocircumflex", 778, NULL },
- { "Oacute", 778, NULL },
- { "scedilla", 556, NULL },
- { "ogonek", 333, NULL },
- { "ograve", 611, NULL },
- { "racute", 389, NULL },
- { "Tcaron", 611, NULL },
- { "Eogonek", 667, NULL },
- { "thorn", 611, NULL },
- { "degree", 400, NULL },
- { "registered", 737, NULL },
- { "radical", 549, NULL },
- { "Aring", 722, NULL },
- { "percent", 889, NULL },
- { "six", 556, NULL },
- { "paragraph", 556, NULL },
- { "dcaron", 743, NULL },
- { "Uogonek", 722, NULL },
{ "two", 556, NULL },
- { "summation", 600, NULL },
- { "Igrave", 278, NULL },
- { "Lacute", 611, NULL },
- { "ocircumflex", 611, NULL },
- { "oacute", 611, NULL },
- { "Uring", 722, NULL },
- { "Lcommaaccent", 611, NULL },
- { "tcaron", 389, NULL },
- { "eogonek", 556, NULL },
- { "Delta", 612, NULL },
- { "Ohungarumlaut", 778, NULL },
- { "asciicircum", 584, NULL },
- { "aring", 556, NULL },
- { "grave", 333, NULL },
- { "uogonek", 611, NULL },
- { "bracketright", 333, NULL },
+ { "seven", 556, NULL },
+ { "Abreve", 722, NULL },
+ { "Udieresis", 722, NULL },
{ "Iacute", 278, NULL },
+ { "nacute", 611, NULL },
+ { "O", 778, NULL },
+ { "Icircumflex", 278, NULL },
+ { "dieresis", 333, NULL },
+ { "Eacute", 667, NULL },
+ { "ntilde", 611, NULL },
+ { "fi", 611, NULL },
{ "ampersand", 722, NULL },
- { "igrave", 278, NULL },
- { "lacute", 278, NULL },
- { "Ncaron", 722, NULL },
- { "plus", 584, NULL },
- { "uring", 611, NULL },
- { "quotesinglbase", 278, NULL },
- { "lcommaaccent", 278, NULL },
+ { "trademark", 1000, NULL },
+ { "Lcommaaccent", 611, NULL },
{ "Yacute", 667, NULL },
- { "ohungarumlaut", 611, NULL },
- { "threesuperior", 333, NULL },
+ { "oacute", 611, NULL },
+ { "daggerdbl", 556, NULL },
+ { "Atilde", 722, NULL },
+ { "Edieresis", 667, NULL },
+ { "onequarter", 834, NULL },
{ "acute", 333, NULL },
- { "section", 556, NULL },
- { "dieresis", 333, NULL },
- { "iacute", 278, NULL },
- { "quotedblbase", 500, NULL },
- { "ncaron", 611, NULL },
- { "florin", 556, NULL },
- { "yacute", 556, NULL },
- { "Rcommaaccent", 722, NULL },
- { "fi", 611, NULL },
- { "fl", 611, NULL },
- { "Acircumflex", 722, NULL },
+ { "braceright", 389, NULL },
+ { "braceleft", 389, NULL },
+ { "quotesingle", 238, NULL },
+ { "bar", 280, NULL },
+ { "i", 278, NULL },
+ { "multiply", 584, NULL },
+ { "lslash", 278, NULL },
+ { "P", 667, NULL },
+ { "edotaccent", 556, NULL },
+ { "six", 556, NULL },
{ "Cacute", 722, NULL },
- { "Icircumflex", 278, NULL },
- { "guillemotleft", 556, NULL },
- { "germandbls", 611, NULL },
- { "Amacron", 722, NULL },
- { "seven", 556, NULL },
- { "Sacute", 667, NULL },
- { "ordmasculine", 365, NULL },
- { "dotlessi", 278, NULL },
- { "sterling", 556, NULL },
- { "notequal", 549, NULL },
- { "Imacron", 278, NULL },
- { "rcommaaccent", 389, NULL },
- { "Zdotaccent", 611, NULL },
- { "acircumflex", 556, NULL },
+ { "h", 611, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "plus", 584, NULL },
+ { "summation", 600, NULL },
+ { "question", 611, NULL },
+ { "A", 722, NULL },
+ { "dcroat", 611, NULL },
+ { "igrave", 278, NULL },
+ { "OE", 1000, NULL },
+ { "m", 889, NULL },
+ { "U", 722, NULL },
+ { "partialdiff", 494, NULL },
+ { "y", 556, NULL },
+ { "Iogonek", 278, NULL },
+ { "edieresis", 556, NULL },
+ { "x", 556, NULL },
+ { "Ncaron", 722, NULL },
+ { "Dcroat", 722, NULL },
{ "cacute", 556, NULL },
- { "Ecaron", 667, NULL },
- { "icircumflex", 278, NULL },
- { "braceright", 389, NULL },
- { "quotedblright", 500, NULL },
- { "amacron", 556, NULL },
- { "sacute", 556, NULL },
+ { "tcaron", 389, NULL },
+ { "rcaron", 389, NULL },
+ { "ncommaaccent", 611, NULL },
+ { "logicalnot", 584, NULL },
+ { "tcommaaccent", 333, NULL },
+ { "underscore", 556, NULL },
+ { "racute", 389, NULL },
+ { "D", 722, NULL },
+ { "mu", 611, NULL },
+ { "Kcommaaccent", 722, NULL },
{ "imacron", 278, NULL },
+ { "rcommaaccent", 389, NULL },
+ { "tilde", 333, NULL },
+ { "dollar", 556, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "dotaccent", 333, NULL },
+ { "Nacute", 722, NULL },
+ { "v", 556, NULL },
+ { "less", 584, NULL },
+ { "ocircumflex", 611, NULL },
+ { "four", 556, NULL },
+ { "minus", 584, NULL },
+ { "ae", 889, NULL },
{ "cent", 556, NULL },
+ { "ogonek", 333, NULL },
+ { "idieresis", 278, NULL },
+ { "circumflex", 333, NULL },
+ { "Zcaron", 611, NULL },
+ { "nine", 556, NULL },
{ "currency", 556, NULL },
- { "logicalnot", 584, NULL },
- { "zdotaccent", 500, NULL },
- { "Atilde", 722, NULL },
- { "breve", 333, NULL },
- { "bar", 280, NULL },
- { "fraction", 167, NULL },
- { "less", 584, NULL },
+ { "parenleft", 333, NULL },
+ { "Scedilla", 667, NULL },
+ { "grave", 333, NULL },
+ { "quotesinglbase", 278, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "lessequal", 549, NULL },
+ { "Omacron", 778, NULL },
+ { "ccaron", 556, NULL },
+ { "Y", 667, NULL },
+ { "yen", 556, NULL },
+ { "Ccaron", 722, NULL },
+ { "j", 278, NULL },
+ { "hungarumlaut", 333, NULL },
{ "ecaron", 556, NULL },
- { "guilsinglleft", 333, NULL },
- { "exclam", 333, NULL },
+ { "brokenbar", 280, NULL },
+ { "Aogonek", 722, NULL },
+ { "w", 778, NULL },
+ { "twosuperior", 333, NULL },
+ { "eth", 611, NULL },
+ { "Thorn", 667, NULL },
+ { "space", 278, NULL },
+ { "guillemotleft", 556, NULL },
+ { "endash", 556, NULL },
+ { "fl", 611, NULL },
+ { "E", 667, NULL },
+ { "quotedblbase", 500, NULL },
+ { "numbersign", 556, NULL },
+ { "emacron", 556, NULL },
+ { "divide", 584, NULL },
+ { "amacron", 556, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "T", 611, NULL },
+ { "odieresis", 611, NULL },
+ { "M", 833, NULL },
+ { "Ograve", 778, NULL },
+ { "G", 778, NULL },
+ { "perthousand", 1000, NULL },
+ { "Edotaccent", 667, NULL },
+ { "acircumflex", 556, NULL },
+ { "F", 611, NULL },
+ { "Ocircumflex", 778, NULL },
+ { "Uring", 722, NULL },
+ { "Ccedilla", 722, NULL },
+ { "Igrave", 278, NULL },
+ { "zero", 556, NULL },
+ { "udieresis", 611, NULL },
{ "period", 278, NULL },
- { "Rcaron", 722, NULL },
- { "Kcommaaccent", 722, NULL },
+ { "scedilla", 556, NULL },
+ { "germandbls", 611, NULL },
+ { "Ugrave", 722, NULL },
+ { "thorn", 611, NULL },
+ { "commaaccent", 250, NULL },
+ { "W", 944, NULL },
+ { "bracketright", 333, NULL },
+ { "l", 278, NULL },
+ { "q", 611, NULL },
+ { "N", 722, NULL },
+ { "dagger", 556, NULL },
+ { "equal", 584, NULL },
+ { "u", 611, NULL },
+ { "C", 722, NULL },
+ { "iacute", 278, NULL },
+ { "e", 556, NULL },
+ { "Imacron", 278, NULL },
+ { "abreve", 556, NULL },
+ { "icircumflex", 278, NULL },
+ { "percent", 889, NULL },
+ { "o", 611, NULL },
+ { "asterisk", 389, NULL },
+ { "Emacron", 667, NULL },
+ { "scommaaccent", 556, NULL },
+ { "onesuperior", 333, NULL },
{ "greater", 584, NULL },
- { "atilde", 556, NULL },
- { "brokenbar", 280, NULL },
+ { "Ecaron", 667, NULL },
+ { "zdotaccent", 500, NULL },
+ { "threesuperior", 333, NULL },
+ { "n", 611, NULL },
+ { "dbldaggerumlaut", 556, NULL },
+ { "onehalf", 834, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "uhungarumlaut", 611, NULL },
+ { "gbreve", 611, NULL },
+ { "k", 556, NULL },
+ { "copyright", 737, NULL },
+ { "Racute", 722, NULL },
+ { "Gcommaaccent", 778, NULL },
{ "quoteleft", 278, NULL },
- { "Edotaccent", 667, NULL },
- { "onesuperior", 333, NULL }
+ { "registered", 737, NULL },
+ { "aogonek", 556, NULL },
+ { "Egrave", 667, NULL },
+ { "ring", 333, NULL },
+ { "emdash", 1000, NULL },
+ { "five", 556, NULL },
+ { "asciicircum", 584, NULL },
+ { "X", 667, NULL },
+ { "oe", 944, NULL },
+ { "Odieresis", 778, NULL },
+ { "ccedilla", 556, NULL },
+ { "g", 611, NULL },
+ { "colon", 333, NULL },
+ { "Idotaccent", 278, NULL },
+ { "cedilla", 333, NULL },
+ { "plusminus", 584, NULL },
+ { "Eth", 722, NULL },
+ { "quotedblright", 500, NULL },
+ { "p", 611, NULL },
+ { "dotlessi", 278, NULL },
+ { "radical", 549, NULL },
+ { "Ntilde", 722, NULL },
+ { "Aacute", 722, NULL },
+ { "Scommaaccent", 667, NULL },
+ { "b", 611, NULL },
+ { "K", 722, NULL },
+ { "Scaron", 667, NULL },
+ { "degree", 400, NULL },
+ { "section", 556, NULL },
+ { "florin", 556, NULL },
+ { "iogonek", 278, NULL },
+ { "Euro", 556, NULL },
+ { "paragraph", 556, NULL },
+ { "zcaron", 500, NULL },
+ { "lcaron", 400, NULL },
+ { "Ydieresis", 667, NULL },
+ { "aring", 556, NULL },
+ { "breve", 333, NULL },
+ { "Amacron", 722, NULL },
+ { "Dcaron", 722, NULL },
+ { "ecircumflex", 556, NULL },
+ { "Z", 611, NULL }
};
static BuiltinFontWidth helveticaBoldObliqueWidthsTab[] = {
- { "Ntilde", 722, NULL },
- { "rcaron", 389, NULL },
- { "kcommaaccent", 556, NULL },
+ { "divide", 584, NULL },
+ { "emacron", 556, NULL },
+ { "numbersign", 556, NULL },
{ "Ncommaaccent", 722, NULL },
- { "Zacute", 611, NULL },
- { "comma", 278, NULL },
- { "cedilla", 333, NULL },
- { "plusminus", 584, NULL },
+ { "amacron", 556, NULL },
+ { "T", 611, NULL },
+ { "Ograve", 778, NULL },
+ { "M", 833, NULL },
+ { "odieresis", 611, NULL },
+ { "Aogonek", 722, NULL },
+ { "brokenbar", 280, NULL },
+ { "ecaron", 556, NULL },
+ { "Thorn", 667, NULL },
+ { "space", 278, NULL },
+ { "twosuperior", 333, NULL },
+ { "eth", 611, NULL },
+ { "w", 778, NULL },
+ { "endash", 556, NULL },
+ { "guillemotleft", 556, NULL },
+ { "E", 667, NULL },
+ { "quotedblbase", 500, NULL },
+ { "fl", 611, NULL },
+ { "Igrave", 278, NULL },
+ { "Ccedilla", 722, NULL },
+ { "period", 278, NULL },
+ { "scedilla", 556, NULL },
+ { "udieresis", 611, NULL },
+ { "zero", 556, NULL },
+ { "thorn", 611, NULL },
+ { "Ugrave", 722, NULL },
+ { "germandbls", 611, NULL },
+ { "bracketright", 333, NULL },
+ { "W", 944, NULL },
+ { "commaaccent", 250, NULL },
+ { "G", 778, NULL },
+ { "acircumflex", 556, NULL },
+ { "Edotaccent", 667, NULL },
+ { "perthousand", 1000, NULL },
+ { "Uring", 722, NULL },
+ { "F", 611, NULL },
+ { "Ocircumflex", 778, NULL },
+ { "minus", 584, NULL },
+ { "four", 556, NULL },
+ { "ocircumflex", 611, NULL },
+ { "less", 584, NULL },
+ { "ae", 889, NULL },
+ { "cent", 556, NULL },
+ { "idieresis", 278, NULL },
+ { "ogonek", 333, NULL },
+ { "Zcaron", 611, NULL },
{ "circumflex", 333, NULL },
+ { "D", 722, NULL },
+ { "mu", 611, NULL },
+ { "racute", 389, NULL },
+ { "underscore", 556, NULL },
+ { "tilde", 333, NULL },
+ { "rcommaaccent", 389, NULL },
+ { "Kcommaaccent", 722, NULL },
+ { "imacron", 278, NULL },
+ { "Nacute", 722, NULL },
+ { "v", 556, NULL },
{ "dotaccent", 333, NULL },
- { "edotaccent", 556, NULL },
- { "asciitilde", 584, NULL },
- { "colon", 333, NULL },
- { "onehalf", 834, NULL },
+ { "Tcommaaccent", 611, NULL },
{ "dollar", 556, NULL },
- { "Lcaron", 611, NULL },
- { "ntilde", 611, NULL },
- { "Aogonek", 722, NULL },
- { "ncommaaccent", 611, NULL },
- { "minus", 584, NULL },
- { "Iogonek", 278, NULL },
- { "zacute", 500, NULL },
- { "yen", 556, NULL },
- { "space", 278, NULL },
+ { "lessequal", 549, NULL },
+ { "Ucircumflex", 722, NULL },
{ "Omacron", 778, NULL },
- { "questiondown", 611, NULL },
+ { "ccaron", 556, NULL },
+ { "yen", 556, NULL },
+ { "Y", 667, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Ccaron", 722, NULL },
+ { "j", 278, NULL },
+ { "currency", 556, NULL },
+ { "nine", 556, NULL },
+ { "parenleft", 333, NULL },
+ { "grave", 333, NULL },
+ { "Scedilla", 667, NULL },
+ { "quotesinglbase", 278, NULL },
+ { "g", 611, NULL },
+ { "colon", 333, NULL },
+ { "ccedilla", 556, NULL },
+ { "quotedblright", 500, NULL },
+ { "Eth", 722, NULL },
+ { "plusminus", 584, NULL },
+ { "cedilla", 333, NULL },
+ { "Idotaccent", 278, NULL },
+ { "dotlessi", 278, NULL },
+ { "p", 611, NULL },
+ { "Ntilde", 722, NULL },
+ { "radical", 549, NULL },
+ { "ring", 333, NULL },
+ { "Egrave", 667, NULL },
+ { "aogonek", 556, NULL },
{ "emdash", 1000, NULL },
- { "Agrave", 722, NULL },
- { "three", 556, NULL },
- { "numbersign", 556, NULL },
+ { "X", 667, NULL },
+ { "asciicircum", 584, NULL },
+ { "five", 556, NULL },
+ { "Odieresis", 778, NULL },
+ { "oe", 944, NULL },
+ { "aring", 556, NULL },
+ { "Ydieresis", 667, NULL },
{ "lcaron", 400, NULL },
- { "A", 722, NULL },
- { "B", 722, NULL },
- { "C", 722, NULL },
- { "aogonek", 556, NULL },
- { "D", 722, NULL },
- { "E", 667, NULL },
- { "onequarter", 834, NULL },
- { "F", 611, NULL },
- { "G", 778, NULL },
- { "H", 722, NULL },
- { "I", 278, NULL },
- { "J", 556, NULL },
+ { "zcaron", 500, NULL },
+ { "paragraph", 556, NULL },
+ { "Amacron", 722, NULL },
+ { "breve", 333, NULL },
+ { "Z", 611, NULL },
+ { "ecircumflex", 556, NULL },
+ { "Dcaron", 722, NULL },
+ { "b", 611, NULL },
+ { "Scommaaccent", 667, NULL },
+ { "Aacute", 722, NULL },
{ "K", 722, NULL },
+ { "section", 556, NULL },
+ { "Scaron", 667, NULL },
+ { "degree", 400, NULL },
+ { "Euro", 556, NULL },
+ { "florin", 556, NULL },
{ "iogonek", 278, NULL },
- { "backslash", 278, NULL },
- { "L", 611, NULL },
- { "periodcentered", 278, NULL },
- { "M", 833, NULL },
- { "N", 722, NULL },
- { "omacron", 611, NULL },
- { "Tcommaaccent", 611, NULL },
- { "O", 778, NULL },
- { "P", 667, NULL },
- { "Q", 778, NULL },
- { "Uhungarumlaut", 722, NULL },
- { "R", 722, NULL },
- { "Aacute", 722, NULL },
- { "caron", 333, NULL },
- { "S", 667, NULL },
- { "T", 611, NULL },
- { "U", 722, NULL },
- { "agrave", 556, NULL },
- { "V", 667, NULL },
- { "W", 944, NULL },
- { "X", 667, NULL },
- { "question", 611, NULL },
+ { "o", 611, NULL },
+ { "percent", 889, NULL },
+ { "onesuperior", 333, NULL },
+ { "scommaaccent", 556, NULL },
+ { "Emacron", 667, NULL },
+ { "asterisk", 389, NULL },
+ { "greater", 584, NULL },
+ { "q", 611, NULL },
+ { "l", 278, NULL },
+ { "C", 722, NULL },
+ { "u", 611, NULL },
+ { "dagger", 556, NULL },
{ "equal", 584, NULL },
- { "Y", 667, NULL },
- { "Z", 611, NULL },
- { "four", 556, NULL },
- { "a", 556, NULL },
- { "Gcommaaccent", 778, NULL },
- { "b", 611, NULL },
- { "c", 556, NULL },
- { "d", 611, NULL },
+ { "N", 722, NULL },
+ { "Imacron", 278, NULL },
+ { "abreve", 556, NULL },
+ { "iacute", 278, NULL },
{ "e", 556, NULL },
- { "f", 333, NULL },
- { "g", 611, NULL },
- { "bullet", 350, NULL },
- { "h", 611, NULL },
- { "i", 278, NULL },
- { "Oslash", 778, NULL },
- { "dagger", 556, NULL },
- { "j", 278, NULL },
+ { "icircumflex", 278, NULL },
+ { "copyright", 737, NULL },
{ "k", 556, NULL },
- { "l", 278, NULL },
- { "m", 889, NULL },
+ { "Racute", 722, NULL },
+ { "Gcommaaccent", 778, NULL },
+ { "registered", 737, NULL },
+ { "quoteleft", 278, NULL },
+ { "threesuperior", 333, NULL },
+ { "zdotaccent", 500, NULL },
+ { "Ecaron", 667, NULL },
{ "n", 611, NULL },
- { "tcommaaccent", 333, NULL },
- { "o", 611, NULL },
- { "ordfeminine", 370, NULL },
- { "ring", 333, NULL },
- { "p", 611, NULL },
- { "q", 611, NULL },
+ { "gbreve", 611, NULL },
{ "uhungarumlaut", 611, NULL },
- { "r", 389, NULL },
- { "twosuperior", 333, NULL },
- { "aacute", 556, NULL },
- { "s", 556, NULL },
- { "OE", 1000, NULL },
- { "t", 333, NULL },
- { "divide", 584, NULL },
- { "u", 611, NULL },
- { "Ccaron", 722, NULL },
- { "v", 556, NULL },
- { "w", 778, NULL },
- { "x", 556, NULL },
- { "y", 556, NULL },
- { "z", 500, NULL },
- { "Gbreve", 778, NULL },
- { "commaaccent", 250, NULL },
- { "hungarumlaut", 333, NULL },
- { "Idotaccent", 278, NULL },
- { "Nacute", 722, NULL },
- { "quotedbl", 474, NULL },
- { "gcommaaccent", 611, NULL },
- { "mu", 611, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "onehalf", 834, NULL },
+ { "asciitilde", 584, NULL },
+ { "Adieresis", 722, NULL },
+ { "Sacute", 667, NULL },
+ { "fraction", 167, NULL },
+ { "atilde", 556, NULL },
+ { "Zacute", 611, NULL },
+ { "Uacute", 722, NULL },
+ { "Acircumflex", 722, NULL },
+ { "oslash", 611, NULL },
+ { "notequal", 549, NULL },
+ { "AE", 1000, NULL },
+ { "Agrave", 722, NULL },
+ { "exclam", 333, NULL },
+ { "L", 611, NULL },
+ { "ohungarumlaut", 611, NULL },
+ { "Ecircumflex", 667, NULL },
+ { "threequarters", 834, NULL },
+ { "J", 556, NULL },
{ "greaterequal", 549, NULL },
- { "Scaron", 667, NULL },
+ { "at", 975, NULL },
+ { "sterling", 556, NULL },
+ { "H", 722, NULL },
{ "Lslash", 611, NULL },
- { "semicolon", 333, NULL },
- { "oslash", 611, NULL },
- { "lessequal", 549, NULL },
- { "lozenge", 494, NULL },
+ { "Uogonek", 722, NULL },
+ { "caron", 333, NULL },
+ { "lacute", 278, NULL },
+ { "sacute", 556, NULL },
+ { "Idieresis", 278, NULL },
+ { "Lacute", 611, NULL },
+ { "Rcommaaccent", 722, NULL },
+ { "ograve", 611, NULL },
{ "parenright", 333, NULL },
- { "ccaron", 556, NULL },
- { "Ecircumflex", 667, NULL },
- { "gbreve", 611, NULL },
- { "trademark", 1000, NULL },
- { "daggerdbl", 556, NULL },
- { "nacute", 611, NULL },
+ { "otilde", 611, NULL },
+ { "Ohungarumlaut", 778, NULL },
+ { "bracketleft", 333, NULL },
+ { "gcommaaccent", 611, NULL },
+ { "f", 333, NULL },
+ { "r", 389, NULL },
+ { "ucircumflex", 611, NULL },
+ { "slash", 278, NULL },
+ { "three", 556, NULL },
+ { "Eogonek", 667, NULL },
{ "macron", 333, NULL },
- { "Otilde", 778, NULL },
- { "Emacron", 667, NULL },
- { "ellipsis", 1000, NULL },
- { "scaron", 556, NULL },
- { "AE", 1000, NULL },
- { "Ucircumflex", 722, NULL },
- { "lslash", 278, NULL },
- { "quotedblleft", 500, NULL },
+ { "Lcaron", 611, NULL },
+ { "ordmasculine", 365, NULL },
+ { "backslash", 278, NULL },
+ { "questiondown", 611, NULL },
+ { "semicolon", 333, NULL },
{ "guilsinglright", 333, NULL },
- { "hyphen", 333, NULL },
- { "quotesingle", 238, NULL },
- { "eight", 556, NULL },
+ { "uogonek", 611, NULL },
+ { "quoteright", 278, NULL },
+ { "Q", 778, NULL },
{ "exclamdown", 333, NULL },
- { "endash", 556, NULL },
- { "oe", 944, NULL },
- { "Abreve", 722, NULL },
+ { "lozenge", 494, NULL },
+ { "V", 667, NULL },
+ { "ncaron", 611, NULL },
+ { "adieresis", 556, NULL },
+ { "zacute", 500, NULL },
{ "Umacron", 722, NULL },
- { "ecircumflex", 556, NULL },
- { "Adieresis", 722, NULL },
- { "copyright", 737, NULL },
- { "Egrave", 667, NULL },
- { "slash", 278, NULL },
- { "Edieresis", 667, NULL },
- { "otilde", 611, NULL },
- { "Idieresis", 278, NULL },
- { "parenleft", 333, NULL },
+ { "c", 556, NULL },
+ { "d", 611, NULL },
+ { "periodcentered", 278, NULL },
+ { "eight", 556, NULL },
+ { "I", 278, NULL },
{ "one", 556, NULL },
- { "emacron", 556, NULL },
- { "Odieresis", 778, NULL },
- { "ucircumflex", 611, NULL },
- { "bracketleft", 333, NULL },
- { "Ugrave", 722, NULL },
- { "quoteright", 278, NULL },
- { "Udieresis", 722, NULL },
- { "perthousand", 1000, NULL },
- { "Ydieresis", 667, NULL },
- { "umacron", 611, NULL },
- { "abreve", 556, NULL },
- { "Eacute", 667, NULL },
- { "adieresis", 556, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "z", 500, NULL },
+ { "uring", 611, NULL },
+ { "s", 556, NULL },
{ "egrave", 556, NULL },
- { "edieresis", 556, NULL },
- { "idieresis", 278, NULL },
- { "Eth", 722, NULL },
- { "ae", 889, NULL },
- { "asterisk", 389, NULL },
- { "odieresis", 611, NULL },
- { "Uacute", 722, NULL },
- { "ugrave", 611, NULL },
- { "nine", 556, NULL },
- { "five", 556, NULL },
- { "udieresis", 611, NULL },
- { "Zcaron", 611, NULL },
- { "Scommaaccent", 667, NULL },
- { "threequarters", 834, NULL },
- { "guillemotright", 556, NULL },
- { "Ccedilla", 722, NULL },
- { "ydieresis", 556, NULL },
- { "tilde", 333, NULL },
- { "at", 975, NULL },
- { "eacute", 556, NULL },
- { "underscore", 556, NULL },
- { "Euro", 556, NULL },
- { "Dcroat", 722, NULL },
- { "multiply", 584, NULL },
- { "zero", 556, NULL },
- { "eth", 611, NULL },
- { "Scedilla", 667, NULL },
- { "Ograve", 778, NULL },
- { "Racute", 722, NULL },
- { "partialdiff", 494, NULL },
- { "uacute", 611, NULL },
- { "braceleft", 389, NULL },
- { "Thorn", 667, NULL },
- { "zcaron", 500, NULL },
- { "scommaaccent", 556, NULL },
- { "ccedilla", 556, NULL },
- { "Dcaron", 722, NULL },
- { "dcroat", 611, NULL },
- { "Ocircumflex", 778, NULL },
{ "Oacute", 778, NULL },
- { "scedilla", 556, NULL },
- { "ogonek", 333, NULL },
- { "ograve", 611, NULL },
- { "racute", 389, NULL },
- { "Tcaron", 611, NULL },
- { "Eogonek", 667, NULL },
- { "thorn", 611, NULL },
- { "degree", 400, NULL },
- { "registered", 737, NULL },
- { "radical", 549, NULL },
+ { "quotedbl", 474, NULL },
+ { "t", 333, NULL },
{ "Aring", 722, NULL },
- { "percent", 889, NULL },
+ { "ellipsis", 1000, NULL },
+ { "agrave", 556, NULL },
+ { "bar", 280, NULL },
+ { "quotesingle", 238, NULL },
+ { "multiply", 584, NULL },
+ { "i", 278, NULL },
+ { "P", 667, NULL },
+ { "lslash", 278, NULL },
{ "six", 556, NULL },
- { "paragraph", 556, NULL },
- { "dcaron", 743, NULL },
- { "Uogonek", 722, NULL },
- { "two", 556, NULL },
- { "summation", 600, NULL },
- { "Igrave", 278, NULL },
- { "Lacute", 611, NULL },
- { "ocircumflex", 611, NULL },
- { "oacute", 611, NULL },
- { "Uring", 722, NULL },
- { "Lcommaaccent", 611, NULL },
- { "tcaron", 389, NULL },
- { "eogonek", 556, NULL },
- { "Delta", 612, NULL },
- { "Ohungarumlaut", 778, NULL },
- { "asciicircum", 584, NULL },
- { "aring", 556, NULL },
- { "grave", 333, NULL },
- { "uogonek", 611, NULL },
- { "bracketright", 333, NULL },
- { "Iacute", 278, NULL },
- { "ampersand", 722, NULL },
- { "igrave", 278, NULL },
- { "lacute", 278, NULL },
- { "Ncaron", 722, NULL },
- { "plus", 584, NULL },
- { "uring", 611, NULL },
- { "quotesinglbase", 278, NULL },
- { "lcommaaccent", 278, NULL },
+ { "edotaccent", 556, NULL },
+ { "daggerdbl", 556, NULL },
{ "Yacute", 667, NULL },
- { "ohungarumlaut", 611, NULL },
- { "threesuperior", 333, NULL },
+ { "oacute", 611, NULL },
+ { "Edieresis", 667, NULL },
+ { "Atilde", 722, NULL },
+ { "onequarter", 834, NULL },
+ { "braceright", 389, NULL },
+ { "braceleft", 389, NULL },
{ "acute", 333, NULL },
- { "section", 556, NULL },
- { "dieresis", 333, NULL },
- { "iacute", 278, NULL },
- { "quotedblbase", 500, NULL },
- { "ncaron", 611, NULL },
- { "florin", 556, NULL },
- { "yacute", 556, NULL },
- { "Rcommaaccent", 722, NULL },
- { "fi", 611, NULL },
- { "fl", 611, NULL },
- { "Acircumflex", 722, NULL },
- { "Cacute", 722, NULL },
- { "Icircumflex", 278, NULL },
- { "guillemotleft", 556, NULL },
- { "germandbls", 611, NULL },
- { "Amacron", 722, NULL },
- { "seven", 556, NULL },
- { "Sacute", 667, NULL },
- { "ordmasculine", 365, NULL },
- { "dotlessi", 278, NULL },
- { "sterling", 556, NULL },
- { "notequal", 549, NULL },
- { "Imacron", 278, NULL },
- { "rcommaaccent", 389, NULL },
- { "Zdotaccent", 611, NULL },
- { "acircumflex", 556, NULL },
+ { "partialdiff", 494, NULL },
+ { "U", 722, NULL },
+ { "m", 889, NULL },
+ { "OE", 1000, NULL },
+ { "Ncaron", 722, NULL },
+ { "x", 556, NULL },
+ { "edieresis", 556, NULL },
+ { "Iogonek", 278, NULL },
+ { "y", 556, NULL },
+ { "tcaron", 389, NULL },
+ { "rcaron", 389, NULL },
{ "cacute", 556, NULL },
- { "Ecaron", 667, NULL },
- { "icircumflex", 278, NULL },
- { "braceright", 389, NULL },
- { "quotedblright", 500, NULL },
- { "amacron", 556, NULL },
- { "sacute", 556, NULL },
- { "imacron", 278, NULL },
- { "cent", 556, NULL },
- { "currency", 556, NULL },
+ { "Dcroat", 722, NULL },
+ { "tcommaaccent", 333, NULL },
{ "logicalnot", 584, NULL },
- { "zdotaccent", 500, NULL },
- { "Atilde", 722, NULL },
- { "breve", 333, NULL },
- { "bar", 280, NULL },
- { "fraction", 167, NULL },
- { "less", 584, NULL },
- { "ecaron", 556, NULL },
+ { "ncommaaccent", 611, NULL },
+ { "plus", 584, NULL },
{ "guilsinglleft", 333, NULL },
- { "exclam", 333, NULL },
- { "period", 278, NULL },
+ { "h", 611, NULL },
+ { "Cacute", 722, NULL },
+ { "A", 722, NULL },
+ { "question", 611, NULL },
+ { "summation", 600, NULL },
+ { "igrave", 278, NULL },
+ { "dcroat", 611, NULL },
+ { "Oslash", 778, NULL },
+ { "hyphen", 333, NULL },
+ { "a", 556, NULL },
+ { "ugrave", 611, NULL },
+ { "dcaron", 743, NULL },
{ "Rcaron", 722, NULL },
- { "Kcommaaccent", 722, NULL },
- { "greater", 584, NULL },
- { "atilde", 556, NULL },
- { "brokenbar", 280, NULL },
- { "quoteleft", 278, NULL },
- { "Edotaccent", 667, NULL },
- { "onesuperior", 333, NULL }
+ { "kcommaaccent", 556, NULL },
+ { "yacute", 556, NULL },
+ { "ydieresis", 556, NULL },
+ { "R", 722, NULL },
+ { "B", 722, NULL },
+ { "aacute", 556, NULL },
+ { "Tcaron", 611, NULL },
+ { "Otilde", 778, NULL },
+ { "umacron", 611, NULL },
+ { "ordfeminine", 370, NULL },
+ { "quotedblleft", 500, NULL },
+ { "S", 667, NULL },
+ { "Gbreve", 778, NULL },
+ { "omacron", 611, NULL },
+ { "Delta", 612, NULL },
+ { "comma", 278, NULL },
+ { "O", 778, NULL },
+ { "Icircumflex", 278, NULL },
+ { "nacute", 611, NULL },
+ { "Eacute", 667, NULL },
+ { "dieresis", 333, NULL },
+ { "fi", 611, NULL },
+ { "ntilde", 611, NULL },
+ { "Lcommaaccent", 611, NULL },
+ { "trademark", 1000, NULL },
+ { "ampersand", 722, NULL },
+ { "Zdotaccent", 611, NULL },
+ { "bullet", 350, NULL },
+ { "eogonek", 556, NULL },
+ { "eacute", 556, NULL },
+ { "guillemotright", 556, NULL },
+ { "scaron", 556, NULL },
+ { "seven", 556, NULL },
+ { "two", 556, NULL },
+ { "uacute", 611, NULL },
+ { "Iacute", 278, NULL },
+ { "Udieresis", 722, NULL },
+ { "Abreve", 722, NULL }
};
static BuiltinFontWidth helveticaObliqueWidthsTab[] = {
- { "Ntilde", 722, NULL },
- { "rcaron", 333, NULL },
+ { "dieresis", 333, NULL },
+ { "Eacute", 667, NULL },
+ { "Icircumflex", 278, NULL },
+ { "O", 778, NULL },
+ { "nacute", 556, NULL },
+ { "trademark", 1000, NULL },
+ { "ampersand", 667, NULL },
+ { "Lcommaaccent", 556, NULL },
+ { "ntilde", 556, NULL },
+ { "fi", 500, NULL },
+ { "scaron", 500, NULL },
+ { "guillemotright", 556, NULL },
+ { "eacute", 556, NULL },
+ { "eogonek", 556, NULL },
+ { "bullet", 350, NULL },
+ { "Zdotaccent", 611, NULL },
+ { "Abreve", 667, NULL },
+ { "Udieresis", 722, NULL },
+ { "Iacute", 278, NULL },
+ { "two", 556, NULL },
+ { "uacute", 556, NULL },
+ { "seven", 556, NULL },
+ { "B", 667, NULL },
+ { "Rcaron", 722, NULL },
{ "kcommaaccent", 500, NULL },
- { "Ncommaaccent", 722, NULL },
- { "Zacute", 611, NULL },
+ { "yacute", 500, NULL },
+ { "R", 722, NULL },
+ { "ydieresis", 500, NULL },
+ { "ugrave", 556, NULL },
+ { "dcaron", 643, NULL },
+ { "Oslash", 778, NULL },
+ { "hyphen", 333, NULL },
+ { "a", 556, NULL },
+ { "umacron", 556, NULL },
+ { "Otilde", 778, NULL },
+ { "Tcaron", 611, NULL },
+ { "aacute", 556, NULL },
+ { "quotedblleft", 333, NULL },
+ { "ordfeminine", 370, NULL },
+ { "omacron", 556, NULL },
+ { "Delta", 612, NULL },
{ "comma", 278, NULL },
- { "cedilla", 333, NULL },
- { "plusminus", 584, NULL },
- { "circumflex", 333, NULL },
- { "dotaccent", 333, NULL },
- { "edotaccent", 556, NULL },
- { "asciitilde", 584, NULL },
- { "colon", 278, NULL },
- { "onehalf", 834, NULL },
- { "dollar", 556, NULL },
- { "Lcaron", 556, NULL },
- { "ntilde", 556, NULL },
- { "Aogonek", 667, NULL },
- { "ncommaaccent", 556, NULL },
- { "minus", 584, NULL },
+ { "Gbreve", 778, NULL },
+ { "S", 667, NULL },
+ { "x", 500, NULL },
+ { "y", 500, NULL },
{ "Iogonek", 278, NULL },
- { "zacute", 500, NULL },
- { "yen", 556, NULL },
- { "space", 278, NULL },
- { "Omacron", 778, NULL },
- { "questiondown", 611, NULL },
- { "emdash", 1000, NULL },
- { "Agrave", 667, NULL },
- { "three", 556, NULL },
- { "numbersign", 556, NULL },
- { "lcaron", 299, NULL },
+ { "edieresis", 556, NULL },
+ { "Ncaron", 722, NULL },
+ { "m", 833, NULL },
+ { "OE", 1000, NULL },
+ { "partialdiff", 476, NULL },
+ { "U", 722, NULL },
+ { "ncommaaccent", 556, NULL },
+ { "tcommaaccent", 278, NULL },
+ { "logicalnot", 584, NULL },
+ { "cacute", 500, NULL },
+ { "Dcroat", 722, NULL },
+ { "tcaron", 317, NULL },
+ { "rcaron", 333, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "Cacute", 722, NULL },
+ { "h", 556, NULL },
+ { "plus", 584, NULL },
+ { "igrave", 278, NULL },
+ { "dcroat", 556, NULL },
+ { "question", 556, NULL },
+ { "summation", 600, NULL },
{ "A", 667, NULL },
- { "B", 667, NULL },
- { "C", 722, NULL },
- { "aogonek", 556, NULL },
- { "D", 722, NULL },
- { "E", 667, NULL },
+ { "multiply", 584, NULL },
+ { "i", 222, NULL },
+ { "quotesingle", 191, NULL },
+ { "bar", 260, NULL },
+ { "six", 556, NULL },
+ { "edotaccent", 556, NULL },
+ { "lslash", 222, NULL },
+ { "P", 667, NULL },
+ { "Atilde", 667, NULL },
+ { "Edieresis", 667, NULL },
+ { "oacute", 556, NULL },
+ { "Yacute", 667, NULL },
+ { "daggerdbl", 556, NULL },
+ { "braceleft", 334, NULL },
+ { "braceright", 334, NULL },
+ { "acute", 333, NULL },
{ "onequarter", 834, NULL },
- { "F", 611, NULL },
- { "G", 778, NULL },
- { "H", 722, NULL },
+ { "one", 556, NULL },
{ "I", 278, NULL },
- { "J", 500, NULL },
- { "K", 667, NULL },
- { "iogonek", 222, NULL },
- { "backslash", 278, NULL },
- { "L", 556, NULL },
+ { "eight", 556, NULL },
{ "periodcentered", 278, NULL },
- { "M", 833, NULL },
- { "N", 722, NULL },
- { "omacron", 556, NULL },
- { "Tcommaaccent", 611, NULL },
- { "O", 778, NULL },
- { "P", 667, NULL },
- { "Q", 778, NULL },
- { "Uhungarumlaut", 722, NULL },
- { "R", 722, NULL },
- { "Aacute", 667, NULL },
- { "caron", 333, NULL },
- { "S", 667, NULL },
- { "T", 611, NULL },
- { "U", 722, NULL },
- { "agrave", 556, NULL },
- { "V", 667, NULL },
- { "W", 944, NULL },
- { "X", 667, NULL },
- { "question", 556, NULL },
- { "equal", 584, NULL },
- { "Y", 667, NULL },
- { "Z", 611, NULL },
- { "four", 556, NULL },
- { "a", 556, NULL },
- { "Gcommaaccent", 778, NULL },
- { "b", 556, NULL },
{ "c", 500, NULL },
{ "d", 556, NULL },
- { "e", 556, NULL },
- { "f", 278, NULL },
- { "g", 556, NULL },
- { "bullet", 350, NULL },
- { "h", 556, NULL },
- { "i", 222, NULL },
- { "Oslash", 778, NULL },
- { "dagger", 556, NULL },
- { "j", 222, NULL },
- { "k", 500, NULL },
- { "l", 222, NULL },
- { "m", 833, NULL },
- { "n", 556, NULL },
- { "tcommaaccent", 278, NULL },
- { "o", 556, NULL },
- { "ordfeminine", 370, NULL },
- { "ring", 333, NULL },
- { "p", 556, NULL },
- { "q", 556, NULL },
- { "uhungarumlaut", 556, NULL },
- { "r", 333, NULL },
- { "twosuperior", 333, NULL },
- { "aacute", 556, NULL },
+ { "egrave", 556, NULL },
+ { "uring", 556, NULL },
{ "s", 500, NULL },
- { "OE", 1000, NULL },
- { "t", 278, NULL },
- { "divide", 584, NULL },
- { "u", 556, NULL },
- { "Ccaron", 722, NULL },
- { "v", 500, NULL },
- { "w", 722, NULL },
- { "x", 500, NULL },
- { "y", 500, NULL },
+ { "Uhungarumlaut", 722, NULL },
{ "z", 500, NULL },
- { "Gbreve", 778, NULL },
- { "commaaccent", 250, NULL },
- { "hungarumlaut", 333, NULL },
- { "Idotaccent", 278, NULL },
- { "Nacute", 722, NULL },
+ { "t", 278, NULL },
{ "quotedbl", 355, NULL },
- { "gcommaaccent", 556, NULL },
- { "mu", 556, NULL },
- { "greaterequal", 549, NULL },
- { "Scaron", 667, NULL },
- { "Lslash", 556, NULL },
+ { "Oacute", 778, NULL },
+ { "agrave", 556, NULL },
+ { "ellipsis", 1000, NULL },
+ { "Aring", 667, NULL },
+ { "three", 556, NULL },
+ { "slash", 278, NULL },
+ { "ucircumflex", 556, NULL },
+ { "r", 333, NULL },
+ { "macron", 333, NULL },
+ { "Eogonek", 667, NULL },
+ { "Lcaron", 556, NULL },
+ { "questiondown", 611, NULL },
+ { "ordmasculine", 365, NULL },
+ { "backslash", 278, NULL },
+ { "uogonek", 556, NULL },
+ { "quoteright", 222, NULL },
{ "semicolon", 278, NULL },
- { "oslash", 611, NULL },
- { "lessequal", 549, NULL },
+ { "guilsinglright", 333, NULL },
+ { "Umacron", 722, NULL },
+ { "zacute", 500, NULL },
+ { "ncaron", 556, NULL },
+ { "adieresis", 556, NULL },
{ "lozenge", 471, NULL },
+ { "V", 667, NULL },
+ { "Q", 778, NULL },
+ { "exclamdown", 333, NULL },
+ { "Lacute", 556, NULL },
+ { "sacute", 500, NULL },
+ { "Idieresis", 278, NULL },
+ { "ograve", 556, NULL },
+ { "Rcommaaccent", 722, NULL },
+ { "gcommaaccent", 556, NULL },
+ { "Ohungarumlaut", 778, NULL },
+ { "bracketleft", 278, NULL },
+ { "otilde", 556, NULL },
{ "parenright", 333, NULL },
- { "ccaron", 500, NULL },
+ { "f", 278, NULL },
+ { "asciitilde", 584, NULL },
+ { "Uacute", 722, NULL },
+ { "atilde", 556, NULL },
+ { "Zacute", 611, NULL },
+ { "fraction", 167, NULL },
+ { "Sacute", 667, NULL },
+ { "Adieresis", 667, NULL },
+ { "threequarters", 834, NULL },
+ { "J", 500, NULL },
+ { "ohungarumlaut", 556, NULL },
{ "Ecircumflex", 667, NULL },
+ { "L", 556, NULL },
+ { "notequal", 549, NULL },
+ { "exclam", 278, NULL },
+ { "Agrave", 667, NULL },
+ { "AE", 1000, NULL },
+ { "Acircumflex", 667, NULL },
+ { "oslash", 611, NULL },
+ { "Uogonek", 722, NULL },
+ { "caron", 333, NULL },
+ { "Lslash", 556, NULL },
+ { "lacute", 222, NULL },
+ { "sterling", 556, NULL },
+ { "H", 722, NULL },
+ { "at", 1015, NULL },
+ { "greaterequal", 549, NULL },
+ { "Racute", 722, NULL },
+ { "k", 500, NULL },
+ { "copyright", 737, NULL },
+ { "quoteleft", 222, NULL },
+ { "registered", 737, NULL },
+ { "Gcommaaccent", 778, NULL },
+ { "n", 556, NULL },
+ { "Ecaron", 667, NULL },
+ { "threesuperior", 333, NULL },
+ { "zdotaccent", 500, NULL },
+ { "lcommaaccent", 222, NULL },
+ { "onehalf", 834, NULL },
{ "gbreve", 556, NULL },
- { "trademark", 1000, NULL },
- { "daggerdbl", 556, NULL },
- { "nacute", 556, NULL },
- { "macron", 333, NULL },
- { "Otilde", 778, NULL },
+ { "uhungarumlaut", 556, NULL },
+ { "percent", 889, NULL },
+ { "o", 556, NULL },
+ { "greater", 584, NULL },
+ { "asterisk", 389, NULL },
{ "Emacron", 667, NULL },
- { "ellipsis", 1000, NULL },
- { "scaron", 500, NULL },
- { "AE", 1000, NULL },
- { "Ucircumflex", 722, NULL },
- { "lslash", 222, NULL },
- { "quotedblleft", 333, NULL },
- { "guilsinglright", 333, NULL },
- { "hyphen", 333, NULL },
- { "quotesingle", 191, NULL },
- { "eight", 556, NULL },
- { "exclamdown", 333, NULL },
- { "endash", 556, NULL },
- { "oe", 944, NULL },
- { "Abreve", 667, NULL },
- { "Umacron", 722, NULL },
+ { "scommaaccent", 500, NULL },
+ { "onesuperior", 333, NULL },
+ { "dagger", 556, NULL },
+ { "equal", 584, NULL },
+ { "N", 722, NULL },
+ { "C", 722, NULL },
+ { "u", 556, NULL },
+ { "q", 556, NULL },
+ { "l", 222, NULL },
+ { "icircumflex", 278, NULL },
+ { "Imacron", 278, NULL },
+ { "abreve", 556, NULL },
+ { "iacute", 278, NULL },
+ { "e", 556, NULL },
+ { "lcaron", 299, NULL },
+ { "paragraph", 537, NULL },
+ { "zcaron", 500, NULL },
+ { "aring", 556, NULL },
+ { "Ydieresis", 667, NULL },
+ { "Dcaron", 722, NULL },
+ { "Z", 611, NULL },
{ "ecircumflex", 556, NULL },
- { "Adieresis", 667, NULL },
- { "copyright", 737, NULL },
+ { "Amacron", 667, NULL },
+ { "breve", 333, NULL },
+ { "K", 667, NULL },
+ { "Scommaaccent", 667, NULL },
+ { "Aacute", 667, NULL },
+ { "b", 556, NULL },
+ { "Euro", 556, NULL },
+ { "iogonek", 222, NULL },
+ { "florin", 556, NULL },
+ { "section", 556, NULL },
+ { "Scaron", 667, NULL },
+ { "degree", 400, NULL },
+ { "plusminus", 584, NULL },
+ { "cedilla", 333, NULL },
+ { "Idotaccent", 278, NULL },
+ { "quotedblright", 333, NULL },
+ { "Eth", 722, NULL },
+ { "colon", 278, NULL },
+ { "g", 556, NULL },
+ { "ccedilla", 500, NULL },
+ { "Ntilde", 722, NULL },
+ { "radical", 453, NULL },
+ { "dotlessi", 278, NULL },
+ { "p", 556, NULL },
+ { "emdash", 1000, NULL },
+ { "aogonek", 556, NULL },
{ "Egrave", 667, NULL },
- { "slash", 278, NULL },
- { "Edieresis", 667, NULL },
- { "otilde", 556, NULL },
- { "Idieresis", 278, NULL },
- { "parenleft", 333, NULL },
- { "one", 556, NULL },
- { "emacron", 556, NULL },
+ { "ring", 333, NULL },
{ "Odieresis", 778, NULL },
- { "ucircumflex", 556, NULL },
- { "bracketleft", 278, NULL },
- { "Ugrave", 722, NULL },
- { "quoteright", 222, NULL },
- { "Udieresis", 722, NULL },
- { "perthousand", 1000, NULL },
- { "Ydieresis", 667, NULL },
- { "umacron", 556, NULL },
- { "abreve", 556, NULL },
- { "Eacute", 667, NULL },
- { "adieresis", 556, NULL },
- { "egrave", 556, NULL },
- { "edieresis", 556, NULL },
- { "idieresis", 278, NULL },
- { "Eth", 722, NULL },
- { "ae", 889, NULL },
- { "asterisk", 389, NULL },
- { "odieresis", 556, NULL },
- { "Uacute", 722, NULL },
- { "ugrave", 556, NULL },
- { "nine", 556, NULL },
+ { "oe", 944, NULL },
{ "five", 556, NULL },
- { "udieresis", 556, NULL },
+ { "X", 667, NULL },
+ { "asciicircum", 469, NULL },
+ { "ccaron", 500, NULL },
+ { "Omacron", 778, NULL },
+ { "lessequal", 549, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "j", 222, NULL },
+ { "Ccaron", 722, NULL },
+ { "yen", 556, NULL },
+ { "Y", 667, NULL },
+ { "parenleft", 333, NULL },
+ { "currency", 556, NULL },
+ { "nine", 556, NULL },
+ { "quotesinglbase", 222, NULL },
+ { "grave", 333, NULL },
+ { "Scedilla", 667, NULL },
+ { "ae", 889, NULL },
+ { "cent", 556, NULL },
+ { "ocircumflex", 556, NULL },
+ { "less", 584, NULL },
+ { "minus", 584, NULL },
+ { "four", 556, NULL },
+ { "circumflex", 333, NULL },
{ "Zcaron", 611, NULL },
- { "Scommaaccent", 667, NULL },
- { "threequarters", 834, NULL },
- { "guillemotright", 556, NULL },
- { "Ccedilla", 722, NULL },
- { "ydieresis", 500, NULL },
+ { "ogonek", 333, NULL },
+ { "idieresis", 278, NULL },
+ { "rcommaaccent", 333, NULL },
+ { "Kcommaaccent", 667, NULL },
+ { "imacron", 278, NULL },
{ "tilde", 333, NULL },
- { "at", 1015, NULL },
- { "eacute", 556, NULL },
{ "underscore", 556, NULL },
- { "Euro", 556, NULL },
- { "Dcroat", 722, NULL },
- { "multiply", 584, NULL },
+ { "D", 722, NULL },
+ { "mu", 556, NULL },
+ { "racute", 333, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "dollar", 556, NULL },
+ { "v", 500, NULL },
+ { "Nacute", 722, NULL },
+ { "dotaccent", 333, NULL },
{ "zero", 556, NULL },
- { "eth", 556, NULL },
- { "Scedilla", 667, NULL },
- { "Ograve", 778, NULL },
- { "Racute", 722, NULL },
- { "partialdiff", 476, NULL },
- { "uacute", 556, NULL },
- { "braceleft", 334, NULL },
- { "Thorn", 667, NULL },
- { "zcaron", 500, NULL },
- { "scommaaccent", 500, NULL },
- { "ccedilla", 500, NULL },
- { "Dcaron", 722, NULL },
- { "dcroat", 556, NULL },
- { "Ocircumflex", 778, NULL },
- { "Oacute", 778, NULL },
{ "scedilla", 500, NULL },
- { "ogonek", 333, NULL },
- { "ograve", 556, NULL },
- { "racute", 333, NULL },
- { "Tcaron", 611, NULL },
- { "Eogonek", 667, NULL },
- { "thorn", 556, NULL },
- { "degree", 400, NULL },
- { "registered", 737, NULL },
- { "radical", 453, NULL },
- { "Aring", 667, NULL },
- { "percent", 889, NULL },
- { "six", 556, NULL },
- { "paragraph", 537, NULL },
- { "dcaron", 643, NULL },
- { "Uogonek", 722, NULL },
- { "two", 556, NULL },
- { "summation", 600, NULL },
+ { "period", 278, NULL },
+ { "udieresis", 556, NULL },
+ { "Ccedilla", 722, NULL },
{ "Igrave", 278, NULL },
- { "Lacute", 556, NULL },
- { "ocircumflex", 556, NULL },
- { "oacute", 556, NULL },
- { "Uring", 722, NULL },
- { "Lcommaaccent", 556, NULL },
- { "tcaron", 317, NULL },
- { "eogonek", 556, NULL },
- { "Delta", 612, NULL },
- { "Ohungarumlaut", 778, NULL },
- { "asciicircum", 469, NULL },
- { "aring", 556, NULL },
- { "grave", 333, NULL },
- { "uogonek", 556, NULL },
+ { "commaaccent", 250, NULL },
+ { "W", 944, NULL },
{ "bracketright", 278, NULL },
- { "Iacute", 278, NULL },
- { "ampersand", 667, NULL },
- { "igrave", 278, NULL },
- { "lacute", 222, NULL },
- { "Ncaron", 722, NULL },
- { "plus", 584, NULL },
- { "uring", 556, NULL },
- { "quotesinglbase", 222, NULL },
- { "lcommaaccent", 222, NULL },
- { "Yacute", 667, NULL },
- { "ohungarumlaut", 556, NULL },
- { "threesuperior", 333, NULL },
- { "acute", 333, NULL },
- { "section", 556, NULL },
- { "dieresis", 333, NULL },
- { "iacute", 278, NULL },
- { "quotedblbase", 333, NULL },
- { "ncaron", 556, NULL },
- { "florin", 556, NULL },
- { "yacute", 500, NULL },
- { "Rcommaaccent", 722, NULL },
- { "fi", 500, NULL },
- { "fl", 500, NULL },
- { "Acircumflex", 667, NULL },
- { "Cacute", 722, NULL },
- { "Icircumflex", 278, NULL },
- { "guillemotleft", 556, NULL },
+ { "Ugrave", 722, NULL },
{ "germandbls", 611, NULL },
- { "Amacron", 667, NULL },
- { "seven", 556, NULL },
- { "Sacute", 667, NULL },
- { "ordmasculine", 365, NULL },
- { "dotlessi", 278, NULL },
- { "sterling", 556, NULL },
- { "notequal", 549, NULL },
- { "Imacron", 278, NULL },
- { "rcommaaccent", 333, NULL },
- { "Zdotaccent", 611, NULL },
+ { "thorn", 556, NULL },
+ { "G", 778, NULL },
+ { "Ocircumflex", 778, NULL },
+ { "F", 611, NULL },
+ { "Uring", 722, NULL },
+ { "perthousand", 1000, NULL },
+ { "Edotaccent", 667, NULL },
{ "acircumflex", 556, NULL },
- { "cacute", 500, NULL },
- { "Ecaron", 667, NULL },
- { "icircumflex", 278, NULL },
- { "braceright", 334, NULL },
- { "quotedblright", 333, NULL },
{ "amacron", 556, NULL },
- { "sacute", 500, NULL },
- { "imacron", 278, NULL },
- { "cent", 556, NULL },
- { "currency", 556, NULL },
- { "logicalnot", 584, NULL },
- { "zdotaccent", 500, NULL },
- { "Atilde", 667, NULL },
- { "breve", 333, NULL },
- { "bar", 260, NULL },
- { "fraction", 167, NULL },
- { "less", 584, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "numbersign", 556, NULL },
+ { "divide", 584, NULL },
+ { "emacron", 556, NULL },
+ { "M", 833, NULL },
+ { "odieresis", 556, NULL },
+ { "Ograve", 778, NULL },
+ { "T", 611, NULL },
+ { "w", 722, NULL },
+ { "Thorn", 667, NULL },
+ { "space", 278, NULL },
+ { "twosuperior", 333, NULL },
+ { "eth", 556, NULL },
{ "ecaron", 556, NULL },
- { "guilsinglleft", 333, NULL },
- { "exclam", 278, NULL },
- { "period", 278, NULL },
- { "Rcaron", 722, NULL },
- { "Kcommaaccent", 667, NULL },
- { "greater", 584, NULL },
- { "atilde", 556, NULL },
{ "brokenbar", 260, NULL },
- { "quoteleft", 222, NULL },
- { "Edotaccent", 667, NULL },
- { "onesuperior", 333, NULL }
+ { "Aogonek", 667, NULL },
+ { "fl", 500, NULL },
+ { "E", 667, NULL },
+ { "quotedblbase", 333, NULL },
+ { "guillemotleft", 556, NULL },
+ { "endash", 556, NULL }
};
static BuiltinFontWidth symbolWidthsTab[] = {
- { "bracketleftex", 384, NULL },
- { "alpha", 631, NULL },
- { "union", 768, NULL },
- { "infinity", 713, NULL },
- { "comma", 250, NULL },
{ "copyrightsans", 790, NULL },
- { "plusminus", 549, NULL },
- { "arrowup", 603, NULL },
- { "apple", 790, NULL },
- { "parenleftbt", 384, NULL },
- { "notelement", 713, NULL },
- { "colon", 278, NULL },
- { "beta", 549, NULL },
- { "braceleftbt", 494, NULL },
- { "Lambda", 686, NULL },
- { "Phi", 763, NULL },
- { "minus", 549, NULL },
- { "space", 250, NULL },
- { "Sigma", 592, NULL },
- { "approxequal", 549, NULL },
- { "minute", 247, NULL },
+ { "Upsilon", 690, NULL },
+ { "sigma", 603, NULL },
+ { "kappa", 549, NULL },
{ "circleplus", 768, NULL },
- { "Omicron", 722, NULL },
- { "three", 500, NULL },
- { "numbersign", 500, NULL },
- { "lambda", 549, NULL },
- { "phi", 521, NULL },
- { "aleph", 823, NULL },
- { "Tau", 611, NULL },
- { "spade", 753, NULL },
+ { "degree", 400, NULL },
+ { "florin", 500, NULL },
+ { "Euro", 750, NULL },
+ { "phi1", 603, NULL },
+ { "club", 753, NULL },
+ { "radicalex", 500, NULL },
+ { "theta", 521, NULL },
+ { "Upsilon1", 620, NULL },
+ { "radical", 549, NULL },
+ { "angle", 768, NULL },
+ { "colon", 278, NULL },
+ { "plusminus", 549, NULL },
+ { "five", 500, NULL },
+ { "weierstrass", 987, NULL },
+ { "gamma", 411, NULL },
+ { "theta1", 631, NULL },
+ { "Zeta", 611, NULL },
+ { "angleleft", 329, NULL },
+ { "copyrightserif", 790, NULL },
{ "logicaland", 603, NULL },
- { "sigma", 603, NULL },
- { "propersuperset", 713, NULL },
- { "omicron", 549, NULL },
- { "question", 444, NULL },
+ { "arrowvertex", 603, NULL },
+ { "arrowleft", 987, NULL },
+ { "Omicron", 722, NULL },
+ { "propersubset", 713, NULL },
+ { "equivalence", 549, NULL },
+ { "circlemultiply", 768, NULL },
+ { "greater", 549, NULL },
+ { "minute", 247, NULL },
+ { "integral", 274, NULL },
+ { "percent", 833, NULL },
+ { "omega", 686, NULL },
+ { "Beta", 667, NULL },
{ "equal", 549, NULL },
+ { "therefore", 863, NULL },
+ { "braceleftmid", 494, NULL },
+ { "parenrighttp", 384, NULL },
+ { "bracketright", 333, NULL },
+ { "omicron", 549, NULL },
{ "Epsilon", 611, NULL },
- { "emptyset", 823, NULL },
- { "diamond", 753, NULL },
- { "four", 500, NULL },
- { "Mu", 889, NULL },
- { "parenlefttp", 384, NULL },
- { "club", 753, NULL },
- { "bullet", 460, NULL },
- { "Omega", 768, NULL },
- { "tau", 439, NULL },
- { "Upsilon", 690, NULL },
- { "bracelefttp", 494, NULL },
+ { "Nu", 722, NULL },
+ { "zero", 500, NULL },
+ { "period", 250, NULL },
+ { "Gamma", 603, NULL },
+ { "product", 823, NULL },
+ { "arrowboth", 1042, NULL },
+ { "Ifraktur", 686, NULL },
+ { "infinity", 713, NULL },
{ "heart", 753, NULL },
- { "divide", 549, NULL },
- { "epsilon", 439, NULL },
+ { "parenrightex", 384, NULL },
+ { "arrowdown", 603, NULL },
+ { "bracketleftbt", 384, NULL },
{ "logicalor", 603, NULL },
+ { "numbersign", 500, NULL },
+ { "divide", 549, NULL },
+ { "nu", 521, NULL },
+ { "spade", 753, NULL },
+ { "rho", 549, NULL },
+ { "Sigma", 592, NULL },
+ { "integralex", 686, NULL },
+ { "space", 250, NULL },
+ { "reflexsuperset", 713, NULL },
+ { "alpha", 631, NULL },
{ "parenleftex", 384, NULL },
- { "greaterequal", 549, NULL },
- { "mu", 576, NULL },
- { "Nu", 722, NULL },
- { "therefore", 863, NULL },
- { "notsubset", 713, NULL },
- { "omega", 686, NULL },
- { "semicolon", 278, NULL },
- { "element", 713, NULL },
- { "upsilon", 576, NULL },
+ { "lessequal", 549, NULL },
+ { "second", 411, NULL },
+ { "integraltp", 686, NULL },
+ { "approxequal", 549, NULL },
{ "existential", 549, NULL },
+ { "diamond", 753, NULL },
+ { "phi", 521, NULL },
+ { "nine", 500, NULL },
+ { "Iota", 333, NULL },
+ { "parenleft", 333, NULL },
+ { "tau", 439, NULL },
+ { "Tau", 611, NULL },
+ { "less", 549, NULL },
+ { "Eta", 722, NULL },
+ { "minus", 549, NULL },
+ { "four", 500, NULL },
+ { "bracketleftex", 384, NULL },
+ { "arrowdblboth", 1042, NULL },
+ { "arrowup", 603, NULL },
+ { "arrowright", 987, NULL },
{ "integralbt", 686, NULL },
- { "lessequal", 549, NULL },
- { "phi1", 603, NULL },
- { "lozenge", 494, NULL },
+ { "similar", 549, NULL },
+ { "underscore", 500, NULL },
+ { "dotmath", 250, NULL },
+ { "mu", 576, NULL },
{ "trademarkserif", 890, NULL },
- { "parenright", 333, NULL },
- { "reflexsuperset", 713, NULL },
- { "sigma1", 439, NULL },
- { "nu", 521, NULL },
- { "Gamma", 603, NULL },
+ { "Chi", 722, NULL },
{ "angleright", 329, NULL },
- { "ellipsis", 1000, NULL },
- { "Rho", 556, NULL },
- { "parenrightbt", 384, NULL },
- { "radicalex", 500, NULL },
- { "eight", 500, NULL },
- { "angleleft", 329, NULL },
+ { "logicalnot", 713, NULL },
+ { "parenlefttp", 384, NULL },
+ { "partialdiff", 494, NULL },
+ { "arrowdblright", 987, NULL },
+ { "summation", 713, NULL },
+ { "question", 444, NULL },
+ { "apple", 790, NULL },
+ { "plus", 549, NULL },
+ { "epsilon", 439, NULL },
+ { "reflexsubset", 713, NULL },
+ { "six", 500, NULL },
{ "arrowdbldown", 603, NULL },
- { "congruent", 549, NULL },
- { "Theta", 741, NULL },
- { "intersection", 768, NULL },
- { "Pi", 768, NULL },
- { "slash", 278, NULL },
- { "registerserif", 790, NULL },
- { "parenleft", 333, NULL },
- { "one", 500, NULL },
- { "gamma", 411, NULL },
- { "bracketleft", 333, NULL },
- { "rho", 549, NULL },
- { "circlemultiply", 768, NULL },
- { "Chi", 722, NULL },
- { "theta", 521, NULL },
- { "pi", 549, NULL },
- { "integraltp", 686, NULL },
- { "Eta", 722, NULL },
- { "product", 823, NULL },
- { "nine", 500, NULL },
- { "five", 500, NULL },
- { "propersubset", 713, NULL },
- { "bracketrightbt", 384, NULL },
- { "trademarksans", 786, NULL },
- { "dotmath", 250, NULL },
- { "integralex", 686, NULL },
- { "chi", 549, NULL },
- { "parenrighttp", 384, NULL },
- { "eta", 603, NULL },
- { "underscore", 500, NULL },
- { "Euro", 750, NULL },
+ { "Omega", 768, NULL },
+ { "bar", 200, NULL },
{ "multiply", 549, NULL },
- { "zero", 500, NULL },
- { "partialdiff", 494, NULL },
- { "angle", 768, NULL },
- { "arrowdblleft", 987, NULL },
+ { "braceright", 480, NULL },
{ "braceleft", 480, NULL },
- { "parenrightex", 384, NULL },
- { "Rfraktur", 795, NULL },
- { "Zeta", 611, NULL },
- { "braceex", 494, NULL },
+ { "braceleftbt", 494, NULL },
+ { "delta", 494, NULL },
+ { "arrowdblleft", 987, NULL },
+ { "ampersand", 778, NULL },
{ "arrowdblup", 603, NULL },
- { "arrowdown", 603, NULL },
- { "Ifraktur", 686, NULL },
- { "degree", 400, NULL },
- { "Iota", 333, NULL },
- { "perpendicular", 658, NULL },
- { "radical", 549, NULL },
- { "asteriskmath", 500, NULL },
- { "percent", 833, NULL },
- { "zeta", 494, NULL },
- { "six", 500, NULL },
+ { "aleph", 823, NULL },
{ "two", 500, NULL },
- { "weierstrass", 987, NULL },
- { "summation", 713, NULL },
- { "bracketrighttp", 384, NULL },
- { "carriagereturn", 658, NULL },
- { "suchthat", 439, NULL },
- { "arrowvertex", 603, NULL },
+ { "bracerighttp", 494, NULL },
+ { "seven", 500, NULL },
+ { "propersuperset", 713, NULL },
+ { "bullet", 460, NULL },
+ { "perpendicular", 658, NULL },
+ { "Lambda", 686, NULL },
+ { "parenrightbt", 384, NULL },
+ { "bracerightmid", 494, NULL },
+ { "comma", 250, NULL },
{ "Delta", 612, NULL },
- { "iota", 329, NULL },
+ { "bracerightbt", 494, NULL },
+ { "union", 768, NULL },
{ "arrowhorizex", 1000, NULL },
- { "bracketrightex", 384, NULL },
- { "bracketright", 333, NULL },
- { "ampersand", 778, NULL },
- { "plus", 549, NULL },
+ { "omega1", 713, NULL },
{ "proportional", 713, NULL },
- { "delta", 494, NULL },
- { "copyrightserif", 790, NULL },
- { "bracerightmid", 494, NULL },
- { "arrowleft", 987, NULL },
- { "second", 411, NULL },
- { "arrowdblboth", 1042, NULL },
- { "florin", 500, NULL },
- { "Psi", 795, NULL },
- { "bracerightbt", 494, NULL },
- { "bracketleftbt", 384, NULL },
- { "seven", 500, NULL },
- { "braceleftmid", 494, NULL },
+ { "sigma1", 439, NULL },
+ { "carriagereturn", 658, NULL },
+ { "suchthat", 439, NULL },
+ { "notelement", 713, NULL },
+ { "beta", 549, NULL },
+ { "parenright", 333, NULL },
+ { "bracketleft", 333, NULL },
+ { "fraction", 167, NULL },
+ { "Xi", 645, NULL },
+ { "pi", 549, NULL },
+ { "braceex", 494, NULL },
+ { "bracketlefttp", 384, NULL },
+ { "notsubset", 713, NULL },
+ { "asteriskmath", 500, NULL },
+ { "greaterequal", 549, NULL },
+ { "emptyset", 823, NULL },
+ { "bracketrightex", 384, NULL },
+ { "gradient", 713, NULL },
+ { "exclam", 333, NULL },
{ "notequal", 549, NULL },
- { "psi", 686, NULL },
- { "equivalence", 549, NULL },
+ { "congruent", 549, NULL },
+ { "Pi", 768, NULL },
+ { "Theta", 741, NULL },
+ { "Rfraktur", 795, NULL },
+ { "bracketrighttp", 384, NULL },
+ { "parenleftbt", 384, NULL },
{ "universal", 713, NULL },
- { "arrowdblright", 987, NULL },
- { "braceright", 480, NULL },
- { "reflexsubset", 713, NULL },
- { "Xi", 645, NULL },
- { "theta1", 631, NULL },
- { "logicalnot", 713, NULL },
+ { "upsilon", 576, NULL },
+ { "psi", 686, NULL },
+ { "eight", 500, NULL },
+ { "one", 500, NULL },
{ "Kappa", 722, NULL },
- { "similar", 549, NULL },
- { "bar", 200, NULL },
- { "fraction", 167, NULL },
- { "less", 549, NULL },
- { "registersans", 790, NULL },
- { "omega1", 713, NULL },
- { "exclam", 333, NULL },
- { "Upsilon1", 620, NULL },
- { "bracerighttp", 494, NULL },
- { "xi", 493, NULL },
- { "period", 250, NULL },
+ { "ellipsis", 1000, NULL },
+ { "chi", 549, NULL },
+ { "trademarksans", 786, NULL },
+ { "Rho", 556, NULL },
{ "Alpha", 722, NULL },
- { "arrowright", 987, NULL },
- { "greater", 549, NULL },
- { "bracketlefttp", 384, NULL },
- { "kappa", 549, NULL },
- { "gradient", 713, NULL },
- { "integral", 274, NULL },
- { "arrowboth", 1042, NULL },
- { "Beta", 667, NULL }
+ { "bracketrightbt", 384, NULL },
+ { "intersection", 768, NULL },
+ { "xi", 493, NULL },
+ { "slash", 278, NULL },
+ { "registerserif", 790, NULL },
+ { "iota", 329, NULL },
+ { "Psi", 795, NULL },
+ { "three", 500, NULL },
+ { "lozenge", 494, NULL },
+ { "Phi", 763, NULL },
+ { "zeta", 494, NULL },
+ { "lambda", 549, NULL },
+ { "Mu", 889, NULL },
+ { "bracelefttp", 494, NULL },
+ { "eta", 603, NULL },
+ { "registersans", 790, NULL },
+ { "element", 713, NULL },
+ { "semicolon", 278, NULL }
};
static BuiltinFontWidth timesBoldWidthsTab[] = {
- { "Ntilde", 722, NULL },
+ { "cacute", 444, NULL },
+ { "Dcroat", 722, NULL },
+ { "tcaron", 416, NULL },
{ "rcaron", 444, NULL },
- { "kcommaaccent", 556, NULL },
- { "Ncommaaccent", 722, NULL },
- { "Zacute", 667, NULL },
- { "comma", 250, NULL },
- { "cedilla", 333, NULL },
- { "plusminus", 570, NULL },
- { "circumflex", 333, NULL },
- { "dotaccent", 333, NULL },
- { "edotaccent", 444, NULL },
- { "asciitilde", 520, NULL },
- { "colon", 333, NULL },
- { "onehalf", 750, NULL },
- { "dollar", 500, NULL },
- { "Lcaron", 667, NULL },
- { "ntilde", 556, NULL },
- { "Aogonek", 722, NULL },
{ "ncommaaccent", 556, NULL },
- { "minus", 570, NULL },
+ { "tcommaaccent", 333, NULL },
+ { "logicalnot", 570, NULL },
+ { "m", 833, NULL },
+ { "OE", 1000, NULL },
+ { "partialdiff", 494, NULL },
+ { "U", 722, NULL },
+ { "x", 500, NULL },
+ { "y", 500, NULL },
{ "Iogonek", 389, NULL },
- { "zacute", 444, NULL },
- { "yen", 500, NULL },
- { "space", 250, NULL },
- { "Omacron", 778, NULL },
- { "questiondown", 500, NULL },
- { "emdash", 1000, NULL },
- { "Agrave", 722, NULL },
- { "three", 500, NULL },
- { "numbersign", 500, NULL },
- { "lcaron", 394, NULL },
+ { "edieresis", 444, NULL },
+ { "Ncaron", 722, NULL },
+ { "question", 500, NULL },
+ { "summation", 600, NULL },
{ "A", 722, NULL },
- { "B", 667, NULL },
- { "C", 722, NULL },
- { "aogonek", 500, NULL },
- { "D", 722, NULL },
- { "E", 667, NULL },
+ { "igrave", 278, NULL },
+ { "dcroat", 556, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "h", 556, NULL },
+ { "Cacute", 722, NULL },
+ { "plus", 570, NULL },
+ { "P", 611, NULL },
+ { "lslash", 278, NULL },
+ { "six", 500, NULL },
+ { "edotaccent", 444, NULL },
+ { "bar", 220, NULL },
+ { "quotesingle", 278, NULL },
+ { "multiply", 570, NULL },
+ { "i", 278, NULL },
{ "onequarter", 750, NULL },
- { "F", 611, NULL },
- { "G", 778, NULL },
- { "H", 778, NULL },
- { "I", 389, NULL },
- { "J", 500, NULL },
- { "K", 778, NULL },
- { "iogonek", 278, NULL },
- { "backslash", 278, NULL },
- { "L", 667, NULL },
- { "periodcentered", 250, NULL },
- { "M", 944, NULL },
- { "N", 722, NULL },
- { "omacron", 500, NULL },
- { "Tcommaaccent", 667, NULL },
+ { "braceright", 394, NULL },
+ { "braceleft", 394, NULL },
+ { "acute", 333, NULL },
+ { "oacute", 500, NULL },
+ { "Yacute", 722, NULL },
+ { "daggerdbl", 500, NULL },
+ { "Atilde", 722, NULL },
+ { "Edieresis", 667, NULL },
+ { "ntilde", 556, NULL },
+ { "fi", 556, NULL },
+ { "trademark", 1000, NULL },
+ { "ampersand", 833, NULL },
+ { "Lcommaaccent", 667, NULL },
{ "O", 778, NULL },
- { "P", 611, NULL },
- { "Q", 778, NULL },
- { "Uhungarumlaut", 722, NULL },
- { "R", 722, NULL },
- { "Aacute", 722, NULL },
- { "caron", 333, NULL },
- { "S", 556, NULL },
- { "T", 667, NULL },
- { "U", 722, NULL },
- { "agrave", 500, NULL },
- { "V", 722, NULL },
- { "W", 1000, NULL },
- { "X", 722, NULL },
- { "question", 500, NULL },
- { "equal", 570, NULL },
- { "Y", 722, NULL },
- { "Z", 667, NULL },
- { "four", 500, NULL },
- { "a", 500, NULL },
- { "Gcommaaccent", 778, NULL },
- { "b", 556, NULL },
- { "c", 444, NULL },
- { "d", 556, NULL },
- { "e", 444, NULL },
- { "f", 333, NULL },
- { "g", 500, NULL },
+ { "Icircumflex", 389, NULL },
+ { "nacute", 556, NULL },
+ { "dieresis", 333, NULL },
+ { "Eacute", 667, NULL },
+ { "two", 500, NULL },
+ { "uacute", 556, NULL },
+ { "seven", 500, NULL },
+ { "Udieresis", 722, NULL },
+ { "Abreve", 722, NULL },
+ { "Iacute", 389, NULL },
{ "bullet", 350, NULL },
- { "h", 556, NULL },
- { "i", 278, NULL },
- { "Oslash", 778, NULL },
- { "dagger", 500, NULL },
- { "j", 333, NULL },
- { "k", 556, NULL },
- { "l", 278, NULL },
- { "m", 833, NULL },
- { "n", 556, NULL },
- { "tcommaaccent", 333, NULL },
- { "o", 500, NULL },
- { "ordfeminine", 300, NULL },
- { "ring", 333, NULL },
- { "p", 556, NULL },
- { "q", 556, NULL },
- { "uhungarumlaut", 556, NULL },
- { "r", 444, NULL },
- { "twosuperior", 300, NULL },
+ { "eogonek", 444, NULL },
+ { "eacute", 444, NULL },
+ { "Zdotaccent", 667, NULL },
+ { "scaron", 389, NULL },
+ { "guillemotright", 500, NULL },
{ "aacute", 500, NULL },
- { "s", 389, NULL },
- { "OE", 1000, NULL },
- { "t", 333, NULL },
- { "divide", 570, NULL },
- { "u", 556, NULL },
- { "Ccaron", 722, NULL },
- { "v", 500, NULL },
- { "w", 722, NULL },
- { "x", 500, NULL },
- { "y", 500, NULL },
- { "z", 444, NULL },
+ { "Otilde", 778, NULL },
+ { "umacron", 556, NULL },
+ { "Tcaron", 667, NULL },
+ { "ugrave", 556, NULL },
+ { "dcaron", 672, NULL },
+ { "hyphen", 333, NULL },
+ { "Oslash", 778, NULL },
+ { "a", 500, NULL },
+ { "B", 667, NULL },
+ { "yacute", 500, NULL },
+ { "kcommaaccent", 556, NULL },
+ { "Rcaron", 722, NULL },
+ { "R", 722, NULL },
+ { "ydieresis", 500, NULL },
+ { "S", 556, NULL },
+ { "omacron", 500, NULL },
+ { "comma", 250, NULL },
+ { "Delta", 612, NULL },
{ "Gbreve", 778, NULL },
- { "commaaccent", 250, NULL },
- { "hungarumlaut", 333, NULL },
- { "Idotaccent", 389, NULL },
- { "Nacute", 722, NULL },
- { "quotedbl", 555, NULL },
+ { "ordfeminine", 300, NULL },
+ { "quotedblleft", 500, NULL },
+ { "Rcommaaccent", 722, NULL },
+ { "ograve", 500, NULL },
+ { "Lacute", 667, NULL },
+ { "Idieresis", 389, NULL },
+ { "sacute", 389, NULL },
+ { "f", 333, NULL },
+ { "otilde", 500, NULL },
+ { "parenright", 333, NULL },
{ "gcommaaccent", 500, NULL },
- { "mu", 556, NULL },
+ { "Ohungarumlaut", 778, NULL },
+ { "bracketleft", 333, NULL },
+ { "fraction", 167, NULL },
+ { "Sacute", 556, NULL },
+ { "Adieresis", 722, NULL },
+ { "Uacute", 722, NULL },
+ { "atilde", 500, NULL },
+ { "Zacute", 667, NULL },
+ { "asciitilde", 520, NULL },
+ { "H", 778, NULL },
+ { "sterling", 500, NULL },
{ "greaterequal", 549, NULL },
- { "Scaron", 556, NULL },
+ { "at", 930, NULL },
{ "Lslash", 667, NULL },
- { "semicolon", 333, NULL },
+ { "Uogonek", 722, NULL },
+ { "caron", 333, NULL },
+ { "lacute", 278, NULL },
+ { "notequal", 549, NULL },
+ { "Agrave", 722, NULL },
+ { "AE", 1000, NULL },
+ { "exclam", 333, NULL },
+ { "Acircumflex", 722, NULL },
{ "oslash", 500, NULL },
- { "lessequal", 549, NULL },
- { "lozenge", 494, NULL },
- { "parenright", 333, NULL },
- { "ccaron", 444, NULL },
+ { "threequarters", 750, NULL },
+ { "J", 500, NULL },
+ { "ohungarumlaut", 500, NULL },
{ "Ecircumflex", 667, NULL },
- { "gbreve", 500, NULL },
- { "trademark", 1000, NULL },
- { "daggerdbl", 500, NULL },
- { "nacute", 556, NULL },
- { "macron", 333, NULL },
- { "Otilde", 778, NULL },
- { "Emacron", 667, NULL },
- { "ellipsis", 1000, NULL },
- { "scaron", 389, NULL },
- { "AE", 1000, NULL },
- { "Ucircumflex", 722, NULL },
- { "lslash", 278, NULL },
- { "quotedblleft", 500, NULL },
- { "guilsinglright", 333, NULL },
- { "hyphen", 333, NULL },
- { "quotesingle", 278, NULL },
+ { "L", 667, NULL },
+ { "z", 444, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "egrave", 444, NULL },
+ { "uring", 556, NULL },
+ { "s", 389, NULL },
+ { "c", 444, NULL },
+ { "d", 556, NULL },
{ "eight", 500, NULL },
- { "exclamdown", 333, NULL },
- { "endash", 500, NULL },
- { "oe", 722, NULL },
- { "Abreve", 722, NULL },
- { "Umacron", 722, NULL },
- { "ecircumflex", 444, NULL },
- { "Adieresis", 722, NULL },
- { "copyright", 747, NULL },
- { "Egrave", 667, NULL },
- { "slash", 278, NULL },
- { "Edieresis", 667, NULL },
- { "otilde", 500, NULL },
- { "Idieresis", 389, NULL },
- { "parenleft", 333, NULL },
+ { "I", 389, NULL },
{ "one", 500, NULL },
- { "emacron", 444, NULL },
- { "Odieresis", 778, NULL },
+ { "periodcentered", 250, NULL },
+ { "ellipsis", 1000, NULL },
+ { "Aring", 722, NULL },
+ { "agrave", 500, NULL },
+ { "Oacute", 778, NULL },
+ { "t", 333, NULL },
+ { "quotedbl", 555, NULL },
+ { "Eogonek", 667, NULL },
+ { "macron", 333, NULL },
+ { "Lcaron", 667, NULL },
+ { "ordmasculine", 330, NULL },
+ { "questiondown", 500, NULL },
+ { "backslash", 278, NULL },
+ { "slash", 278, NULL },
+ { "r", 444, NULL },
{ "ucircumflex", 556, NULL },
- { "bracketleft", 333, NULL },
- { "Ugrave", 722, NULL },
- { "quoteright", 333, NULL },
- { "Udieresis", 722, NULL },
- { "perthousand", 1000, NULL },
- { "Ydieresis", 722, NULL },
- { "umacron", 556, NULL },
- { "abreve", 500, NULL },
- { "Eacute", 667, NULL },
+ { "three", 500, NULL },
+ { "lozenge", 494, NULL },
+ { "V", 722, NULL },
+ { "Q", 778, NULL },
+ { "exclamdown", 333, NULL },
+ { "Umacron", 722, NULL },
+ { "zacute", 444, NULL },
+ { "ncaron", 556, NULL },
{ "adieresis", 500, NULL },
- { "egrave", 444, NULL },
- { "edieresis", 444, NULL },
- { "idieresis", 278, NULL },
- { "Eth", 722, NULL },
- { "ae", 722, NULL },
- { "asterisk", 500, NULL },
- { "odieresis", 500, NULL },
- { "Uacute", 722, NULL },
- { "ugrave", 556, NULL },
- { "nine", 500, NULL },
- { "five", 500, NULL },
- { "udieresis", 556, NULL },
- { "Zcaron", 667, NULL },
- { "Scommaaccent", 556, NULL },
- { "threequarters", 750, NULL },
- { "guillemotright", 500, NULL },
- { "Ccedilla", 722, NULL },
- { "ydieresis", 500, NULL },
- { "tilde", 333, NULL },
- { "at", 930, NULL },
- { "eacute", 444, NULL },
- { "underscore", 500, NULL },
- { "Euro", 500, NULL },
- { "Dcroat", 722, NULL },
- { "multiply", 570, NULL },
- { "zero", 500, NULL },
- { "eth", 500, NULL },
- { "Scedilla", 556, NULL },
- { "Ograve", 778, NULL },
- { "Racute", 722, NULL },
- { "partialdiff", 494, NULL },
- { "uacute", 556, NULL },
- { "braceleft", 394, NULL },
- { "Thorn", 611, NULL },
- { "zcaron", 444, NULL },
- { "scommaaccent", 389, NULL },
- { "ccedilla", 444, NULL },
+ { "quoteright", 333, NULL },
+ { "uogonek", 556, NULL },
+ { "semicolon", 333, NULL },
+ { "guilsinglright", 333, NULL },
+ { "Amacron", 722, NULL },
+ { "breve", 333, NULL },
{ "Dcaron", 722, NULL },
- { "dcroat", 556, NULL },
- { "Ocircumflex", 778, NULL },
- { "Oacute", 778, NULL },
- { "scedilla", 389, NULL },
- { "ogonek", 333, NULL },
- { "ograve", 500, NULL },
- { "racute", 444, NULL },
- { "Tcaron", 667, NULL },
- { "Eogonek", 667, NULL },
- { "thorn", 556, NULL },
+ { "Z", 667, NULL },
+ { "ecircumflex", 444, NULL },
+ { "lcaron", 394, NULL },
+ { "paragraph", 540, NULL },
+ { "zcaron", 444, NULL },
+ { "aring", 500, NULL },
+ { "Ydieresis", 722, NULL },
+ { "section", 500, NULL },
+ { "Scaron", 556, NULL },
{ "degree", 400, NULL },
- { "registered", 747, NULL },
+ { "Euro", 500, NULL },
+ { "florin", 500, NULL },
+ { "iogonek", 278, NULL },
+ { "Scommaaccent", 556, NULL },
+ { "Aacute", 722, NULL },
+ { "b", 556, NULL },
+ { "K", 778, NULL },
+ { "dotlessi", 278, NULL },
+ { "p", 556, NULL },
+ { "Ntilde", 722, NULL },
{ "radical", 549, NULL },
- { "Aring", 722, NULL },
- { "percent", 1000, NULL },
- { "six", 500, NULL },
- { "paragraph", 540, NULL },
- { "dcaron", 672, NULL },
- { "Uogonek", 722, NULL },
- { "two", 500, NULL },
- { "summation", 600, NULL },
- { "Igrave", 389, NULL },
- { "Lacute", 667, NULL },
- { "ocircumflex", 500, NULL },
- { "oacute", 500, NULL },
- { "Uring", 722, NULL },
- { "Lcommaaccent", 667, NULL },
- { "tcaron", 416, NULL },
- { "eogonek", 444, NULL },
- { "Delta", 612, NULL },
- { "Ohungarumlaut", 778, NULL },
+ { "g", 500, NULL },
+ { "colon", 333, NULL },
+ { "ccedilla", 444, NULL },
+ { "plusminus", 570, NULL },
+ { "cedilla", 333, NULL },
+ { "Idotaccent", 389, NULL },
+ { "quotedblright", 500, NULL },
+ { "Eth", 722, NULL },
+ { "five", 500, NULL },
+ { "X", 722, NULL },
{ "asciicircum", 581, NULL },
- { "aring", 500, NULL },
- { "grave", 333, NULL },
- { "uogonek", 556, NULL },
- { "bracketright", 333, NULL },
- { "Iacute", 389, NULL },
- { "ampersand", 833, NULL },
- { "igrave", 278, NULL },
- { "lacute", 278, NULL },
- { "Ncaron", 722, NULL },
- { "plus", 570, NULL },
- { "uring", 556, NULL },
- { "quotesinglbase", 333, NULL },
+ { "Odieresis", 778, NULL },
+ { "oe", 722, NULL },
+ { "aogonek", 500, NULL },
+ { "Egrave", 667, NULL },
+ { "ring", 333, NULL },
+ { "emdash", 1000, NULL },
+ { "Gcommaaccent", 778, NULL },
+ { "quoteleft", 333, NULL },
+ { "registered", 747, NULL },
+ { "k", 556, NULL },
+ { "copyright", 747, NULL },
+ { "Racute", 722, NULL },
{ "lcommaaccent", 278, NULL },
- { "Yacute", 722, NULL },
- { "ohungarumlaut", 500, NULL },
+ { "onehalf", 750, NULL },
+ { "uhungarumlaut", 556, NULL },
+ { "gbreve", 500, NULL },
+ { "Ecaron", 667, NULL },
{ "threesuperior", 300, NULL },
- { "acute", 333, NULL },
- { "section", 500, NULL },
- { "dieresis", 333, NULL },
+ { "zdotaccent", 444, NULL },
+ { "n", 556, NULL },
+ { "Emacron", 667, NULL },
+ { "asterisk", 500, NULL },
+ { "scommaaccent", 389, NULL },
+ { "onesuperior", 300, NULL },
+ { "greater", 570, NULL },
+ { "percent", 1000, NULL },
+ { "o", 500, NULL },
+ { "abreve", 500, NULL },
+ { "Imacron", 389, NULL },
{ "iacute", 278, NULL },
- { "quotedblbase", 500, NULL },
- { "ncaron", 556, NULL },
- { "florin", 500, NULL },
- { "yacute", 500, NULL },
- { "Rcommaaccent", 722, NULL },
- { "fi", 556, NULL },
- { "fl", 556, NULL },
- { "Acircumflex", 722, NULL },
- { "Cacute", 722, NULL },
- { "Icircumflex", 389, NULL },
- { "guillemotleft", 500, NULL },
+ { "e", 444, NULL },
+ { "icircumflex", 278, NULL },
+ { "q", 556, NULL },
+ { "l", 278, NULL },
+ { "dagger", 500, NULL },
+ { "equal", 570, NULL },
+ { "N", 722, NULL },
+ { "C", 722, NULL },
+ { "u", 556, NULL },
+ { "Ugrave", 722, NULL },
{ "germandbls", 556, NULL },
- { "Amacron", 722, NULL },
- { "seven", 500, NULL },
- { "Sacute", 556, NULL },
- { "ordmasculine", 330, NULL },
- { "dotlessi", 278, NULL },
- { "sterling", 500, NULL },
- { "notequal", 549, NULL },
- { "Imacron", 389, NULL },
- { "rcommaaccent", 444, NULL },
- { "Zdotaccent", 667, NULL },
+ { "thorn", 556, NULL },
+ { "commaaccent", 250, NULL },
+ { "bracketright", 333, NULL },
+ { "W", 1000, NULL },
+ { "Ccedilla", 722, NULL },
+ { "Igrave", 389, NULL },
+ { "zero", 500, NULL },
+ { "period", 250, NULL },
+ { "scedilla", 389, NULL },
+ { "udieresis", 556, NULL },
+ { "perthousand", 1000, NULL },
+ { "Edotaccent", 667, NULL },
{ "acircumflex", 500, NULL },
- { "cacute", 444, NULL },
- { "Ecaron", 667, NULL },
- { "icircumflex", 278, NULL },
- { "braceright", 394, NULL },
- { "quotedblright", 500, NULL },
+ { "Ocircumflex", 778, NULL },
+ { "F", 611, NULL },
+ { "Uring", 722, NULL },
+ { "G", 778, NULL },
+ { "T", 667, NULL },
+ { "M", 944, NULL },
+ { "odieresis", 500, NULL },
+ { "Ograve", 778, NULL },
+ { "numbersign", 500, NULL },
+ { "divide", 570, NULL },
+ { "emacron", 444, NULL },
{ "amacron", 500, NULL },
- { "sacute", 389, NULL },
- { "imacron", 278, NULL },
- { "cent", 500, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "endash", 500, NULL },
+ { "guillemotleft", 500, NULL },
+ { "fl", 556, NULL },
+ { "E", 667, NULL },
+ { "quotedblbase", 500, NULL },
+ { "ecaron", 444, NULL },
+ { "Aogonek", 722, NULL },
+ { "brokenbar", 220, NULL },
+ { "w", 722, NULL },
+ { "Thorn", 611, NULL },
+ { "space", 250, NULL },
+ { "eth", 500, NULL },
+ { "twosuperior", 300, NULL },
+ { "Y", 722, NULL },
+ { "yen", 500, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Ccaron", 722, NULL },
+ { "j", 333, NULL },
+ { "Omacron", 778, NULL },
+ { "lessequal", 549, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "ccaron", 444, NULL },
+ { "grave", 333, NULL },
+ { "Scedilla", 556, NULL },
+ { "quotesinglbase", 333, NULL },
{ "currency", 500, NULL },
- { "logicalnot", 570, NULL },
- { "zdotaccent", 444, NULL },
- { "Atilde", 722, NULL },
- { "breve", 333, NULL },
- { "bar", 220, NULL },
- { "fraction", 167, NULL },
+ { "nine", 500, NULL },
+ { "parenleft", 333, NULL },
+ { "ogonek", 333, NULL },
+ { "idieresis", 278, NULL },
+ { "circumflex", 333, NULL },
+ { "Zcaron", 667, NULL },
+ { "ocircumflex", 500, NULL },
{ "less", 570, NULL },
- { "ecaron", 444, NULL },
- { "guilsinglleft", 333, NULL },
- { "exclam", 333, NULL },
- { "period", 250, NULL },
- { "Rcaron", 722, NULL },
+ { "minus", 570, NULL },
+ { "four", 500, NULL },
+ { "ae", 722, NULL },
+ { "cent", 500, NULL },
+ { "Tcommaaccent", 667, NULL },
+ { "dollar", 500, NULL },
+ { "v", 500, NULL },
+ { "Nacute", 722, NULL },
+ { "dotaccent", 333, NULL },
+ { "underscore", 500, NULL },
+ { "D", 722, NULL },
+ { "mu", 556, NULL },
+ { "racute", 444, NULL },
+ { "rcommaaccent", 444, NULL },
+ { "imacron", 278, NULL },
{ "Kcommaaccent", 778, NULL },
- { "greater", 570, NULL },
- { "atilde", 500, NULL },
- { "brokenbar", 220, NULL },
- { "quoteleft", 333, NULL },
- { "Edotaccent", 667, NULL },
- { "onesuperior", 300, NULL }
+ { "tilde", 333, NULL }
};
static BuiltinFontWidth timesBoldItalicWidthsTab[] = {
- { "Ntilde", 722, NULL },
- { "rcaron", 389, NULL },
- { "kcommaaccent", 500, NULL },
+ { "M", 889, NULL },
+ { "odieresis", 500, NULL },
+ { "Ograve", 722, NULL },
+ { "T", 611, NULL },
+ { "amacron", 500, NULL },
{ "Ncommaaccent", 722, NULL },
- { "Zacute", 611, NULL },
- { "comma", 250, NULL },
- { "cedilla", 333, NULL },
- { "plusminus", 570, NULL },
- { "circumflex", 333, NULL },
- { "dotaccent", 333, NULL },
- { "edotaccent", 444, NULL },
- { "asciitilde", 570, NULL },
- { "colon", 333, NULL },
- { "onehalf", 750, NULL },
- { "dollar", 500, NULL },
- { "Lcaron", 611, NULL },
- { "ntilde", 556, NULL },
+ { "numbersign", 500, NULL },
+ { "divide", 570, NULL },
+ { "emacron", 444, NULL },
+ { "fl", 556, NULL },
+ { "E", 667, NULL },
+ { "quotedblbase", 500, NULL },
+ { "endash", 500, NULL },
+ { "guillemotleft", 500, NULL },
+ { "w", 667, NULL },
+ { "Thorn", 611, NULL },
+ { "space", 250, NULL },
+ { "eth", 500, NULL },
+ { "twosuperior", 300, NULL },
+ { "ecaron", 444, NULL },
{ "Aogonek", 667, NULL },
- { "ncommaaccent", 556, NULL },
+ { "brokenbar", 220, NULL },
+ { "commaaccent", 250, NULL },
+ { "bracketright", 333, NULL },
+ { "W", 889, NULL },
+ { "Ugrave", 722, NULL },
+ { "germandbls", 500, NULL },
+ { "thorn", 500, NULL },
+ { "zero", 500, NULL },
+ { "period", 250, NULL },
+ { "scedilla", 389, NULL },
+ { "udieresis", 556, NULL },
+ { "Ccedilla", 667, NULL },
+ { "Igrave", 389, NULL },
+ { "Ocircumflex", 722, NULL },
+ { "F", 667, NULL },
+ { "Uring", 722, NULL },
+ { "Edotaccent", 667, NULL },
+ { "perthousand", 1000, NULL },
+ { "acircumflex", 500, NULL },
+ { "G", 722, NULL },
+ { "circumflex", 333, NULL },
+ { "Zcaron", 611, NULL },
+ { "ogonek", 333, NULL },
+ { "idieresis", 278, NULL },
+ { "ae", 722, NULL },
+ { "cent", 500, NULL },
+ { "ocircumflex", 500, NULL },
+ { "less", 570, NULL },
{ "minus", 606, NULL },
- { "Iogonek", 389, NULL },
- { "zacute", 389, NULL },
+ { "four", 500, NULL },
+ { "dollar", 500, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "v", 444, NULL },
+ { "Nacute", 722, NULL },
+ { "dotaccent", 333, NULL },
+ { "rcommaaccent", 389, NULL },
+ { "Kcommaaccent", 667, NULL },
+ { "imacron", 278, NULL },
+ { "tilde", 333, NULL },
+ { "underscore", 500, NULL },
+ { "mu", 576, NULL },
+ { "D", 722, NULL },
+ { "racute", 389, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "j", 278, NULL },
+ { "Ccaron", 667, NULL },
{ "yen", 500, NULL },
- { "space", 250, NULL },
+ { "Y", 611, NULL },
+ { "ccaron", 444, NULL },
+ { "lessequal", 549, NULL },
+ { "Ucircumflex", 722, NULL },
{ "Omacron", 722, NULL },
- { "questiondown", 500, NULL },
+ { "quotesinglbase", 333, NULL },
+ { "grave", 333, NULL },
+ { "Scedilla", 556, NULL },
+ { "parenleft", 333, NULL },
+ { "currency", 500, NULL },
+ { "nine", 500, NULL },
+ { "Ntilde", 722, NULL },
+ { "radical", 549, NULL },
+ { "dotlessi", 278, NULL },
+ { "p", 500, NULL },
+ { "plusminus", 570, NULL },
+ { "Idotaccent", 389, NULL },
+ { "cedilla", 333, NULL },
+ { "quotedblright", 500, NULL },
+ { "Eth", 722, NULL },
+ { "colon", 333, NULL },
+ { "g", 500, NULL },
+ { "ccedilla", 444, NULL },
+ { "Odieresis", 722, NULL },
+ { "oe", 722, NULL },
+ { "five", 500, NULL },
+ { "X", 667, NULL },
+ { "asciicircum", 570, NULL },
{ "emdash", 1000, NULL },
- { "Agrave", 667, NULL },
- { "three", 500, NULL },
- { "numbersign", 500, NULL },
- { "lcaron", 382, NULL },
- { "A", 667, NULL },
- { "B", 667, NULL },
- { "C", 667, NULL },
{ "aogonek", 500, NULL },
- { "D", 722, NULL },
- { "E", 667, NULL },
- { "onequarter", 750, NULL },
- { "F", 667, NULL },
- { "G", 722, NULL },
- { "H", 778, NULL },
- { "I", 389, NULL },
- { "J", 500, NULL },
- { "K", 667, NULL },
+ { "Egrave", 667, NULL },
+ { "ring", 333, NULL },
+ { "Dcaron", 722, NULL },
+ { "Z", 611, NULL },
+ { "ecircumflex", 444, NULL },
+ { "Amacron", 667, NULL },
+ { "breve", 333, NULL },
+ { "lcaron", 382, NULL },
+ { "paragraph", 500, NULL },
+ { "zcaron", 389, NULL },
+ { "aring", 500, NULL },
+ { "Ydieresis", 611, NULL },
+ { "Euro", 500, NULL },
{ "iogonek", 278, NULL },
- { "backslash", 278, NULL },
- { "L", 611, NULL },
- { "periodcentered", 250, NULL },
- { "M", 889, NULL },
- { "N", 722, NULL },
- { "omacron", 500, NULL },
- { "Tcommaaccent", 611, NULL },
- { "O", 722, NULL },
- { "P", 611, NULL },
- { "Q", 722, NULL },
- { "Uhungarumlaut", 722, NULL },
- { "R", 667, NULL },
+ { "florin", 500, NULL },
+ { "section", 500, NULL },
+ { "Scaron", 556, NULL },
+ { "degree", 400, NULL },
+ { "K", 667, NULL },
+ { "Scommaaccent", 556, NULL },
{ "Aacute", 667, NULL },
- { "caron", 333, NULL },
- { "S", 556, NULL },
- { "T", 611, NULL },
- { "U", 722, NULL },
- { "agrave", 500, NULL },
- { "V", 667, NULL },
- { "W", 889, NULL },
- { "X", 667, NULL },
- { "question", 500, NULL },
- { "equal", 570, NULL },
- { "Y", 611, NULL },
- { "Z", 611, NULL },
- { "four", 500, NULL },
- { "a", 500, NULL },
- { "Gcommaaccent", 722, NULL },
{ "b", 500, NULL },
- { "c", 444, NULL },
- { "d", 500, NULL },
+ { "greater", 570, NULL },
+ { "asterisk", 500, NULL },
+ { "Emacron", 667, NULL },
+ { "scommaaccent", 389, NULL },
+ { "onesuperior", 300, NULL },
+ { "percent", 833, NULL },
+ { "o", 500, NULL },
+ { "icircumflex", 278, NULL },
+ { "abreve", 500, NULL },
+ { "Imacron", 389, NULL },
{ "e", 444, NULL },
- { "f", 333, NULL },
- { "g", 500, NULL },
- { "bullet", 350, NULL },
- { "h", 556, NULL },
- { "i", 278, NULL },
- { "Oslash", 722, NULL },
+ { "iacute", 278, NULL },
{ "dagger", 500, NULL },
- { "j", 278, NULL },
- { "k", 500, NULL },
- { "l", 278, NULL },
- { "m", 778, NULL },
- { "n", 556, NULL },
- { "tcommaaccent", 278, NULL },
- { "o", 500, NULL },
- { "ordfeminine", 266, NULL },
- { "ring", 333, NULL },
- { "p", 500, NULL },
+ { "equal", 570, NULL },
+ { "N", 722, NULL },
+ { "C", 667, NULL },
+ { "u", 556, NULL },
{ "q", 500, NULL },
+ { "l", 278, NULL },
+ { "quoteleft", 333, NULL },
+ { "registered", 747, NULL },
+ { "Gcommaaccent", 722, NULL },
+ { "Racute", 667, NULL },
+ { "k", 500, NULL },
+ { "copyright", 747, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "onehalf", 750, NULL },
+ { "gbreve", 500, NULL },
{ "uhungarumlaut", 556, NULL },
- { "r", 389, NULL },
- { "twosuperior", 300, NULL },
- { "aacute", 500, NULL },
- { "s", 389, NULL },
- { "OE", 944, NULL },
- { "t", 278, NULL },
- { "divide", 570, NULL },
- { "u", 556, NULL },
- { "Ccaron", 667, NULL },
- { "v", 444, NULL },
- { "w", 667, NULL },
- { "x", 500, NULL },
- { "y", 444, NULL },
- { "z", 389, NULL },
- { "Gbreve", 722, NULL },
- { "commaaccent", 250, NULL },
- { "hungarumlaut", 333, NULL },
- { "Idotaccent", 389, NULL },
- { "Nacute", 722, NULL },
- { "quotedbl", 555, NULL },
- { "gcommaaccent", 500, NULL },
- { "mu", 576, NULL },
- { "greaterequal", 549, NULL },
- { "Scaron", 556, NULL },
+ { "n", 556, NULL },
+ { "Ecaron", 667, NULL },
+ { "threesuperior", 300, NULL },
+ { "zdotaccent", 389, NULL },
+ { "Uacute", 722, NULL },
+ { "atilde", 500, NULL },
+ { "Zacute", 611, NULL },
+ { "fraction", 167, NULL },
+ { "Sacute", 556, NULL },
+ { "Adieresis", 667, NULL },
+ { "asciitilde", 570, NULL },
+ { "Uogonek", 722, NULL },
{ "Lslash", 611, NULL },
- { "semicolon", 333, NULL },
+ { "caron", 333, NULL },
+ { "lacute", 278, NULL },
+ { "H", 778, NULL },
+ { "sterling", 500, NULL },
+ { "greaterequal", 549, NULL },
+ { "at", 832, NULL },
+ { "threequarters", 750, NULL },
+ { "J", 500, NULL },
+ { "ohungarumlaut", 500, NULL },
+ { "Ecircumflex", 667, NULL },
+ { "L", 611, NULL },
+ { "notequal", 549, NULL },
+ { "Agrave", 667, NULL },
+ { "exclam", 389, NULL },
+ { "AE", 944, NULL },
+ { "Acircumflex", 667, NULL },
{ "oslash", 500, NULL },
- { "lessequal", 549, NULL },
- { "lozenge", 494, NULL },
+ { "ograve", 500, NULL },
+ { "Rcommaaccent", 667, NULL },
+ { "Lacute", 611, NULL },
+ { "sacute", 389, NULL },
+ { "Idieresis", 389, NULL },
+ { "f", 333, NULL },
+ { "gcommaaccent", 500, NULL },
+ { "Ohungarumlaut", 722, NULL },
+ { "bracketleft", 333, NULL },
+ { "otilde", 500, NULL },
{ "parenright", 333, NULL },
- { "ccaron", 444, NULL },
- { "Ecircumflex", 667, NULL },
- { "gbreve", 500, NULL },
- { "trademark", 1000, NULL },
- { "daggerdbl", 500, NULL },
- { "nacute", 556, NULL },
+ { "Eogonek", 667, NULL },
{ "macron", 333, NULL },
- { "Otilde", 722, NULL },
- { "Emacron", 667, NULL },
- { "ellipsis", 1000, NULL },
- { "scaron", 389, NULL },
- { "AE", 944, NULL },
- { "Ucircumflex", 722, NULL },
- { "lslash", 278, NULL },
- { "quotedblleft", 500, NULL },
- { "guilsinglright", 333, NULL },
- { "hyphen", 333, NULL },
- { "quotesingle", 278, NULL },
- { "eight", 500, NULL },
- { "exclamdown", 389, NULL },
- { "endash", 500, NULL },
- { "oe", 722, NULL },
- { "Abreve", 667, NULL },
- { "Umacron", 722, NULL },
- { "ecircumflex", 444, NULL },
- { "Adieresis", 667, NULL },
- { "copyright", 747, NULL },
- { "Egrave", 667, NULL },
+ { "backslash", 278, NULL },
+ { "Lcaron", 611, NULL },
+ { "ordmasculine", 300, NULL },
+ { "questiondown", 500, NULL },
+ { "three", 500, NULL },
{ "slash", 278, NULL },
- { "Edieresis", 667, NULL },
- { "otilde", 500, NULL },
- { "Idieresis", 389, NULL },
- { "parenleft", 333, NULL },
- { "one", 500, NULL },
- { "emacron", 444, NULL },
- { "Odieresis", 722, NULL },
+ { "r", 389, NULL },
{ "ucircumflex", 556, NULL },
- { "bracketleft", 333, NULL },
- { "Ugrave", 722, NULL },
- { "quoteright", 333, NULL },
- { "Udieresis", 722, NULL },
- { "perthousand", 1000, NULL },
- { "Ydieresis", 611, NULL },
- { "umacron", 556, NULL },
- { "abreve", 500, NULL },
- { "Eacute", 667, NULL },
+ { "zacute", 389, NULL },
+ { "Umacron", 722, NULL },
+ { "ncaron", 556, NULL },
{ "adieresis", 500, NULL },
+ { "lozenge", 494, NULL },
+ { "V", 667, NULL },
+ { "Q", 722, NULL },
+ { "exclamdown", 389, NULL },
+ { "quoteright", 333, NULL },
+ { "uogonek", 556, NULL },
+ { "semicolon", 333, NULL },
+ { "guilsinglright", 333, NULL },
{ "egrave", 444, NULL },
- { "edieresis", 444, NULL },
- { "idieresis", 278, NULL },
- { "Eth", 722, NULL },
- { "ae", 722, NULL },
- { "asterisk", 500, NULL },
- { "odieresis", 500, NULL },
- { "Uacute", 722, NULL },
- { "ugrave", 556, NULL },
- { "nine", 500, NULL },
- { "five", 500, NULL },
- { "udieresis", 556, NULL },
- { "Zcaron", 611, NULL },
- { "Scommaaccent", 556, NULL },
- { "threequarters", 750, NULL },
- { "guillemotright", 500, NULL },
- { "Ccedilla", 667, NULL },
- { "ydieresis", 444, NULL },
- { "tilde", 333, NULL },
- { "at", 832, NULL },
- { "eacute", 444, NULL },
- { "underscore", 500, NULL },
- { "Euro", 500, NULL },
- { "Dcroat", 722, NULL },
- { "multiply", 570, NULL },
- { "zero", 500, NULL },
- { "eth", 500, NULL },
- { "Scedilla", 556, NULL },
- { "Ograve", 722, NULL },
- { "Racute", 667, NULL },
- { "partialdiff", 494, NULL },
- { "uacute", 556, NULL },
- { "braceleft", 348, NULL },
- { "Thorn", 611, NULL },
- { "zcaron", 389, NULL },
- { "scommaaccent", 389, NULL },
- { "ccedilla", 444, NULL },
- { "Dcaron", 722, NULL },
- { "dcroat", 500, NULL },
- { "Ocircumflex", 722, NULL },
- { "Oacute", 722, NULL },
- { "scedilla", 389, NULL },
- { "ogonek", 333, NULL },
- { "ograve", 500, NULL },
- { "racute", 389, NULL },
- { "Tcaron", 611, NULL },
- { "Eogonek", 667, NULL },
- { "thorn", 500, NULL },
- { "degree", 400, NULL },
- { "registered", 747, NULL },
- { "radical", 549, NULL },
+ { "uring", 556, NULL },
+ { "s", 389, NULL },
+ { "z", 389, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "one", 500, NULL },
+ { "I", 389, NULL },
+ { "eight", 500, NULL },
+ { "periodcentered", 250, NULL },
+ { "c", 444, NULL },
+ { "d", 500, NULL },
+ { "agrave", 500, NULL },
+ { "ellipsis", 1000, NULL },
{ "Aring", 667, NULL },
- { "percent", 833, NULL },
+ { "t", 278, NULL },
+ { "quotedbl", 555, NULL },
+ { "Oacute", 722, NULL },
{ "six", 500, NULL },
- { "paragraph", 500, NULL },
- { "dcaron", 608, NULL },
- { "Uogonek", 722, NULL },
- { "two", 500, NULL },
- { "summation", 600, NULL },
- { "Igrave", 389, NULL },
- { "Lacute", 611, NULL },
- { "ocircumflex", 500, NULL },
+ { "edotaccent", 444, NULL },
+ { "lslash", 278, NULL },
+ { "P", 611, NULL },
+ { "i", 278, NULL },
+ { "multiply", 570, NULL },
+ { "bar", 220, NULL },
+ { "quotesingle", 278, NULL },
+ { "braceleft", 348, NULL },
+ { "braceright", 348, NULL },
+ { "acute", 333, NULL },
+ { "onequarter", 750, NULL },
+ { "Atilde", 667, NULL },
+ { "Edieresis", 667, NULL },
{ "oacute", 500, NULL },
- { "Uring", 722, NULL },
- { "Lcommaaccent", 611, NULL },
+ { "Yacute", 611, NULL },
+ { "daggerdbl", 500, NULL },
+ { "ncommaaccent", 556, NULL },
+ { "tcommaaccent", 278, NULL },
+ { "logicalnot", 606, NULL },
+ { "cacute", 444, NULL },
+ { "Dcroat", 722, NULL },
{ "tcaron", 366, NULL },
- { "eogonek", 444, NULL },
- { "Delta", 612, NULL },
- { "Ohungarumlaut", 722, NULL },
- { "asciicircum", 570, NULL },
- { "aring", 500, NULL },
- { "grave", 333, NULL },
- { "uogonek", 556, NULL },
- { "bracketright", 333, NULL },
- { "Iacute", 389, NULL },
- { "ampersand", 778, NULL },
- { "igrave", 278, NULL },
- { "lacute", 278, NULL },
+ { "rcaron", 389, NULL },
+ { "x", 500, NULL },
+ { "Iogonek", 389, NULL },
+ { "edieresis", 444, NULL },
+ { "y", 444, NULL },
{ "Ncaron", 722, NULL },
+ { "m", 778, NULL },
+ { "OE", 944, NULL },
+ { "U", 722, NULL },
+ { "partialdiff", 494, NULL },
+ { "igrave", 278, NULL },
+ { "dcroat", 500, NULL },
+ { "question", 500, NULL },
+ { "summation", 600, NULL },
+ { "A", 667, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "Cacute", 667, NULL },
+ { "h", 556, NULL },
{ "plus", 570, NULL },
- { "uring", 556, NULL },
- { "quotesinglbase", 333, NULL },
- { "lcommaaccent", 278, NULL },
- { "Yacute", 611, NULL },
- { "ohungarumlaut", 500, NULL },
- { "threesuperior", 300, NULL },
- { "acute", 333, NULL },
- { "section", 500, NULL },
- { "dieresis", 333, NULL },
- { "iacute", 278, NULL },
- { "quotedblbase", 500, NULL },
- { "ncaron", 556, NULL },
- { "florin", 500, NULL },
+ { "Otilde", 722, NULL },
+ { "umacron", 556, NULL },
+ { "Tcaron", 611, NULL },
+ { "aacute", 500, NULL },
+ { "B", 667, NULL },
+ { "kcommaaccent", 500, NULL },
+ { "Rcaron", 667, NULL },
{ "yacute", 444, NULL },
- { "Rcommaaccent", 667, NULL },
+ { "ydieresis", 444, NULL },
+ { "R", 667, NULL },
+ { "ugrave", 556, NULL },
+ { "dcaron", 608, NULL },
+ { "Oslash", 722, NULL },
+ { "hyphen", 333, NULL },
+ { "a", 500, NULL },
+ { "omacron", 500, NULL },
+ { "Delta", 612, NULL },
+ { "comma", 250, NULL },
+ { "Gbreve", 722, NULL },
+ { "S", 556, NULL },
+ { "quotedblleft", 500, NULL },
+ { "ordfeminine", 266, NULL },
+ { "trademark", 1000, NULL },
+ { "ampersand", 778, NULL },
+ { "Lcommaaccent", 611, NULL },
+ { "ntilde", 556, NULL },
{ "fi", 556, NULL },
- { "fl", 556, NULL },
- { "Acircumflex", 667, NULL },
- { "Cacute", 667, NULL },
+ { "dieresis", 333, NULL },
+ { "Eacute", 667, NULL },
+ { "O", 722, NULL },
{ "Icircumflex", 389, NULL },
- { "guillemotleft", 500, NULL },
- { "germandbls", 500, NULL },
- { "Amacron", 667, NULL },
+ { "nacute", 556, NULL },
+ { "Abreve", 667, NULL },
+ { "Udieresis", 722, NULL },
+ { "Iacute", 389, NULL },
+ { "two", 500, NULL },
+ { "uacute", 556, NULL },
{ "seven", 500, NULL },
- { "Sacute", 556, NULL },
- { "ordmasculine", 300, NULL },
- { "dotlessi", 278, NULL },
- { "sterling", 500, NULL },
- { "notequal", 549, NULL },
- { "Imacron", 389, NULL },
- { "rcommaaccent", 389, NULL },
- { "Zdotaccent", 611, NULL },
- { "acircumflex", 500, NULL },
- { "cacute", 444, NULL },
- { "Ecaron", 667, NULL },
- { "icircumflex", 278, NULL },
- { "braceright", 348, NULL },
- { "quotedblright", 500, NULL },
- { "amacron", 500, NULL },
- { "sacute", 389, NULL },
- { "imacron", 278, NULL },
- { "cent", 500, NULL },
- { "currency", 500, NULL },
- { "logicalnot", 606, NULL },
- { "zdotaccent", 389, NULL },
- { "Atilde", 667, NULL },
- { "breve", 333, NULL },
- { "bar", 220, NULL },
- { "fraction", 167, NULL },
- { "less", 570, NULL },
- { "ecaron", 444, NULL },
- { "guilsinglleft", 333, NULL },
- { "exclam", 389, NULL },
- { "period", 250, NULL },
- { "Rcaron", 667, NULL },
- { "Kcommaaccent", 667, NULL },
- { "greater", 570, NULL },
- { "atilde", 500, NULL },
- { "brokenbar", 220, NULL },
- { "quoteleft", 333, NULL },
- { "Edotaccent", 667, NULL },
- { "onesuperior", 300, NULL }
+ { "scaron", 389, NULL },
+ { "guillemotright", 500, NULL },
+ { "bullet", 350, NULL },
+ { "eogonek", 444, NULL },
+ { "eacute", 444, NULL },
+ { "Zdotaccent", 611, NULL }
};
static BuiltinFontWidth timesItalicWidthsTab[] = {
- { "Ntilde", 667, NULL },
- { "rcaron", 389, NULL },
- { "kcommaaccent", 444, NULL },
- { "Ncommaaccent", 667, NULL },
- { "Zacute", 556, NULL },
- { "comma", 250, NULL },
- { "cedilla", 333, NULL },
- { "plusminus", 675, NULL },
- { "circumflex", 333, NULL },
- { "dotaccent", 333, NULL },
- { "edotaccent", 444, NULL },
- { "asciitilde", 541, NULL },
- { "colon", 333, NULL },
- { "onehalf", 750, NULL },
- { "dollar", 500, NULL },
- { "Lcaron", 611, NULL },
- { "ntilde", 500, NULL },
- { "Aogonek", 611, NULL },
- { "ncommaaccent", 500, NULL },
- { "minus", 675, NULL },
- { "Iogonek", 333, NULL },
+ { "quoteright", 333, NULL },
+ { "uogonek", 500, NULL },
+ { "semicolon", 333, NULL },
+ { "guilsinglright", 333, NULL },
+ { "Umacron", 722, NULL },
{ "zacute", 389, NULL },
- { "yen", 500, NULL },
- { "space", 250, NULL },
- { "Omacron", 722, NULL },
- { "questiondown", 500, NULL },
- { "emdash", 889, NULL },
- { "Agrave", 611, NULL },
+ { "ncaron", 500, NULL },
+ { "adieresis", 500, NULL },
+ { "lozenge", 471, NULL },
+ { "V", 611, NULL },
+ { "Q", 722, NULL },
+ { "exclamdown", 389, NULL },
{ "three", 500, NULL },
- { "numbersign", 500, NULL },
- { "lcaron", 300, NULL },
- { "A", 611, NULL },
- { "B", 611, NULL },
- { "C", 667, NULL },
- { "aogonek", 500, NULL },
- { "D", 722, NULL },
- { "E", 611, NULL },
- { "onequarter", 750, NULL },
- { "F", 611, NULL },
- { "G", 722, NULL },
- { "H", 722, NULL },
- { "I", 333, NULL },
- { "J", 444, NULL },
- { "K", 667, NULL },
- { "iogonek", 278, NULL },
+ { "slash", 278, NULL },
+ { "r", 389, NULL },
+ { "ucircumflex", 500, NULL },
+ { "Eogonek", 611, NULL },
+ { "macron", 333, NULL },
+ { "ordmasculine", 310, NULL },
+ { "Lcaron", 611, NULL },
+ { "questiondown", 500, NULL },
{ "backslash", 278, NULL },
- { "L", 556, NULL },
- { "periodcentered", 250, NULL },
- { "M", 833, NULL },
- { "N", 667, NULL },
- { "omacron", 500, NULL },
- { "Tcommaaccent", 556, NULL },
- { "O", 722, NULL },
- { "P", 611, NULL },
- { "Q", 722, NULL },
- { "Uhungarumlaut", 722, NULL },
- { "R", 611, NULL },
- { "Aacute", 611, NULL },
- { "caron", 333, NULL },
- { "S", 500, NULL },
- { "T", 556, NULL },
- { "U", 722, NULL },
+ { "t", 278, NULL },
+ { "quotedbl", 420, NULL },
+ { "Oacute", 722, NULL },
{ "agrave", 500, NULL },
- { "V", 611, NULL },
- { "W", 833, NULL },
- { "X", 611, NULL },
- { "question", 500, NULL },
- { "equal", 675, NULL },
- { "Y", 556, NULL },
- { "Z", 556, NULL },
- { "four", 500, NULL },
- { "a", 500, NULL },
- { "Gcommaaccent", 722, NULL },
- { "b", 500, NULL },
+ { "ellipsis", 889, NULL },
+ { "Aring", 611, NULL },
+ { "I", 333, NULL },
+ { "one", 500, NULL },
+ { "eight", 500, NULL },
+ { "periodcentered", 250, NULL },
{ "c", 444, NULL },
{ "d", 500, NULL },
- { "e", 444, NULL },
- { "f", 278, NULL },
- { "g", 500, NULL },
- { "bullet", 350, NULL },
- { "h", 500, NULL },
- { "i", 278, NULL },
- { "Oslash", 722, NULL },
- { "dagger", 500, NULL },
- { "j", 278, NULL },
- { "k", 444, NULL },
- { "l", 278, NULL },
- { "m", 722, NULL },
- { "n", 500, NULL },
- { "tcommaaccent", 278, NULL },
- { "o", 500, NULL },
- { "ordfeminine", 276, NULL },
- { "ring", 333, NULL },
- { "p", 500, NULL },
- { "q", 500, NULL },
- { "uhungarumlaut", 500, NULL },
- { "r", 389, NULL },
- { "twosuperior", 300, NULL },
- { "aacute", 500, NULL },
+ { "egrave", 444, NULL },
+ { "uring", 500, NULL },
{ "s", 389, NULL },
- { "OE", 944, NULL },
- { "t", 278, NULL },
- { "divide", 675, NULL },
- { "u", 500, NULL },
- { "Ccaron", 667, NULL },
- { "v", 444, NULL },
- { "w", 667, NULL },
- { "x", 444, NULL },
- { "y", 444, NULL },
+ { "Uhungarumlaut", 722, NULL },
{ "z", 389, NULL },
- { "Gbreve", 722, NULL },
- { "commaaccent", 250, NULL },
- { "hungarumlaut", 333, NULL },
- { "Idotaccent", 333, NULL },
- { "Nacute", 667, NULL },
- { "quotedbl", 420, NULL },
- { "gcommaaccent", 500, NULL },
- { "mu", 500, NULL },
- { "greaterequal", 549, NULL },
- { "Scaron", 500, NULL },
- { "Lslash", 556, NULL },
- { "semicolon", 333, NULL },
- { "oslash", 500, NULL },
- { "lessequal", 549, NULL },
- { "lozenge", 471, NULL },
- { "parenright", 333, NULL },
- { "ccaron", 444, NULL },
+ { "threequarters", 750, NULL },
+ { "J", 444, NULL },
+ { "ohungarumlaut", 500, NULL },
{ "Ecircumflex", 611, NULL },
- { "gbreve", 500, NULL },
- { "trademark", 980, NULL },
- { "daggerdbl", 500, NULL },
- { "nacute", 500, NULL },
- { "macron", 333, NULL },
- { "Otilde", 722, NULL },
- { "Emacron", 611, NULL },
- { "ellipsis", 889, NULL },
- { "scaron", 389, NULL },
+ { "L", 556, NULL },
+ { "notequal", 549, NULL },
+ { "Agrave", 611, NULL },
{ "AE", 889, NULL },
- { "Ucircumflex", 722, NULL },
- { "lslash", 278, NULL },
- { "quotedblleft", 556, NULL },
- { "guilsinglright", 333, NULL },
- { "hyphen", 333, NULL },
- { "quotesingle", 214, NULL },
- { "eight", 500, NULL },
- { "exclamdown", 389, NULL },
- { "endash", 500, NULL },
- { "oe", 667, NULL },
- { "Abreve", 611, NULL },
- { "Umacron", 722, NULL },
- { "ecircumflex", 444, NULL },
+ { "exclam", 333, NULL },
+ { "Acircumflex", 611, NULL },
+ { "oslash", 500, NULL },
+ { "caron", 333, NULL },
+ { "Uogonek", 722, NULL },
+ { "Lslash", 556, NULL },
+ { "lacute", 278, NULL },
+ { "H", 722, NULL },
+ { "sterling", 500, NULL },
+ { "at", 920, NULL },
+ { "greaterequal", 549, NULL },
+ { "asciitilde", 541, NULL },
+ { "Uacute", 722, NULL },
+ { "atilde", 500, NULL },
+ { "Zacute", 556, NULL },
+ { "fraction", 167, NULL },
{ "Adieresis", 611, NULL },
- { "copyright", 760, NULL },
- { "Egrave", 611, NULL },
- { "slash", 278, NULL },
- { "Edieresis", 611, NULL },
+ { "Sacute", 500, NULL },
+ { "gcommaaccent", 500, NULL },
+ { "Ohungarumlaut", 722, NULL },
+ { "bracketleft", 389, NULL },
{ "otilde", 500, NULL },
+ { "parenright", 333, NULL },
+ { "f", 278, NULL },
+ { "Lacute", 556, NULL },
+ { "sacute", 389, NULL },
{ "Idieresis", 333, NULL },
- { "parenleft", 333, NULL },
- { "one", 500, NULL },
- { "emacron", 444, NULL },
- { "Odieresis", 722, NULL },
- { "ucircumflex", 500, NULL },
- { "bracketleft", 389, NULL },
- { "Ugrave", 722, NULL },
- { "quoteright", 333, NULL },
- { "Udieresis", 722, NULL },
- { "perthousand", 1000, NULL },
- { "Ydieresis", 556, NULL },
- { "umacron", 500, NULL },
- { "abreve", 500, NULL },
- { "Eacute", 611, NULL },
- { "adieresis", 500, NULL },
- { "egrave", 444, NULL },
- { "edieresis", 444, NULL },
- { "idieresis", 278, NULL },
- { "Eth", 722, NULL },
- { "ae", 667, NULL },
- { "asterisk", 500, NULL },
- { "odieresis", 500, NULL },
- { "Uacute", 722, NULL },
- { "ugrave", 500, NULL },
- { "nine", 500, NULL },
- { "five", 500, NULL },
- { "udieresis", 500, NULL },
- { "Zcaron", 556, NULL },
- { "Scommaaccent", 500, NULL },
- { "threequarters", 750, NULL },
- { "guillemotright", 500, NULL },
- { "Ccedilla", 667, NULL },
- { "ydieresis", 444, NULL },
- { "tilde", 333, NULL },
- { "at", 920, NULL },
- { "eacute", 444, NULL },
- { "underscore", 500, NULL },
- { "Euro", 500, NULL },
- { "Dcroat", 722, NULL },
- { "multiply", 675, NULL },
- { "zero", 500, NULL },
- { "eth", 500, NULL },
- { "Scedilla", 500, NULL },
- { "Ograve", 722, NULL },
- { "Racute", 611, NULL },
- { "partialdiff", 476, NULL },
- { "uacute", 500, NULL },
- { "braceleft", 400, NULL },
- { "Thorn", 611, NULL },
- { "zcaron", 389, NULL },
- { "scommaaccent", 389, NULL },
- { "ccedilla", 444, NULL },
- { "Dcaron", 722, NULL },
- { "dcroat", 500, NULL },
- { "Ocircumflex", 722, NULL },
- { "Oacute", 722, NULL },
- { "scedilla", 389, NULL },
- { "ogonek", 333, NULL },
{ "ograve", 500, NULL },
- { "racute", 389, NULL },
- { "Tcaron", 556, NULL },
- { "Eogonek", 611, NULL },
- { "thorn", 500, NULL },
- { "degree", 400, NULL },
- { "registered", 760, NULL },
- { "radical", 453, NULL },
- { "Aring", 611, NULL },
- { "percent", 833, NULL },
- { "six", 500, NULL },
- { "paragraph", 523, NULL },
+ { "Rcommaaccent", 611, NULL },
+ { "quotedblleft", 556, NULL },
+ { "ordfeminine", 276, NULL },
+ { "omacron", 500, NULL },
+ { "Delta", 612, NULL },
+ { "comma", 250, NULL },
+ { "Gbreve", 722, NULL },
+ { "S", 500, NULL },
+ { "B", 611, NULL },
+ { "kcommaaccent", 444, NULL },
+ { "yacute", 444, NULL },
+ { "Rcaron", 611, NULL },
+ { "R", 611, NULL },
+ { "ydieresis", 444, NULL },
+ { "ugrave", 500, NULL },
{ "dcaron", 544, NULL },
- { "Uogonek", 722, NULL },
- { "two", 500, NULL },
- { "summation", 600, NULL },
- { "Igrave", 333, NULL },
- { "Lacute", 556, NULL },
- { "ocircumflex", 500, NULL },
- { "oacute", 500, NULL },
- { "Uring", 722, NULL },
- { "Lcommaaccent", 556, NULL },
- { "tcaron", 300, NULL },
+ { "Oslash", 722, NULL },
+ { "hyphen", 333, NULL },
+ { "a", 500, NULL },
+ { "umacron", 500, NULL },
+ { "Otilde", 722, NULL },
+ { "Tcaron", 556, NULL },
+ { "aacute", 500, NULL },
+ { "scaron", 389, NULL },
+ { "guillemotright", 500, NULL },
{ "eogonek", 444, NULL },
- { "Delta", 612, NULL },
- { "Ohungarumlaut", 722, NULL },
- { "asciicircum", 422, NULL },
- { "aring", 500, NULL },
- { "grave", 333, NULL },
- { "uogonek", 500, NULL },
- { "bracketright", 389, NULL },
+ { "bullet", 350, NULL },
+ { "eacute", 444, NULL },
+ { "Zdotaccent", 556, NULL },
+ { "Udieresis", 722, NULL },
+ { "Abreve", 611, NULL },
{ "Iacute", 333, NULL },
+ { "two", 500, NULL },
+ { "uacute", 500, NULL },
+ { "seven", 500, NULL },
+ { "dieresis", 333, NULL },
+ { "Eacute", 611, NULL },
+ { "O", 722, NULL },
+ { "Icircumflex", 333, NULL },
+ { "nacute", 500, NULL },
+ { "trademark", 980, NULL },
{ "ampersand", 778, NULL },
- { "igrave", 278, NULL },
- { "lacute", 278, NULL },
- { "Ncaron", 667, NULL },
- { "plus", 675, NULL },
- { "uring", 500, NULL },
- { "quotesinglbase", 333, NULL },
- { "lcommaaccent", 278, NULL },
+ { "Lcommaaccent", 556, NULL },
+ { "ntilde", 500, NULL },
+ { "fi", 500, NULL },
+ { "Atilde", 611, NULL },
+ { "Edieresis", 611, NULL },
{ "Yacute", 556, NULL },
- { "ohungarumlaut", 500, NULL },
- { "threesuperior", 300, NULL },
+ { "oacute", 500, NULL },
+ { "daggerdbl", 500, NULL },
+ { "braceleft", 400, NULL },
+ { "braceright", 400, NULL },
{ "acute", 333, NULL },
- { "section", 500, NULL },
- { "dieresis", 333, NULL },
- { "iacute", 278, NULL },
- { "quotedblbase", 556, NULL },
- { "ncaron", 500, NULL },
- { "florin", 500, NULL },
- { "yacute", 444, NULL },
- { "Rcommaaccent", 611, NULL },
- { "fi", 500, NULL },
- { "fl", 500, NULL },
- { "Acircumflex", 611, NULL },
+ { "onequarter", 750, NULL },
+ { "multiply", 675, NULL },
+ { "i", 278, NULL },
+ { "bar", 275, NULL },
+ { "quotesingle", 214, NULL },
+ { "six", 500, NULL },
+ { "edotaccent", 444, NULL },
+ { "P", 611, NULL },
+ { "lslash", 278, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "h", 500, NULL },
{ "Cacute", 667, NULL },
- { "Icircumflex", 333, NULL },
- { "guillemotleft", 500, NULL },
- { "germandbls", 500, NULL },
- { "Amacron", 611, NULL },
- { "seven", 500, NULL },
- { "Sacute", 500, NULL },
- { "ordmasculine", 310, NULL },
- { "dotlessi", 278, NULL },
- { "sterling", 500, NULL },
- { "notequal", 549, NULL },
- { "Imacron", 333, NULL },
- { "rcommaaccent", 389, NULL },
- { "Zdotaccent", 556, NULL },
- { "acircumflex", 500, NULL },
+ { "plus", 675, NULL },
+ { "igrave", 278, NULL },
+ { "dcroat", 500, NULL },
+ { "question", 500, NULL },
+ { "summation", 600, NULL },
+ { "A", 611, NULL },
+ { "x", 444, NULL },
+ { "Iogonek", 333, NULL },
+ { "y", 444, NULL },
+ { "edieresis", 444, NULL },
+ { "Ncaron", 667, NULL },
+ { "m", 722, NULL },
+ { "OE", 944, NULL },
+ { "U", 722, NULL },
+ { "partialdiff", 476, NULL },
+ { "ncommaaccent", 500, NULL },
+ { "tcommaaccent", 278, NULL },
+ { "logicalnot", 675, NULL },
{ "cacute", 444, NULL },
- { "Ecaron", 611, NULL },
- { "icircumflex", 278, NULL },
- { "braceright", 400, NULL },
- { "quotedblright", 556, NULL },
- { "amacron", 500, NULL },
- { "sacute", 389, NULL },
+ { "Dcroat", 722, NULL },
+ { "tcaron", 300, NULL },
+ { "rcaron", 389, NULL },
+ { "rcommaaccent", 389, NULL },
+ { "Kcommaaccent", 667, NULL },
{ "imacron", 278, NULL },
+ { "tilde", 333, NULL },
+ { "underscore", 500, NULL },
+ { "mu", 500, NULL },
+ { "D", 722, NULL },
+ { "racute", 389, NULL },
+ { "Tcommaaccent", 556, NULL },
+ { "dollar", 500, NULL },
+ { "v", 444, NULL },
+ { "Nacute", 667, NULL },
+ { "dotaccent", 333, NULL },
+ { "ae", 667, NULL },
{ "cent", 500, NULL },
- { "currency", 500, NULL },
- { "logicalnot", 675, NULL },
- { "zdotaccent", 389, NULL },
- { "Atilde", 611, NULL },
- { "breve", 333, NULL },
- { "bar", 275, NULL },
- { "fraction", 167, NULL },
+ { "ocircumflex", 500, NULL },
{ "less", 675, NULL },
+ { "four", 500, NULL },
+ { "minus", 675, NULL },
+ { "circumflex", 333, NULL },
+ { "Zcaron", 556, NULL },
+ { "ogonek", 333, NULL },
+ { "idieresis", 278, NULL },
+ { "parenleft", 333, NULL },
+ { "currency", 500, NULL },
+ { "nine", 500, NULL },
+ { "quotesinglbase", 333, NULL },
+ { "grave", 333, NULL },
+ { "Scedilla", 500, NULL },
+ { "ccaron", 444, NULL },
+ { "lessequal", 549, NULL },
+ { "Omacron", 722, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "j", 278, NULL },
+ { "Ccaron", 667, NULL },
+ { "Y", 556, NULL },
+ { "yen", 500, NULL },
+ { "w", 667, NULL },
+ { "space", 250, NULL },
+ { "Thorn", 611, NULL },
+ { "eth", 500, NULL },
+ { "twosuperior", 300, NULL },
{ "ecaron", 444, NULL },
- { "guilsinglleft", 333, NULL },
- { "exclam", 333, NULL },
+ { "brokenbar", 275, NULL },
+ { "Aogonek", 611, NULL },
+ { "fl", 500, NULL },
+ { "quotedblbase", 556, NULL },
+ { "E", 611, NULL },
+ { "endash", 500, NULL },
+ { "guillemotleft", 500, NULL },
+ { "amacron", 500, NULL },
+ { "Ncommaaccent", 667, NULL },
+ { "numbersign", 500, NULL },
+ { "divide", 675, NULL },
+ { "emacron", 444, NULL },
+ { "M", 833, NULL },
+ { "odieresis", 500, NULL },
+ { "Ograve", 722, NULL },
+ { "T", 556, NULL },
+ { "G", 722, NULL },
+ { "F", 611, NULL },
+ { "Ocircumflex", 722, NULL },
+ { "Uring", 722, NULL },
+ { "Edotaccent", 611, NULL },
+ { "perthousand", 1000, NULL },
+ { "acircumflex", 500, NULL },
+ { "zero", 500, NULL },
{ "period", 250, NULL },
- { "Rcaron", 611, NULL },
- { "Kcommaaccent", 667, NULL },
+ { "scedilla", 389, NULL },
+ { "udieresis", 500, NULL },
+ { "Ccedilla", 667, NULL },
+ { "Igrave", 333, NULL },
+ { "commaaccent", 250, NULL },
+ { "bracketright", 389, NULL },
+ { "W", 833, NULL },
+ { "Ugrave", 722, NULL },
+ { "germandbls", 500, NULL },
+ { "thorn", 500, NULL },
+ { "dagger", 500, NULL },
+ { "equal", 675, NULL },
+ { "N", 667, NULL },
+ { "C", 667, NULL },
+ { "u", 500, NULL },
+ { "q", 500, NULL },
+ { "l", 278, NULL },
+ { "icircumflex", 278, NULL },
+ { "abreve", 500, NULL },
+ { "Imacron", 333, NULL },
+ { "iacute", 278, NULL },
+ { "e", 444, NULL },
+ { "percent", 833, NULL },
+ { "o", 500, NULL },
{ "greater", 675, NULL },
- { "atilde", 500, NULL },
- { "brokenbar", 275, NULL },
+ { "Emacron", 611, NULL },
+ { "scommaaccent", 389, NULL },
+ { "asterisk", 500, NULL },
+ { "onesuperior", 300, NULL },
+ { "n", 500, NULL },
+ { "Ecaron", 611, NULL },
+ { "threesuperior", 300, NULL },
+ { "zdotaccent", 389, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "onehalf", 750, NULL },
+ { "gbreve", 500, NULL },
+ { "uhungarumlaut", 500, NULL },
+ { "Racute", 611, NULL },
+ { "k", 444, NULL },
+ { "copyright", 760, NULL },
{ "quoteleft", 333, NULL },
- { "Edotaccent", 611, NULL },
- { "onesuperior", 300, NULL }
+ { "registered", 760, NULL },
+ { "Gcommaaccent", 722, NULL },
+ { "emdash", 889, NULL },
+ { "aogonek", 500, NULL },
+ { "Egrave", 611, NULL },
+ { "ring", 333, NULL },
+ { "Odieresis", 722, NULL },
+ { "oe", 667, NULL },
+ { "five", 500, NULL },
+ { "X", 611, NULL },
+ { "asciicircum", 422, NULL },
+ { "plusminus", 675, NULL },
+ { "Idotaccent", 333, NULL },
+ { "cedilla", 333, NULL },
+ { "quotedblright", 556, NULL },
+ { "Eth", 722, NULL },
+ { "g", 500, NULL },
+ { "colon", 333, NULL },
+ { "ccedilla", 444, NULL },
+ { "Ntilde", 667, NULL },
+ { "radical", 453, NULL },
+ { "dotlessi", 278, NULL },
+ { "p", 500, NULL },
+ { "K", 667, NULL },
+ { "Scommaaccent", 500, NULL },
+ { "Aacute", 611, NULL },
+ { "b", 500, NULL },
+ { "Euro", 500, NULL },
+ { "iogonek", 278, NULL },
+ { "florin", 500, NULL },
+ { "section", 500, NULL },
+ { "Scaron", 500, NULL },
+ { "degree", 400, NULL },
+ { "lcaron", 300, NULL },
+ { "paragraph", 523, NULL },
+ { "zcaron", 389, NULL },
+ { "aring", 500, NULL },
+ { "Ydieresis", 556, NULL },
+ { "Dcaron", 722, NULL },
+ { "Z", 556, NULL },
+ { "ecircumflex", 444, NULL },
+ { "Amacron", 611, NULL },
+ { "breve", 333, NULL }
};
static BuiltinFontWidth timesRomanWidthsTab[] = {
- { "Ntilde", 722, NULL },
- { "rcaron", 333, NULL },
- { "kcommaaccent", 500, NULL },
- { "Ncommaaccent", 722, NULL },
+ { "greaterequal", 549, NULL },
+ { "at", 921, NULL },
+ { "sterling", 500, NULL },
+ { "H", 722, NULL },
+ { "caron", 333, NULL },
+ { "Uogonek", 722, NULL },
+ { "Lslash", 611, NULL },
+ { "lacute", 278, NULL },
+ { "Acircumflex", 722, NULL },
+ { "oslash", 500, NULL },
+ { "notequal", 549, NULL },
+ { "Agrave", 722, NULL },
+ { "AE", 889, NULL },
+ { "exclam", 333, NULL },
+ { "ohungarumlaut", 500, NULL },
+ { "L", 611, NULL },
+ { "Ecircumflex", 611, NULL },
+ { "threequarters", 750, NULL },
+ { "J", 389, NULL },
+ { "Sacute", 556, NULL },
+ { "Adieresis", 722, NULL },
+ { "fraction", 167, NULL },
+ { "atilde", 444, NULL },
{ "Zacute", 611, NULL },
- { "comma", 250, NULL },
- { "cedilla", 333, NULL },
- { "plusminus", 564, NULL },
- { "circumflex", 333, NULL },
- { "dotaccent", 333, NULL },
- { "edotaccent", 444, NULL },
+ { "Uacute", 722, NULL },
{ "asciitilde", 541, NULL },
- { "colon", 278, NULL },
- { "onehalf", 750, NULL },
- { "dollar", 500, NULL },
- { "Lcaron", 611, NULL },
- { "ntilde", 500, NULL },
- { "Aogonek", 722, NULL },
- { "ncommaaccent", 500, NULL },
- { "minus", 564, NULL },
- { "Iogonek", 333, NULL },
+ { "f", 333, NULL },
+ { "parenright", 333, NULL },
+ { "otilde", 500, NULL },
+ { "Ohungarumlaut", 722, NULL },
+ { "bracketleft", 333, NULL },
+ { "gcommaaccent", 500, NULL },
+ { "Rcommaaccent", 667, NULL },
+ { "ograve", 500, NULL },
+ { "sacute", 389, NULL },
+ { "Idieresis", 333, NULL },
+ { "Lacute", 611, NULL },
+ { "Q", 722, NULL },
+ { "exclamdown", 333, NULL },
+ { "lozenge", 471, NULL },
+ { "V", 722, NULL },
+ { "ncaron", 500, NULL },
+ { "adieresis", 444, NULL },
{ "zacute", 444, NULL },
- { "yen", 500, NULL },
- { "space", 250, NULL },
- { "Omacron", 722, NULL },
+ { "Umacron", 722, NULL },
+ { "semicolon", 278, NULL },
+ { "guilsinglright", 333, NULL },
+ { "quoteright", 333, NULL },
+ { "uogonek", 500, NULL },
+ { "Eogonek", 611, NULL },
+ { "macron", 333, NULL },
+ { "ordmasculine", 310, NULL },
+ { "Lcaron", 611, NULL },
+ { "backslash", 278, NULL },
{ "questiondown", 444, NULL },
- { "emdash", 1000, NULL },
- { "Agrave", 722, NULL },
+ { "ucircumflex", 500, NULL },
+ { "r", 333, NULL },
+ { "slash", 278, NULL },
{ "three", 500, NULL },
- { "numbersign", 500, NULL },
- { "lcaron", 344, NULL },
- { "A", 722, NULL },
- { "B", 667, NULL },
- { "C", 667, NULL },
- { "aogonek", 444, NULL },
- { "D", 722, NULL },
- { "E", 611, NULL },
- { "onequarter", 750, NULL },
- { "F", 556, NULL },
- { "G", 722, NULL },
- { "H", 722, NULL },
- { "I", 333, NULL },
- { "J", 389, NULL },
- { "K", 722, NULL },
- { "iogonek", 278, NULL },
- { "backslash", 278, NULL },
- { "L", 611, NULL },
- { "periodcentered", 250, NULL },
- { "M", 889, NULL },
- { "N", 722, NULL },
- { "omacron", 500, NULL },
- { "Tcommaaccent", 611, NULL },
- { "O", 722, NULL },
- { "P", 556, NULL },
- { "Q", 722, NULL },
- { "Uhungarumlaut", 722, NULL },
- { "R", 667, NULL },
- { "Aacute", 722, NULL },
- { "caron", 333, NULL },
- { "S", 556, NULL },
- { "T", 611, NULL },
- { "U", 722, NULL },
+ { "Aring", 722, NULL },
+ { "ellipsis", 1000, NULL },
{ "agrave", 444, NULL },
- { "V", 722, NULL },
- { "W", 944, NULL },
- { "X", 722, NULL },
- { "question", 444, NULL },
- { "equal", 564, NULL },
- { "Y", 722, NULL },
- { "Z", 611, NULL },
- { "four", 500, NULL },
- { "a", 444, NULL },
- { "Gcommaaccent", 722, NULL },
- { "b", 500, NULL },
+ { "Oacute", 722, NULL },
+ { "quotedbl", 408, NULL },
+ { "t", 278, NULL },
+ { "Uhungarumlaut", 722, NULL },
+ { "z", 444, NULL },
+ { "uring", 500, NULL },
+ { "s", 389, NULL },
+ { "egrave", 444, NULL },
{ "c", 444, NULL },
{ "d", 500, NULL },
- { "e", 444, NULL },
- { "f", 333, NULL },
- { "g", 500, NULL },
- { "bullet", 350, NULL },
- { "h", 500, NULL },
+ { "periodcentered", 250, NULL },
+ { "I", 333, NULL },
+ { "eight", 500, NULL },
+ { "one", 500, NULL },
+ { "onequarter", 750, NULL },
+ { "braceright", 480, NULL },
+ { "braceleft", 480, NULL },
+ { "acute", 333, NULL },
+ { "daggerdbl", 500, NULL },
+ { "oacute", 500, NULL },
+ { "Yacute", 722, NULL },
+ { "Edieresis", 611, NULL },
+ { "Atilde", 722, NULL },
+ { "P", 556, NULL },
+ { "lslash", 278, NULL },
+ { "six", 500, NULL },
+ { "edotaccent", 444, NULL },
+ { "quotesingle", 180, NULL },
+ { "bar", 200, NULL },
{ "i", 278, NULL },
- { "Oslash", 722, NULL },
- { "dagger", 500, NULL },
- { "j", 278, NULL },
- { "k", 500, NULL },
- { "l", 278, NULL },
- { "m", 778, NULL },
- { "n", 500, NULL },
+ { "multiply", 564, NULL },
+ { "A", 722, NULL },
+ { "question", 444, NULL },
+ { "summation", 600, NULL },
+ { "igrave", 278, NULL },
+ { "dcroat", 500, NULL },
+ { "plus", 564, NULL },
+ { "guilsinglleft", 333, NULL },
+ { "h", 500, NULL },
+ { "Cacute", 667, NULL },
+ { "rcaron", 333, NULL },
+ { "tcaron", 326, NULL },
+ { "cacute", 444, NULL },
+ { "Dcroat", 722, NULL },
{ "tcommaaccent", 278, NULL },
- { "o", 500, NULL },
- { "ordfeminine", 276, NULL },
- { "ring", 333, NULL },
- { "p", 500, NULL },
- { "q", 500, NULL },
- { "uhungarumlaut", 500, NULL },
- { "r", 333, NULL },
- { "twosuperior", 300, NULL },
- { "aacute", 444, NULL },
- { "s", 389, NULL },
+ { "logicalnot", 564, NULL },
+ { "ncommaaccent", 500, NULL },
+ { "partialdiff", 476, NULL },
+ { "U", 722, NULL },
+ { "m", 778, NULL },
{ "OE", 889, NULL },
- { "t", 278, NULL },
- { "divide", 564, NULL },
- { "u", 500, NULL },
- { "Ccaron", 667, NULL },
- { "v", 500, NULL },
- { "w", 722, NULL },
+ { "Ncaron", 722, NULL },
{ "x", 500, NULL },
+ { "edieresis", 444, NULL },
+ { "Iogonek", 333, NULL },
{ "y", 500, NULL },
- { "z", 444, NULL },
+ { "S", 556, NULL },
{ "Gbreve", 722, NULL },
- { "commaaccent", 250, NULL },
- { "hungarumlaut", 333, NULL },
- { "Idotaccent", 333, NULL },
- { "Nacute", 722, NULL },
- { "quotedbl", 408, NULL },
- { "gcommaaccent", 500, NULL },
- { "mu", 500, NULL },
- { "greaterequal", 549, NULL },
- { "Scaron", 556, NULL },
- { "Lslash", 611, NULL },
- { "semicolon", 278, NULL },
- { "oslash", 500, NULL },
- { "lessequal", 549, NULL },
- { "lozenge", 471, NULL },
- { "parenright", 333, NULL },
- { "ccaron", 444, NULL },
- { "Ecircumflex", 611, NULL },
- { "gbreve", 500, NULL },
- { "trademark", 980, NULL },
- { "daggerdbl", 500, NULL },
- { "nacute", 500, NULL },
- { "macron", 333, NULL },
- { "Otilde", 722, NULL },
- { "Emacron", 611, NULL },
- { "ellipsis", 1000, NULL },
- { "scaron", 389, NULL },
- { "AE", 889, NULL },
- { "Ucircumflex", 722, NULL },
- { "lslash", 278, NULL },
+ { "omacron", 500, NULL },
+ { "comma", 250, NULL },
+ { "Delta", 612, NULL },
+ { "ordfeminine", 276, NULL },
{ "quotedblleft", 444, NULL },
- { "guilsinglright", 333, NULL },
- { "hyphen", 333, NULL },
- { "quotesingle", 180, NULL },
- { "eight", 500, NULL },
- { "exclamdown", 333, NULL },
- { "endash", 500, NULL },
- { "oe", 722, NULL },
- { "Abreve", 722, NULL },
- { "Umacron", 722, NULL },
- { "ecircumflex", 444, NULL },
- { "Adieresis", 722, NULL },
- { "copyright", 760, NULL },
- { "Egrave", 611, NULL },
- { "slash", 278, NULL },
- { "Edieresis", 611, NULL },
- { "otilde", 500, NULL },
- { "Idieresis", 333, NULL },
- { "parenleft", 333, NULL },
- { "one", 500, NULL },
- { "emacron", 444, NULL },
- { "Odieresis", 722, NULL },
- { "ucircumflex", 500, NULL },
- { "bracketleft", 333, NULL },
- { "Ugrave", 722, NULL },
- { "quoteright", 333, NULL },
- { "Udieresis", 722, NULL },
- { "perthousand", 1000, NULL },
- { "Ydieresis", 722, NULL },
+ { "aacute", 444, NULL },
+ { "Tcaron", 611, NULL },
+ { "Otilde", 722, NULL },
{ "umacron", 500, NULL },
- { "abreve", 444, NULL },
- { "Eacute", 611, NULL },
- { "adieresis", 444, NULL },
- { "egrave", 444, NULL },
- { "edieresis", 444, NULL },
- { "idieresis", 278, NULL },
- { "Eth", 722, NULL },
- { "ae", 667, NULL },
- { "asterisk", 500, NULL },
- { "odieresis", 500, NULL },
- { "Uacute", 722, NULL },
+ { "Oslash", 722, NULL },
+ { "hyphen", 333, NULL },
+ { "a", 444, NULL },
{ "ugrave", 500, NULL },
- { "nine", 500, NULL },
- { "five", 500, NULL },
- { "udieresis", 500, NULL },
- { "Zcaron", 611, NULL },
- { "Scommaaccent", 556, NULL },
- { "threequarters", 750, NULL },
- { "guillemotright", 500, NULL },
- { "Ccedilla", 667, NULL },
+ { "dcaron", 588, NULL },
+ { "yacute", 500, NULL },
+ { "kcommaaccent", 500, NULL },
+ { "Rcaron", 667, NULL },
+ { "R", 667, NULL },
{ "ydieresis", 500, NULL },
- { "tilde", 333, NULL },
- { "at", 921, NULL },
+ { "B", 667, NULL },
+ { "seven", 500, NULL },
+ { "two", 500, NULL },
+ { "uacute", 500, NULL },
+ { "Iacute", 333, NULL },
+ { "Abreve", 722, NULL },
+ { "Udieresis", 722, NULL },
+ { "Zdotaccent", 611, NULL },
{ "eacute", 444, NULL },
- { "underscore", 500, NULL },
- { "Euro", 500, NULL },
- { "Dcroat", 722, NULL },
- { "multiply", 564, NULL },
- { "zero", 500, NULL },
+ { "eogonek", 444, NULL },
+ { "bullet", 350, NULL },
+ { "guillemotright", 500, NULL },
+ { "scaron", 389, NULL },
+ { "fi", 556, NULL },
+ { "ntilde", 500, NULL },
+ { "Lcommaaccent", 611, NULL },
+ { "trademark", 980, NULL },
+ { "ampersand", 778, NULL },
+ { "O", 722, NULL },
+ { "Icircumflex", 333, NULL },
+ { "nacute", 500, NULL },
+ { "Eacute", 611, NULL },
+ { "dieresis", 333, NULL },
+ { "endash", 500, NULL },
+ { "guillemotleft", 500, NULL },
+ { "E", 611, NULL },
+ { "quotedblbase", 444, NULL },
+ { "fl", 556, NULL },
+ { "brokenbar", 200, NULL },
+ { "Aogonek", 722, NULL },
+ { "ecaron", 444, NULL },
+ { "Thorn", 556, NULL },
+ { "space", 250, NULL },
+ { "twosuperior", 300, NULL },
{ "eth", 500, NULL },
- { "Scedilla", 556, NULL },
+ { "w", 722, NULL },
+ { "T", 611, NULL },
{ "Ograve", 722, NULL },
- { "Racute", 667, NULL },
- { "partialdiff", 476, NULL },
- { "uacute", 500, NULL },
- { "braceleft", 480, NULL },
- { "Thorn", 556, NULL },
- { "zcaron", 444, NULL },
- { "scommaaccent", 389, NULL },
- { "ccedilla", 444, NULL },
- { "Dcaron", 722, NULL },
- { "dcroat", 500, NULL },
+ { "M", 889, NULL },
+ { "odieresis", 500, NULL },
+ { "divide", 564, NULL },
+ { "emacron", 444, NULL },
+ { "numbersign", 500, NULL },
+ { "Ncommaaccent", 722, NULL },
+ { "amacron", 444, NULL },
+ { "acircumflex", 444, NULL },
+ { "Edotaccent", 611, NULL },
+ { "perthousand", 1000, NULL },
+ { "Uring", 722, NULL },
{ "Ocircumflex", 722, NULL },
- { "Oacute", 722, NULL },
- { "scedilla", 389, NULL },
- { "ogonek", 333, NULL },
- { "ograve", 500, NULL },
- { "racute", 333, NULL },
- { "Tcaron", 611, NULL },
- { "Eogonek", 611, NULL },
+ { "F", 556, NULL },
+ { "G", 722, NULL },
{ "thorn", 500, NULL },
- { "degree", 400, NULL },
- { "registered", 760, NULL },
- { "radical", 453, NULL },
- { "Aring", 722, NULL },
- { "percent", 833, NULL },
- { "six", 500, NULL },
- { "paragraph", 453, NULL },
- { "dcaron", 588, NULL },
- { "Uogonek", 722, NULL },
- { "two", 500, NULL },
- { "summation", 600, NULL },
+ { "Ugrave", 722, NULL },
+ { "germandbls", 500, NULL },
+ { "bracketright", 333, NULL },
+ { "W", 944, NULL },
+ { "commaaccent", 250, NULL },
{ "Igrave", 333, NULL },
- { "Lacute", 611, NULL },
+ { "Ccedilla", 667, NULL },
+ { "period", 250, NULL },
+ { "scedilla", 389, NULL },
+ { "udieresis", 500, NULL },
+ { "zero", 500, NULL },
+ { "v", 500, NULL },
+ { "Nacute", 722, NULL },
+ { "dotaccent", 333, NULL },
+ { "Tcommaaccent", 611, NULL },
+ { "dollar", 500, NULL },
+ { "mu", 500, NULL },
+ { "D", 722, NULL },
+ { "racute", 333, NULL },
+ { "underscore", 500, NULL },
+ { "tilde", 333, NULL },
+ { "rcommaaccent", 333, NULL },
+ { "Kcommaaccent", 722, NULL },
+ { "imacron", 278, NULL },
+ { "idieresis", 278, NULL },
+ { "ogonek", 333, NULL },
+ { "Zcaron", 611, NULL },
+ { "circumflex", 333, NULL },
+ { "four", 500, NULL },
+ { "minus", 564, NULL },
{ "ocircumflex", 500, NULL },
- { "oacute", 500, NULL },
- { "Uring", 722, NULL },
- { "Lcommaaccent", 611, NULL },
- { "tcaron", 326, NULL },
- { "eogonek", 444, NULL },
- { "Delta", 612, NULL },
- { "Ohungarumlaut", 722, NULL },
- { "asciicircum", 469, NULL },
- { "aring", 444, NULL },
+ { "less", 564, NULL },
+ { "cent", 500, NULL },
+ { "ae", 667, NULL },
{ "grave", 333, NULL },
- { "uogonek", 500, NULL },
- { "bracketright", 333, NULL },
- { "Iacute", 333, NULL },
- { "ampersand", 778, NULL },
- { "igrave", 278, NULL },
- { "lacute", 278, NULL },
- { "Ncaron", 722, NULL },
- { "plus", 564, NULL },
- { "uring", 500, NULL },
+ { "Scedilla", 556, NULL },
{ "quotesinglbase", 333, NULL },
- { "lcommaaccent", 278, NULL },
- { "Yacute", 722, NULL },
- { "ohungarumlaut", 500, NULL },
- { "threesuperior", 300, NULL },
- { "acute", 333, NULL },
+ { "currency", 500, NULL },
+ { "nine", 500, NULL },
+ { "parenleft", 333, NULL },
+ { "yen", 500, NULL },
+ { "Y", 722, NULL },
+ { "hungarumlaut", 333, NULL },
+ { "Ccaron", 667, NULL },
+ { "j", 278, NULL },
+ { "lessequal", 549, NULL },
+ { "Ucircumflex", 722, NULL },
+ { "Omacron", 722, NULL },
+ { "ccaron", 444, NULL },
+ { "X", 722, NULL },
+ { "asciicircum", 469, NULL },
+ { "five", 500, NULL },
+ { "Odieresis", 722, NULL },
+ { "oe", 722, NULL },
+ { "ring", 333, NULL },
+ { "Egrave", 611, NULL },
+ { "aogonek", 444, NULL },
+ { "emdash", 1000, NULL },
+ { "dotlessi", 278, NULL },
+ { "p", 500, NULL },
+ { "radical", 453, NULL },
+ { "Ntilde", 722, NULL },
+ { "g", 500, NULL },
+ { "colon", 278, NULL },
+ { "ccedilla", 444, NULL },
+ { "quotedblright", 444, NULL },
+ { "Eth", 722, NULL },
+ { "plusminus", 564, NULL },
+ { "Idotaccent", 333, NULL },
+ { "cedilla", 333, NULL },
{ "section", 500, NULL },
- { "dieresis", 333, NULL },
- { "iacute", 278, NULL },
- { "quotedblbase", 444, NULL },
- { "ncaron", 500, NULL },
+ { "Scaron", 556, NULL },
+ { "degree", 400, NULL },
+ { "Euro", 500, NULL },
{ "florin", 500, NULL },
- { "yacute", 500, NULL },
- { "Rcommaaccent", 667, NULL },
- { "fi", 556, NULL },
- { "fl", 556, NULL },
- { "Acircumflex", 722, NULL },
- { "Cacute", 667, NULL },
- { "Icircumflex", 333, NULL },
- { "guillemotleft", 500, NULL },
- { "germandbls", 500, NULL },
+ { "iogonek", 278, NULL },
+ { "b", 500, NULL },
+ { "Scommaaccent", 556, NULL },
+ { "Aacute", 722, NULL },
+ { "K", 722, NULL },
{ "Amacron", 722, NULL },
- { "seven", 500, NULL },
- { "Sacute", 556, NULL },
- { "ordmasculine", 310, NULL },
- { "dotlessi", 278, NULL },
- { "sterling", 500, NULL },
- { "notequal", 549, NULL },
+ { "breve", 333, NULL },
+ { "Z", 611, NULL },
+ { "ecircumflex", 444, NULL },
+ { "Dcaron", 722, NULL },
+ { "aring", 444, NULL },
+ { "Ydieresis", 722, NULL },
+ { "lcaron", 344, NULL },
+ { "paragraph", 453, NULL },
+ { "zcaron", 444, NULL },
{ "Imacron", 333, NULL },
- { "rcommaaccent", 333, NULL },
- { "Zdotaccent", 611, NULL },
- { "acircumflex", 444, NULL },
- { "cacute", 444, NULL },
- { "Ecaron", 611, NULL },
+ { "abreve", 444, NULL },
+ { "e", 444, NULL },
+ { "iacute", 278, NULL },
{ "icircumflex", 278, NULL },
- { "braceright", 480, NULL },
- { "quotedblright", 444, NULL },
- { "amacron", 444, NULL },
- { "sacute", 389, NULL },
- { "imacron", 278, NULL },
- { "cent", 500, NULL },
- { "currency", 500, NULL },
- { "logicalnot", 564, NULL },
- { "zdotaccent", 444, NULL },
- { "Atilde", 722, NULL },
- { "breve", 333, NULL },
- { "bar", 200, NULL },
- { "fraction", 167, NULL },
- { "less", 564, NULL },
- { "ecaron", 444, NULL },
- { "guilsinglleft", 333, NULL },
- { "exclam", 333, NULL },
- { "period", 250, NULL },
- { "Rcaron", 667, NULL },
- { "Kcommaaccent", 722, NULL },
+ { "q", 500, NULL },
+ { "l", 278, NULL },
+ { "C", 667, NULL },
+ { "u", 500, NULL },
+ { "dagger", 500, NULL },
+ { "equal", 564, NULL },
+ { "N", 722, NULL },
+ { "onesuperior", 300, NULL },
+ { "asterisk", 500, NULL },
+ { "Emacron", 611, NULL },
+ { "scommaaccent", 389, NULL },
{ "greater", 564, NULL },
- { "atilde", 444, NULL },
- { "brokenbar", 200, NULL },
+ { "o", 500, NULL },
+ { "percent", 833, NULL },
+ { "gbreve", 500, NULL },
+ { "uhungarumlaut", 500, NULL },
+ { "lcommaaccent", 278, NULL },
+ { "onehalf", 750, NULL },
+ { "threesuperior", 300, NULL },
+ { "zdotaccent", 444, NULL },
+ { "Ecaron", 611, NULL },
+ { "n", 500, NULL },
+ { "Gcommaaccent", 722, NULL },
+ { "registered", 760, NULL },
{ "quoteleft", 333, NULL },
- { "Edotaccent", 611, NULL },
- { "onesuperior", 300, NULL }
+ { "copyright", 760, NULL },
+ { "k", 500, NULL },
+ { "Racute", 667, NULL }
};
static BuiltinFontWidth zapfDingbatsWidthsTab[] = {
- { "a81", 438, NULL },
- { "a82", 138, NULL },
- { "a83", 277, NULL },
- { "a84", 415, NULL },
- { "a85", 509, NULL },
- { "a86", 410, NULL },
+ { "a198", 888, NULL },
+ { "a107", 760, NULL },
+ { "a167", 927, NULL },
+ { "a97", 392, NULL },
+ { "a137", 788, NULL },
+ { "a175", 930, NULL },
+ { "a55", 708, NULL },
+ { "a206", 410, NULL },
+ { "a146", 788, NULL },
+ { "a27", 759, NULL },
+ { "a71", 791, NULL },
+ { "a79", 784, NULL },
+ { "a136", 788, NULL },
+ { "a43", 923, NULL },
+ { "a131", 788, NULL },
+ { "a154", 788, NULL },
+ { "a123", 788, NULL },
+ { "a8", 537, NULL },
{ "a87", 234, NULL },
- { "a88", 234, NULL },
- { "a89", 390, NULL },
+ { "a72", 873, NULL },
+ { "a199", 867, NULL },
+ { "a151", 788, NULL },
+ { "a99", 668, NULL },
+ { "a126", 788, NULL },
+ { "a46", 749, NULL },
+ { "a34", 794, NULL },
+ { "a186", 967, NULL },
+ { "a102", 544, NULL },
+ { "a205", 509, NULL },
+ { "a62", 707, NULL },
{ "a140", 788, NULL },
- { "a141", 788, NULL },
- { "a142", 788, NULL },
- { "a143", 788, NULL },
- { "a144", 788, NULL },
- { "a145", 788, NULL },
- { "a146", 788, NULL },
- { "a147", 788, NULL },
- { "a148", 788, NULL },
- { "a149", 788, NULL },
{ "a90", 390, NULL },
- { "a91", 276, NULL },
- { "a92", 276, NULL },
- { "space", 278, NULL },
- { "a93", 317, NULL },
- { "a94", 317, NULL },
- { "a95", 334, NULL },
- { "a96", 334, NULL },
- { "a97", 392, NULL },
{ "a98", 392, NULL },
- { "a99", 668, NULL },
+ { "a9", 577, NULL },
+ { "a178", 883, NULL },
+ { "a26", 760, NULL },
+ { "a40", 833, NULL },
+ { "a125", 788, NULL },
+ { "a101", 732, NULL },
+ { "a103", 544, NULL },
{ "a150", 788, NULL },
- { "a151", 788, NULL },
+ { "a57", 701, NULL },
+ { "a18", 974, NULL },
+ { "a184", 946, NULL },
+ { "space", 278, NULL },
+ { "a74", 762, NULL },
+ { "a168", 928, NULL },
+ { "a147", 788, NULL },
+ { "a187", 831, NULL },
+ { "a110", 694, NULL },
+ { "a143", 788, NULL },
+ { "a36", 823, NULL },
+ { "a41", 816, NULL },
+ { "a86", 410, NULL },
+ { "a164", 458, NULL },
{ "a152", 788, NULL },
- { "a153", 788, NULL },
- { "a154", 788, NULL },
- { "a155", 788, NULL },
- { "a156", 788, NULL },
- { "a157", 788, NULL },
- { "a158", 788, NULL },
- { "a159", 788, NULL },
- { "a160", 894, NULL },
- { "a161", 838, NULL },
- { "a162", 924, NULL },
{ "a163", 1016, NULL },
- { "a164", 458, NULL },
- { "a165", 924, NULL },
+ { "a3", 980, NULL },
+ { "a160", 894, NULL },
{ "a166", 918, NULL },
- { "a167", 927, NULL },
- { "a168", 928, NULL },
- { "a169", 928, NULL },
- { "a170", 834, NULL },
+ { "a117", 690, NULL },
+ { "a83", 277, NULL },
+ { "a29", 786, NULL },
+ { "a22", 761, NULL },
+ { "a112", 776, NULL },
+ { "a133", 788, NULL },
+ { "a156", 788, NULL },
+ { "a200", 696, NULL },
+ { "a81", 438, NULL },
+ { "a106", 667, NULL },
+ { "a100", 668, NULL },
+ { "a132", 788, NULL },
+ { "a95", 334, NULL },
+ { "a37", 789, NULL },
+ { "a58", 826, NULL },
+ { "a191", 918, NULL },
+ { "a56", 682, NULL },
+ { "a70", 785, NULL },
+ { "a157", 788, NULL },
{ "a171", 873, NULL },
- { "a172", 828, NULL },
- { "a173", 924, NULL },
- { "a174", 917, NULL },
- { "a175", 930, NULL },
- { "a176", 931, NULL },
- { "a177", 463, NULL },
- { "a178", 883, NULL },
- { "a179", 836, NULL },
- { "a180", 867, NULL },
- { "a181", 696, NULL },
- { "a182", 874, NULL },
- { "a183", 760, NULL },
- { "a184", 946, NULL },
- { "a185", 865, NULL },
- { "a186", 967, NULL },
- { "a187", 831, NULL },
{ "a188", 873, NULL },
- { "a189", 927, NULL },
- { "a1", 974, NULL },
- { "a2", 961, NULL },
- { "a3", 980, NULL },
- { "a4", 719, NULL },
- { "a5", 789, NULL },
- { "a6", 494, NULL },
- { "a7", 552, NULL },
- { "a8", 537, NULL },
- { "a9", 577, NULL },
- { "a190", 970, NULL },
- { "a191", 918, NULL },
- { "a192", 748, NULL },
- { "a193", 836, NULL },
- { "a194", 771, NULL },
- { "a195", 888, NULL },
- { "a196", 748, NULL },
- { "a197", 771, NULL },
- { "a198", 888, NULL },
- { "a199", 867, NULL },
- { "a10", 692, NULL },
- { "a11", 960, NULL },
- { "a12", 939, NULL },
- { "a13", 549, NULL },
+ { "a47", 790, NULL },
{ "a14", 855, NULL },
- { "a15", 911, NULL },
- { "a16", 933, NULL },
- { "a17", 945, NULL },
- { "a18", 974, NULL },
- { "a19", 755, NULL },
- { "a20", 846, NULL },
- { "a21", 762, NULL },
- { "a22", 761, NULL },
{ "a23", 571, NULL },
- { "a24", 677, NULL },
+ { "a2", 961, NULL },
+ { "a77", 892, NULL },
+ { "a105", 911, NULL },
{ "a25", 763, NULL },
- { "a26", 760, NULL },
- { "a27", 759, NULL },
- { "a28", 754, NULL },
- { "a29", 786, NULL },
- { "a30", 788, NULL },
- { "a31", 788, NULL },
- { "a32", 790, NULL },
- { "a33", 793, NULL },
- { "a34", 794, NULL },
- { "a35", 816, NULL },
- { "a36", 823, NULL },
- { "a37", 789, NULL },
- { "a38", 841, NULL },
- { "a39", 823, NULL },
- { "a40", 833, NULL },
- { "a41", 816, NULL },
- { "a42", 831, NULL },
- { "a43", 923, NULL },
+ { "a202", 974, NULL },
+ { "a61", 789, NULL },
+ { "a10", 692, NULL },
{ "a44", 744, NULL },
- { "a45", 723, NULL },
- { "a46", 749, NULL },
- { "a47", 790, NULL },
+ { "a159", 788, NULL },
{ "a48", 792, NULL },
- { "a49", 695, NULL },
- { "a100", 668, NULL },
- { "a101", 732, NULL },
- { "a102", 544, NULL },
- { "a103", 544, NULL },
- { "a104", 910, NULL },
- { "a105", 911, NULL },
- { "a106", 667, NULL },
- { "a107", 760, NULL },
+ { "a124", 788, NULL },
+ { "a190", 970, NULL },
+ { "a20", 846, NULL },
+ { "a185", 865, NULL },
+ { "a16", 933, NULL },
+ { "a11", 960, NULL },
+ { "a134", 788, NULL },
{ "a108", 760, NULL },
- { "a109", 626, NULL },
- { "a50", 776, NULL },
- { "a51", 768, NULL },
- { "a52", 792, NULL },
- { "a53", 759, NULL },
+ { "a28", 754, NULL },
+ { "a149", 788, NULL },
+ { "a172", 828, NULL },
+ { "a1", 974, NULL },
+ { "a144", 788, NULL },
+ { "a92", 276, NULL },
+ { "a66", 786, NULL },
+ { "a189", 927, NULL },
{ "a54", 707, NULL },
- { "a55", 708, NULL },
- { "a56", 682, NULL },
- { "a57", 701, NULL },
- { "a58", 826, NULL },
{ "a59", 815, NULL },
- { "a110", 694, NULL },
- { "a111", 595, NULL },
- { "a112", 776, NULL },
- { "a117", 690, NULL },
- { "a118", 791, NULL },
- { "a119", 790, NULL },
- { "a60", 789, NULL },
- { "a61", 789, NULL },
- { "a62", 707, NULL },
- { "a63", 687, NULL },
- { "a64", 696, NULL },
- { "a65", 689, NULL },
- { "a66", 786, NULL },
- { "a67", 787, NULL },
- { "a68", 713, NULL },
- { "a69", 791, NULL },
- { "a200", 696, NULL },
+ { "a13", 549, NULL },
+ { "a4", 719, NULL },
+ { "a82", 138, NULL },
+ { "a109", 626, NULL },
+ { "a170", 834, NULL },
{ "a201", 874, NULL },
- { "a120", 788, NULL },
- { "a121", 788, NULL },
- { "a202", 974, NULL },
- { "a122", 788, NULL },
- { "a203", 762, NULL },
- { "a123", 788, NULL },
{ "a204", 759, NULL },
- { "a124", 788, NULL },
- { "a205", 509, NULL },
- { "a125", 788, NULL },
- { "a206", 410, NULL },
- { "a126", 788, NULL },
- { "a127", 788, NULL },
- { "a128", 788, NULL },
- { "a129", 788, NULL },
- { "a70", 785, NULL },
- { "a71", 791, NULL },
- { "a72", 873, NULL },
+ { "a39", 823, NULL },
+ { "a197", 771, NULL },
+ { "a49", 695, NULL },
+ { "a139", 788, NULL },
+ { "a96", 334, NULL },
+ { "a7", 552, NULL },
+ { "a183", 760, NULL },
+ { "a118", 791, NULL },
+ { "a155", 788, NULL },
+ { "a148", 788, NULL },
{ "a73", 761, NULL },
- { "a74", 762, NULL },
{ "a75", 759, NULL },
{ "a76", 892, NULL },
- { "a77", 892, NULL },
- { "a78", 788, NULL },
- { "a79", 784, NULL },
- { "a130", 788, NULL },
- { "a131", 788, NULL },
- { "a132", 788, NULL },
- { "a133", 788, NULL },
- { "a134", 788, NULL },
{ "a135", 788, NULL },
- { "a136", 788, NULL },
- { "a137", 788, NULL },
+ { "a177", 463, NULL },
+ { "a104", 910, NULL },
+ { "a88", 234, NULL },
+ { "a142", 788, NULL },
+ { "a179", 836, NULL },
+ { "a17", 945, NULL },
+ { "a203", 762, NULL },
+ { "a141", 788, NULL },
+ { "a31", 788, NULL },
+ { "a129", 788, NULL },
+ { "a35", 816, NULL },
+ { "a182", 874, NULL },
+ { "a15", 911, NULL },
+ { "a38", 841, NULL },
+ { "a169", 928, NULL },
+ { "a67", 787, NULL },
+ { "a45", 723, NULL },
+ { "a93", 317, NULL },
+ { "a195", 888, NULL },
+ { "a68", 713, NULL },
+ { "a6", 494, NULL },
+ { "a24", 677, NULL },
+ { "a21", 762, NULL },
+ { "a192", 748, NULL },
{ "a138", 788, NULL },
- { "a139", 788, NULL }
+ { "a65", 689, NULL },
+ { "a84", 415, NULL },
+ { "a52", 792, NULL },
+ { "a32", 790, NULL },
+ { "a33", 793, NULL },
+ { "a60", 789, NULL },
+ { "a130", 788, NULL },
+ { "a180", 867, NULL },
+ { "a78", 788, NULL },
+ { "a42", 831, NULL },
+ { "a196", 748, NULL },
+ { "a111", 595, NULL },
+ { "a53", 759, NULL },
+ { "a161", 838, NULL },
+ { "a94", 317, NULL },
+ { "a85", 509, NULL },
+ { "a51", 768, NULL },
+ { "a181", 696, NULL },
+ { "a176", 931, NULL },
+ { "a50", 776, NULL },
+ { "a173", 924, NULL },
+ { "a153", 788, NULL },
+ { "a120", 788, NULL },
+ { "a122", 788, NULL },
+ { "a193", 836, NULL },
+ { "a165", 924, NULL },
+ { "a19", 755, NULL },
+ { "a30", 788, NULL },
+ { "a89", 390, NULL },
+ { "a158", 788, NULL },
+ { "a145", 788, NULL },
+ { "a121", 788, NULL },
+ { "a194", 771, NULL },
+ { "a64", 696, NULL },
+ { "a127", 788, NULL },
+ { "a174", 917, NULL },
+ { "a69", 791, NULL },
+ { "a128", 788, NULL },
+ { "a91", 276, NULL },
+ { "a63", 687, NULL },
+ { "a5", 789, NULL },
+ { "a119", 790, NULL },
+ { "a12", 939, NULL },
+ { "a162", 924, NULL }
};
BuiltinFont builtinFonts[] = {
- { "Courier", standardEncoding, 629, -157, { -23, -250, 715, 805}, NULL },
- { "Courier-Bold", standardEncoding, 629, -157, {-113, -250, 749, 801}, NULL },
- { "Courier-BoldOblique", standardEncoding, 629, -157, { -57, -250, 869, 801}, NULL },
- { "Courier-Oblique", standardEncoding, 629, -157, { -27, -250, 849, 805}, NULL },
- { "Helvetica", standardEncoding, 718, -207, {-166, -225, 1000, 931}, NULL },
- { "Helvetica-Bold", standardEncoding, 718, -207, {-170, -228, 1003, 962}, NULL },
- { "Helvetica-BoldOblique", standardEncoding, 718, -207, {-174, -228, 1114, 962}, NULL },
- { "Helvetica-Oblique", standardEncoding, 718, -207, {-170, -225, 1116, 931}, NULL },
- { "Symbol", symbolEncoding, 1010, -293, {-180, -293, 1090, 1010}, NULL },
- { "Times-Bold", standardEncoding, 683, -217, {-168, -218, 1000, 935}, NULL },
- { "Times-BoldItalic", standardEncoding, 683, -217, {-200, -218, 996, 921}, NULL },
- { "Times-Italic", standardEncoding, 683, -217, {-169, -217, 1010, 883}, NULL },
- { "Times-Roman", standardEncoding, 683, -217, {-168, -218, 1000, 898}, NULL },
- { "ZapfDingbats", zapfDingbatsEncoding, 820, -143, { -1, -143, 981, 820}, NULL }
+ { "Courier", standardEncoding, 600, 629, -157, { -23, -250, 715, 805}, NULL },
+ { "Courier-Bold", standardEncoding, 600, 629, -157, {-113, -250, 749, 801}, NULL },
+ { "Courier-BoldOblique", standardEncoding, 600, 629, -157, { -57, -250, 869, 801}, NULL },
+ { "Courier-Oblique", standardEncoding, 600, 629, -157, { -27, -250, 849, 805}, NULL },
+ { "Helvetica", standardEncoding, 0, 718, -207, {-166, -225, 1000, 931}, NULL },
+ { "Helvetica-Bold", standardEncoding, 0, 718, -207, {-170, -228, 1003, 962}, NULL },
+ { "Helvetica-BoldOblique", standardEncoding, 0, 718, -207, {-174, -228, 1114, 962}, NULL },
+ { "Helvetica-Oblique", standardEncoding, 0, 718, -207, {-170, -225, 1116, 931}, NULL },
+ { "Symbol", symbolEncoding, 0, 1010, -293, {-180, -293, 1090, 1010}, NULL },
+ { "Times-Bold", standardEncoding, 0, 683, -217, {-168, -218, 1000, 935}, NULL },
+ { "Times-BoldItalic", standardEncoding, 0, 683, -217, {-200, -218, 996, 921}, NULL },
+ { "Times-Italic", standardEncoding, 0, 683, -217, {-169, -217, 1010, 883}, NULL },
+ { "Times-Roman", standardEncoding, 0, 683, -217, {-168, -218, 1000, 898}, NULL },
+ { "ZapfDingbats", zapfDingbatsEncoding, 0, 820, -143, { -1, -143, 981, 820}, NULL }
};
BuiltinFont *builtinFontSubst[] = {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/CMakeLists.txt b/Build/source/libs/xpdf/xpdf-src/xpdf/CMakeLists.txt
index 4cffd39e0c5..8fb3f2050bb 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/CMakeLists.txt
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/CMakeLists.txt
@@ -56,6 +56,7 @@ add_library(xpdf_objs OBJECT
OutputDev.cc
Page.cc
Parser.cc
+ PDF417Barcode.cc
PDFDoc.cc
PDFDocEncoding.cc
PSTokenizer.cc
@@ -63,6 +64,7 @@ add_library(xpdf_objs OBJECT
Stream.cc
TextString.cc
UnicodeMap.cc
+ UnicodeRemapping.cc
UnicodeTypeTable.cc
UTF8.cc
XFAForm.cc
@@ -106,6 +108,7 @@ if (HAVE_SPLASH)
pdftops.cc
)
target_link_libraries(pdftops goo fofi splash
+ ${PAPER_LIBRARY}
${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
${DTYPE_LIBRARY}
${LCMS_LIBRARY})
@@ -116,10 +119,10 @@ else ()
PSOutputDev.cc
pdftops.cc
)
- target_link_libraries(pdftops goo fofi ${LCMS_LIBRARY})
+ target_link_libraries(pdftops goo fofi ${PAPER_LIBRARY} ${LCMS_LIBRARY})
endif ()
-install(TARGETS pdftops RUNTIME DESTINATION bin)
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftops.1 DESTINATION man/man1)
+install(TARGETS pdftops RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftops.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
#--- pdftotext
@@ -128,9 +131,9 @@ add_executable(pdftotext
TextOutputDev.cc
pdftotext.cc
)
-target_link_libraries(pdftotext goo fofi ${LCMS_LIBRARY})
-install(TARGETS pdftotext RUNTIME DESTINATION bin)
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftotext.1 DESTINATION man/man1)
+target_link_libraries(pdftotext goo fofi ${PAPER_LIBRARY} ${LCMS_LIBRARY})
+install(TARGETS pdftotext RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftotext.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
#--- pdftohtml
@@ -143,11 +146,12 @@ if (HAVE_SPLASH AND PNG_FOUND)
pdftohtml.cc
)
target_link_libraries(pdftohtml goo fofi splash
+ ${PAPER_LIBRARY}
${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
${DTYPE_LIBRARY}
${LCMS_LIBRARY} ${PNG_LIBRARIES})
- install(TARGETS pdftohtml RUNTIME DESTINATION bin)
- install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftohtml.1 DESTINATION man/man1)
+ install(TARGETS pdftohtml RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftohtml.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif ()
#--- pdfinfo
@@ -156,9 +160,9 @@ add_executable(pdfinfo
$<TARGET_OBJECTS:xpdf_objs>
pdfinfo.cc
)
-target_link_libraries(pdfinfo goo fofi ${LCMS_LIBRARY})
-install(TARGETS pdfinfo RUNTIME DESTINATION bin)
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfinfo.1 DESTINATION man/man1)
+target_link_libraries(pdfinfo goo fofi ${PAPER_LIBRARY} ${LCMS_LIBRARY})
+install(TARGETS pdfinfo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfinfo.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
#--- pdffonts
@@ -166,9 +170,9 @@ add_executable(pdffonts
$<TARGET_OBJECTS:xpdf_objs>
pdffonts.cc
)
-target_link_libraries(pdffonts goo fofi ${LCMS_LIBRARY})
-install(TARGETS pdffonts RUNTIME DESTINATION bin)
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdffonts.1 DESTINATION man/man1)
+target_link_libraries(pdffonts goo fofi ${PAPER_LIBRARY} ${LCMS_LIBRARY})
+install(TARGETS pdffonts RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdffonts.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
#--- pdfdetach
@@ -176,9 +180,9 @@ add_executable(pdfdetach
$<TARGET_OBJECTS:xpdf_objs>
pdfdetach.cc
)
-target_link_libraries(pdfdetach goo fofi ${LCMS_LIBRARY})
-install(TARGETS pdfdetach RUNTIME DESTINATION bin)
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfdetach.1 DESTINATION man/man1)
+target_link_libraries(pdfdetach goo fofi ${PAPER_LIBRARY} ${LCMS_LIBRARY})
+install(TARGETS pdfdetach RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfdetach.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
#--- pdftoppm
@@ -189,11 +193,12 @@ if (HAVE_SPLASH)
pdftoppm.cc
)
target_link_libraries(pdftoppm goo fofi splash
+ ${PAPER_LIBRARY}
${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
${DTYPE_LIBRARY}
${LCMS_LIBRARY})
- install(TARGETS pdftoppm RUNTIME DESTINATION bin)
- install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftoppm.1 DESTINATION man/man1)
+ install(TARGETS pdftoppm RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftoppm.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif ()
#--- pdftopng
@@ -205,11 +210,12 @@ if (HAVE_SPLASH AND PNG_FOUND)
pdftopng.cc
)
target_link_libraries(pdftopng goo fofi splash
+ ${PAPER_LIBRARY}
${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS}
${DTYPE_LIBRARY}
${LCMS_LIBRARY} ${PNG_LIBRARIES})
- install(TARGETS pdftopng RUNTIME DESTINATION bin)
- install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftopng.1 DESTINATION man/man1)
+ install(TARGETS pdftopng RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install(FILES ${PROJECT_SOURCE_DIR}/doc/pdftopng.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif ()
#--- pdfimages
@@ -219,10 +225,10 @@ add_executable(pdfimages
ImageOutputDev.cc
pdfimages.cc
)
-target_link_libraries(pdfimages goo fofi ${LCMS_LIBRARY})
-install(TARGETS pdfimages RUNTIME DESTINATION bin)
-install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfimages.1 DESTINATION man/man1)
+target_link_libraries(pdfimages goo fofi ${PAPER_LIBRARY} ${LCMS_LIBRARY})
+install(TARGETS pdfimages RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(FILES ${PROJECT_SOURCE_DIR}/doc/pdfimages.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
#--- xpdfrc man page
-install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdfrc.5 DESTINATION man/man5)
+install(FILES ${PROJECT_SOURCE_DIR}/doc/xpdfrc.5 DESTINATION ${CMAKE_INSTALL_MANDIR}/man5)
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Catalog.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Catalog.cc
index e1b8be98936..470807314a6 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Catalog.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Catalog.cc
@@ -453,8 +453,13 @@ GBool Catalog::readPageTree(Object *catDict) {
}
if (topPagesObj.dictLookup("Count", &countObj)->isInt()) {
numPages = countObj.getInt();
- if (numPages == 0) {
- // Acrobat apparently scans the page tree if it sees a zero count
+ if (numPages == 0 || numPages > 50000) {
+ // 1. Acrobat apparently scans the page tree if it sees a zero
+ // count.
+ // 2. Absurdly large page counts result in very slow loading,
+ // because other code tries to fetch pages 1 through n.
+ // In both cases: ignore the given page count and scan the tree
+ // instead.
numPages = countPageTree(&topPagesObj);
}
} else {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Decrypt.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Decrypt.cc
index 2d28399d655..d4f8d4ec336 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Decrypt.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Decrypt.cc
@@ -165,7 +165,7 @@ GBool Decrypt::makeFileKey(int encVersion, int encRevision, int keyLength,
memcpy(test2, ownerKey->getCString(), 32);
for (i = 19; i >= 0; --i) {
for (j = 0; j < keyLength; ++j) {
- tmpKey[j] = test[j] ^ i;
+ tmpKey[j] = (Guchar)(test[j] ^ i);
}
rc4InitKey(tmpKey, keyLength, fState);
fx = fy = 0;
@@ -274,10 +274,10 @@ GBool Decrypt::makeFileKey2(int encVersion, int encRevision, int keyLength,
memcpy(buf, passwordPad, 32);
}
memcpy(buf + 32, ownerKey->getCString(), 32);
- buf[64] = permissions & 0xff;
- buf[65] = (permissions >> 8) & 0xff;
- buf[66] = (permissions >> 16) & 0xff;
- buf[67] = (permissions >> 24) & 0xff;
+ buf[64] = (Guchar)(permissions & 0xff);
+ buf[65] = (Guchar)((permissions >> 8) & 0xff);
+ buf[66] = (Guchar)((permissions >> 16) & 0xff);
+ buf[67] = (Guchar)((permissions >> 24) & 0xff);
memcpy(buf + 68, fileID->getCString(), fileID->getLength());
len = 68 + fileID->getLength();
if (!encryptMetadata) {
@@ -305,7 +305,7 @@ GBool Decrypt::makeFileKey2(int encVersion, int encRevision, int keyLength,
memcpy(test, userKey->getCString(), 32);
for (i = 19; i >= 0; --i) {
for (j = 0; j < keyLength; ++j) {
- tmpKey[j] = fileKey[j] ^ i;
+ tmpKey[j] = (Guchar)(fileKey[j] ^ i);
}
rc4InitKey(tmpKey, keyLength, fState);
fx = fy = 0;
@@ -348,22 +348,22 @@ DecryptStream::DecryptStream(Stream *strA, Guchar *fileKeyA,
}
switch (algo) {
case cryptRC4:
- objKey[keyLength] = objNum & 0xff;
- objKey[keyLength + 1] = (objNum >> 8) & 0xff;
- objKey[keyLength + 2] = (objNum >> 16) & 0xff;
- objKey[keyLength + 3] = objGen & 0xff;
- objKey[keyLength + 4] = (objGen >> 8) & 0xff;
+ objKey[keyLength] = (Guchar)(objNum & 0xff);
+ objKey[keyLength + 1] = (Guchar)((objNum >> 8) & 0xff);
+ objKey[keyLength + 2] = (Guchar)((objNum >> 16) & 0xff);
+ objKey[keyLength + 3] = (Guchar)(objGen & 0xff);
+ objKey[keyLength + 4] = (Guchar)((objGen >> 8) & 0xff);
md5(objKey, keyLength + 5, objKey);
if ((objKeyLength = keyLength + 5) > 16) {
objKeyLength = 16;
}
break;
case cryptAES:
- objKey[keyLength] = objNum & 0xff;
- objKey[keyLength + 1] = (objNum >> 8) & 0xff;
- objKey[keyLength + 2] = (objNum >> 16) & 0xff;
- objKey[keyLength + 3] = objGen & 0xff;
- objKey[keyLength + 4] = (objGen >> 8) & 0xff;
+ objKey[keyLength] = (Guchar)(objNum & 0xff);
+ objKey[keyLength + 1] = (Guchar)((objNum >> 8) & 0xff);
+ objKey[keyLength + 2] = (Guchar)((objNum >> 16) & 0xff);
+ objKey[keyLength + 3] = (Guchar)(objGen & 0xff);
+ objKey[keyLength + 4] = (Guchar)((objGen >> 8) & 0xff);
objKey[keyLength + 5] = 0x73; // 's'
objKey[keyLength + 6] = 0x41; // 'A'
objKey[keyLength + 7] = 0x6c; // 'l'
@@ -516,22 +516,22 @@ void rc4InitKey(Guchar *key, int keyLen, Guchar *state) {
int i;
for (i = 0; i < 256; ++i)
- state[i] = i;
+ state[i] = (Guchar)i;
index1 = index2 = 0;
for (i = 0; i < 256; ++i) {
- index2 = (key[index1] + state[i] + index2) % 256;
+ index2 = (Guchar)(key[index1] + state[i] + index2);
t = state[i];
state[i] = state[index2];
state[index2] = t;
- index1 = (index1 + 1) % keyLen;
+ index1 = (Guchar)((index1 + 1) % keyLen);
}
}
Guchar rc4DecryptByte(Guchar *state, Guchar *x, Guchar *y, Guchar c) {
Guchar x1, y1, tx, ty;
- x1 = *x = (*x + 1) % 256;
- y1 = *y = (state[*x] + *y) % 256;
+ x1 = *x = (Guchar)(*x + 1);
+ y1 = *y = (Guchar)(state[*x] + *y);
tx = state[x1];
ty = state[y1];
state[x1] = ty;
@@ -672,7 +672,7 @@ static inline void invShiftRows(Guchar *state) {
static inline Guchar mul02(Guchar s) {
Guchar s2;
- s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+ s2 = (Guchar)((s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1));
return s2;
}
@@ -680,7 +680,7 @@ static inline Guchar mul02(Guchar s) {
static inline Guchar mul03(Guchar s) {
Guchar s2;
- s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+ s2 = (Guchar)((s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1));
return s ^ s2;
}
@@ -688,9 +688,9 @@ static inline Guchar mul03(Guchar s) {
static inline Guchar mul09(Guchar s) {
Guchar s2, s4, s8;
- s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
- s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
- s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+ s2 = (Guchar)((s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1));
+ s4 = (Guchar)((s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1));
+ s8 = (Guchar)((s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1));
return s ^ s8;
}
@@ -698,9 +698,9 @@ static inline Guchar mul09(Guchar s) {
static inline Guchar mul0b(Guchar s) {
Guchar s2, s4, s8;
- s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
- s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
- s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+ s2 = (Guchar)((s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1));
+ s4 = (Guchar)((s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1));
+ s8 = (Guchar)((s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1));
return s ^ s2 ^ s8;
}
@@ -708,9 +708,9 @@ static inline Guchar mul0b(Guchar s) {
static inline Guchar mul0d(Guchar s) {
Guchar s2, s4, s8;
- s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
- s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
- s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+ s2 = (Guchar)((s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1));
+ s4 = (Guchar)((s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1));
+ s8 = (Guchar)((s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1));
return s ^ s4 ^ s8;
}
@@ -718,9 +718,9 @@ static inline Guchar mul0d(Guchar s) {
static inline Guchar mul0e(Guchar s) {
Guchar s2, s4, s8;
- s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
- s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
- s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+ s2 = (Guchar)((s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1));
+ s4 = (Guchar)((s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1));
+ s8 = (Guchar)((s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1));
return s2 ^ s4 ^ s8;
}
@@ -761,10 +761,10 @@ static inline void invMixColumnsW(Guint *w) {
Guchar s0, s1, s2, s3;
for (c = 0; c < 4; ++c) {
- s0 = w[c] >> 24;
- s1 = w[c] >> 16;
- s2 = w[c] >> 8;
- s3 = w[c];
+ s0 = (Guchar)(w[c] >> 24);
+ s1 = (Guchar)(w[c] >> 16);
+ s2 = (Guchar)(w[c] >> 8);
+ s3 = (Guchar)w[c];
w[c] = ((mul0e(s0) ^ mul0b(s1) ^ mul0d(s2) ^ mul09(s3)) << 24)
| ((mul09(s0) ^ mul0e(s1) ^ mul0b(s2) ^ mul0d(s3)) << 16)
| ((mul0d(s0) ^ mul09(s1) ^ mul0e(s2) ^ mul0b(s3)) << 8)
@@ -776,10 +776,10 @@ static inline void addRoundKey(Guchar *state, Guint *w) {
int c;
for (c = 0; c < 4; ++c) {
- state[c] ^= w[c] >> 24;
- state[4+c] ^= w[c] >> 16;
- state[8+c] ^= w[c] >> 8;
- state[12+c] ^= w[c];
+ state[c] ^= (Guchar)(w[c] >> 24);
+ state[4+c] ^= (Guchar)(w[c] >> 16);
+ state[8+c] ^= (Guchar)(w[c] >> 8);
+ state[12+c] ^= (Guchar)w[c];
}
}
@@ -993,22 +993,22 @@ static inline Gulong rotateLeft(Gulong x, int r) {
}
static inline Gulong md5Round1(Gulong a, Gulong b, Gulong c, Gulong d,
- Gulong Xk, Gulong s, Gulong Ti) {
+ Gulong Xk, int s, Gulong Ti) {
return b + rotateLeft((a + ((b & c) | (~b & d)) + Xk + Ti), s);
}
static inline Gulong md5Round2(Gulong a, Gulong b, Gulong c, Gulong d,
- Gulong Xk, Gulong s, Gulong Ti) {
+ Gulong Xk, int s, Gulong Ti) {
return b + rotateLeft((a + ((b & d) | (c & ~d)) + Xk + Ti), s);
}
static inline Gulong md5Round3(Gulong a, Gulong b, Gulong c, Gulong d,
- Gulong Xk, Gulong s, Gulong Ti) {
+ Gulong Xk, int s, Gulong Ti) {
return b + rotateLeft((a + (b ^ c ^ d) + Xk + Ti), s);
}
static inline Gulong md5Round4(Gulong a, Gulong b, Gulong c, Gulong d,
- Gulong Xk, Gulong s, Gulong Ti) {
+ Gulong Xk, int s, Gulong Ti) {
return b + rotateLeft((a + (c ^ (b | ~d)) + Xk + Ti), s);
}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Dict.h b/Build/source/libs/xpdf/xpdf-src/xpdf/Dict.h
index 514c3ae8d6e..b05f729e0a8 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Dict.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Dict.h
@@ -37,11 +37,11 @@ public:
// Reference counting.
#if MULTITHREADED
- int incRef() { return gAtomicIncrement(&ref); }
- int decRef() { return gAtomicDecrement(&ref); }
+ long incRef() { return gAtomicIncrement(&ref); }
+ long decRef() { return gAtomicDecrement(&ref); }
#else
- int incRef() { return ++ref; }
- int decRef() { return --ref; }
+ long incRef() { return ++ref; }
+ long decRef() { return --ref; }
#endif
// Get number of entries.
@@ -78,7 +78,7 @@ private:
#if MULTITHREADED
GAtomicCounter ref; // reference count
#else
- int ref; // reference count
+ long ref; // reference count
#endif
DictEntry *find(const char *key);
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Function.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Function.cc
index c50e9b8e551..72cadd9bed1 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Function.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Function.cc
@@ -1169,7 +1169,7 @@ GString *PostScriptFunction::getToken(Stream *str) {
delete s;
return NULL;
}
- codeString->append(c);
+ codeString->append((char)c);
if (comment) {
if (c == '\x0a' || c == '\x0d') {
comment = gFalse;
@@ -1190,7 +1190,7 @@ GString *PostScriptFunction::getToken(Stream *str) {
break;
}
str->getChar();
- codeString->append(c);
+ codeString->append((char)c);
}
} else {
while (1) {
@@ -1200,7 +1200,7 @@ GString *PostScriptFunction::getToken(Stream *str) {
break;
}
str->getChar();
- codeString->append(c);
+ codeString->append((char)c);
}
}
return s;
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Gfx.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Gfx.cc
index 1f77bf48319..5d34eb9f9ab 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Gfx.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Gfx.cc
@@ -947,7 +947,7 @@ void Gfx::opSetExtGState(Object args[], int numArgs) {
GfxColor backdropColor;
GBool haveBackdropColor;
GfxColorSpace *blendingColorSpace;
- GBool alpha, isolated, knockout;
+ GBool alpha, knockout;
double opac;
int i;
@@ -1041,22 +1041,37 @@ void Gfx::opSetExtGState(Object args[], int numArgs) {
// fill/stroke overprint, overprint mode
if ((haveFillOP = (obj1.dictLookup("op", &obj2)->isBool()))) {
- state->setFillOverprint(obj2.getBool());
- out->updateFillOverprint(state);
+ if (!state->getInCachedT3Char()) {
+ state->setFillOverprint(obj2.getBool());
+ out->updateFillOverprint(state);
+ } else {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring overprint setting in cached Type 3 character");
+ }
}
obj2.free();
if (obj1.dictLookup("OP", &obj2)->isBool()) {
- state->setStrokeOverprint(obj2.getBool());
- out->updateStrokeOverprint(state);
- if (!haveFillOP) {
- state->setFillOverprint(obj2.getBool());
- out->updateFillOverprint(state);
+ if (!state->getInCachedT3Char()) {
+ state->setStrokeOverprint(obj2.getBool());
+ out->updateStrokeOverprint(state);
+ if (!haveFillOP) {
+ state->setFillOverprint(obj2.getBool());
+ out->updateFillOverprint(state);
+ }
+ } else {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring overprint setting in cached Type 3 character");
}
}
obj2.free();
if (obj1.dictLookup("OPM", &obj2)->isInt()) {
- state->setOverprintMode(obj2.getInt());
- out->updateOverprintMode(state);
+ if (!state->getInCachedT3Char()) {
+ state->setOverprintMode(obj2.getInt());
+ out->updateOverprintMode(state);
+ } else {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring overprint setting in cached Type 3 character");
+ }
}
obj2.free();
@@ -1072,32 +1087,40 @@ void Gfx::opSetExtGState(Object args[], int numArgs) {
obj2.free();
obj1.dictLookup("TR", &obj2);
}
- if (obj2.isName("Default") ||
- obj2.isName("Identity")) {
- funcs[0] = funcs[1] = funcs[2] = funcs[3] = NULL;
- state->setTransfer(funcs);
- out->updateTransfer(state);
- } else if (obj2.isArray() && obj2.arrayGetLength() == 4) {
- for (i = 0; i < 4; ++i) {
- obj2.arrayGet(i, &obj3);
- funcs[i] = Function::parse(&obj3);
- obj3.free();
- if (!funcs[i]) {
- break;
+ if (!obj2.isNull()) {
+ if (!state->getInCachedT3Char()) {
+ if (obj2.isName("Default") ||
+ obj2.isName("Identity")) {
+ funcs[0] = funcs[1] = funcs[2] = funcs[3] = NULL;
+ state->setTransfer(funcs);
+ out->updateTransfer(state);
+ } else if (obj2.isArray() && obj2.arrayGetLength() == 4) {
+ for (i = 0; i < 4; ++i) {
+ obj2.arrayGet(i, &obj3);
+ funcs[i] = Function::parse(&obj3);
+ obj3.free();
+ if (!funcs[i]) {
+ break;
+ }
+ }
+ if (i == 4) {
+ state->setTransfer(funcs);
+ out->updateTransfer(state);
+ }
+ } else if (obj2.isName() || obj2.isDict() || obj2.isStream()) {
+ if ((funcs[0] = Function::parse(&obj2))) {
+ funcs[1] = funcs[2] = funcs[3] = NULL;
+ state->setTransfer(funcs);
+ out->updateTransfer(state);
+ }
+ } else {
+ error(errSyntaxError, getPos(),
+ "Invalid transfer function in ExtGState");
}
+ } else {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring transfer function setting in cached Type 3 character");
}
- if (i == 4) {
- state->setTransfer(funcs);
- out->updateTransfer(state);
- }
- } else if (obj2.isName() || obj2.isDict() || obj2.isStream()) {
- if ((funcs[0] = Function::parse(&obj2))) {
- funcs[1] = funcs[2] = funcs[3] = NULL;
- state->setTransfer(funcs);
- out->updateTransfer(state);
- }
- } else if (!obj2.isNull()) {
- error(errSyntaxError, getPos(), "Invalid transfer function in ExtGState");
}
obj2.free();
@@ -1145,16 +1168,12 @@ void Gfx::opSetExtGState(Object args[], int numArgs) {
if (obj2.dictLookup("G", &obj3)->isStream()) {
if (obj3.streamGetDict()->lookup("Group", &obj4)->isDict()) {
blendingColorSpace = NULL;
- isolated = knockout = gFalse;
+ knockout = gFalse;
if (!obj4.dictLookup("CS", &obj5)->isNull()) {
blendingColorSpace = GfxColorSpace::parse(&obj5
);
}
obj5.free();
- if (obj4.dictLookup("I", &obj5)->isBool()) {
- isolated = obj5.getBool();
- }
- obj5.free();
if (obj4.dictLookup("K", &obj5)->isBool()) {
knockout = obj5.getBool();
}
@@ -1170,8 +1189,11 @@ void Gfx::opSetExtGState(Object args[], int numArgs) {
}
}
obj2.dictLookupNF("G", &objRef3);
+ // it doesn't make sense for softmasks to be non-isolated,
+ // because they're blended with a backdrop color, rather
+ // than the original backdrop
doSoftMask(&obj3, &objRef3, alpha, blendingColorSpace,
- isolated, knockout, funcs[0], &backdropColor);
+ gTrue, knockout, funcs[0], &backdropColor);
objRef3.free();
if (funcs[0]) {
delete funcs[0];
@@ -1268,6 +1290,11 @@ void Gfx::doSoftMask(Object *str, Object *strRef, GBool alpha,
void Gfx::opSetRenderingIntent(Object args[], int numArgs) {
GfxRenderingIntent ri;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring rendering intent setting in cached Type 3 character");
+ return;
+ }
ri = parseRenderingIntent(args[0].getName());
state->setRenderingIntent(ri);
out->updateRenderingIntent(state);
@@ -1293,6 +1320,11 @@ GfxRenderingIntent Gfx::parseRenderingIntent(const char *name) {
void Gfx::opSetFillGray(Object args[], int numArgs) {
GfxColor color;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color setting in cached Type 3 character");
+ return;
+ }
state->setFillPattern(NULL);
state->setFillColorSpace(GfxColorSpace::create(csDeviceGray));
out->updateFillColorSpace(state);
@@ -1304,6 +1336,11 @@ void Gfx::opSetFillGray(Object args[], int numArgs) {
void Gfx::opSetStrokeGray(Object args[], int numArgs) {
GfxColor color;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color setting in cached Type 3 character");
+ return;
+ }
state->setStrokePattern(NULL);
state->setStrokeColorSpace(GfxColorSpace::create(csDeviceGray));
out->updateStrokeColorSpace(state);
@@ -1316,6 +1353,11 @@ void Gfx::opSetFillCMYKColor(Object args[], int numArgs) {
GfxColor color;
int i;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color setting in cached Type 3 character");
+ return;
+ }
state->setFillPattern(NULL);
state->setFillColorSpace(GfxColorSpace::create(csDeviceCMYK));
out->updateFillColorSpace(state);
@@ -1330,6 +1372,11 @@ void Gfx::opSetStrokeCMYKColor(Object args[], int numArgs) {
GfxColor color;
int i;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color setting in cached Type 3 character");
+ return;
+ }
state->setStrokePattern(NULL);
state->setStrokeColorSpace(GfxColorSpace::create(csDeviceCMYK));
out->updateStrokeColorSpace(state);
@@ -1344,6 +1391,11 @@ void Gfx::opSetFillRGBColor(Object args[], int numArgs) {
GfxColor color;
int i;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color setting in cached Type 3 character");
+ return;
+ }
state->setFillPattern(NULL);
state->setFillColorSpace(GfxColorSpace::create(csDeviceRGB));
out->updateFillColorSpace(state);
@@ -1358,6 +1410,11 @@ void Gfx::opSetStrokeRGBColor(Object args[], int numArgs) {
GfxColor color;
int i;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color setting in cached Type 3 character");
+ return;
+ }
state->setStrokePattern(NULL);
state->setStrokeColorSpace(GfxColorSpace::create(csDeviceRGB));
out->updateStrokeColorSpace(state);
@@ -1373,6 +1430,11 @@ void Gfx::opSetFillColorSpace(Object args[], int numArgs) {
GfxColorSpace *colorSpace;
GfxColor color;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color space setting in cached Type 3 character");
+ return;
+ }
state->setFillPattern(NULL);
res->lookupColorSpace(args[0].getName(), &obj);
if (obj.isNull()) {
@@ -1399,6 +1461,11 @@ void Gfx::opSetStrokeColorSpace(Object args[], int numArgs) {
GfxColorSpace *colorSpace;
GfxColor color;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color space setting in cached Type 3 character");
+ return;
+ }
state->setStrokePattern(NULL);
res->lookupColorSpace(args[0].getName(), &obj);
if (obj.isNull()) {
@@ -1424,6 +1491,11 @@ void Gfx::opSetFillColor(Object args[], int numArgs) {
GfxColor color;
int i;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color setting in cached Type 3 character");
+ return;
+ }
if (numArgs != state->getFillColorSpace()->getNComps()) {
error(errSyntaxError, getPos(),
"Incorrect number of arguments in 'sc' command");
@@ -1459,7 +1531,17 @@ void Gfx::opSetFillColorN(Object args[], int numArgs) {
GfxPattern *pattern;
int i;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color setting in cached Type 3 character");
+ return;
+ }
if (state->getFillColorSpace()->getMode() == csPattern) {
+ if (numArgs == 0 || !args[numArgs-1].isName()) {
+ error(errSyntaxError, getPos(),
+ "Invalid arguments in 'scn' command");
+ return;
+ }
if (numArgs > 1) {
if (!((GfxPatternColorSpace *)state->getFillColorSpace())->getUnder() ||
numArgs - 1 != ((GfxPatternColorSpace *)state->getFillColorSpace())
@@ -1476,8 +1558,7 @@ void Gfx::opSetFillColorN(Object args[], int numArgs) {
state->setFillColor(&color);
out->updateFillColor(state);
}
- if (args[numArgs-1].isName() &&
- (pattern = res->lookupPattern(args[numArgs-1].getName()
+ if ((pattern = res->lookupPattern(args[numArgs-1].getName()
))) {
state->setFillPattern(pattern);
}
@@ -1504,7 +1585,17 @@ void Gfx::opSetStrokeColorN(Object args[], int numArgs) {
GfxPattern *pattern;
int i;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring color setting in cached Type 3 character");
+ return;
+ }
if (state->getStrokeColorSpace()->getMode() == csPattern) {
+ if (numArgs == 0 || !args[numArgs-1].isName()) {
+ error(errSyntaxError, getPos(),
+ "Invalid arguments in 'SCN' command");
+ return;
+ }
if (numArgs > 1) {
if (!((GfxPatternColorSpace *)state->getStrokeColorSpace())
->getUnder() ||
@@ -1522,8 +1613,7 @@ void Gfx::opSetStrokeColorN(Object args[], int numArgs) {
state->setStrokeColor(&color);
out->updateStrokeColor(state);
}
- if (args[numArgs-1].isName() &&
- (pattern = res->lookupPattern(args[numArgs-1].getName()
+ if ((pattern = res->lookupPattern(args[numArgs-1].getName()
))) {
state->setStrokePattern(pattern);
}
@@ -2248,6 +2338,12 @@ void Gfx::opShFill(Object args[], int numArgs) {
GfxState *savedState;
double xMin, yMin, xMax, yMax;
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring shaded fill in cached Type 3 character");
+ return;
+ }
+
if (!out->needNonText()) {
return;
}
@@ -3715,6 +3811,12 @@ void Gfx::doShowText(GString *s) {
font = state->getFont();
wMode = font->getWMode();
+ if (globalParams->isDroppedFont(font->getName()
+ ? font->getName()->getCString() : "")) {
+ doIncCharCount(s);
+ return;
+ }
+
if (out->useDrawChar()) {
out->beginString(state, s);
}
@@ -4294,7 +4396,7 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
delete colorMap;
maskObj.free();
smaskObj.free();
- goto err1;
+ goto err2;
}
maskColorSpace = new GfxDeviceGrayColorSpace();
obj1.free();
@@ -4432,14 +4534,18 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) {
}
// if drawing is disabled, skip over inline image data
- if (!ocState) {
- str->reset();
- n = height * ((width * colorMap->getNumPixelComps() *
- colorMap->getBits() + 7) / 8);
- for (i = 0; i < n; ++i) {
- str->getChar();
+ if (state->getInCachedT3Char() || !ocState) {
+ if (state->getInCachedT3Char()) {
+ error(errSyntaxWarning, getPos(),
+ "Ignoring image in cached Type 3 character");
+ }
+ if (inlineImg) {
+ str->reset();
+ n = height * ((width * colorMap->getNumPixelComps() *
+ colorMap->getBits() + 7) / 8);
+ str->discardChars(n);
+ str->close();
}
- str->close();
// draw it
} else {
@@ -4829,6 +4935,7 @@ void Gfx::opSetCharWidth(Object args[], int numArgs) {
}
void Gfx::opSetCacheDevice(Object args[], int numArgs) {
+ state->setInCachedT3Char(gTrue);
out->type3D1(state, args[0].getNum(), args[1].getNum(),
args[2].getNum(), args[3].getNum(),
args[4].getNum(), args[5].getNum());
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/GfxFont.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/GfxFont.cc
index 201f609adbf..640cf81db02 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/GfxFont.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/GfxFont.cc
@@ -421,8 +421,6 @@ void GfxFont::readFontDescriptor(XRef *xref, Dict *fontDict) {
// assume Times-Roman by default (for substitution purposes)
flags = fontSerif;
- missingWidth = 0;
-
if (fontDict->lookup("FontDescriptor", &obj1)->isDict()) {
// get flags
@@ -933,6 +931,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
// default ascent/descent values
if (builtinFont) {
+ missingWidth = builtinFont->missingWidth;
ascent = 0.001 * builtinFont->ascent;
descent = 0.001 * builtinFont->descent;
fontBBox[0] = 0.001 * builtinFont->bbox[0];
@@ -940,6 +939,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
fontBBox[2] = 0.001 * builtinFont->bbox[2];
fontBBox[3] = 0.001 * builtinFont->bbox[3];
} else {
+ missingWidth = 0;
ascent = 0.75;
descent = -0.25;
fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0;
@@ -1094,7 +1094,7 @@ Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
// copy the base encoding
for (i = 0; i < 256; ++i) {
enc[i] = (char *)baseEnc[i];
- if ((encFree[i] = baseEncFromFontFile) && enc[i]) {
+ if ((encFree[i] = (char)baseEncFromFontFile) && enc[i]) {
enc[i] = copyString(baseEnc[i]);
}
}
@@ -1394,7 +1394,7 @@ int *Gfx8BitFont::getCodeToGIDMap(FoFiTrueType *ff) {
int *map;
int cmapPlatform, cmapEncoding;
int unicodeCmap, macRomanCmap, msSymbolCmap, cmap;
- GBool useMacRoman, useUnicode;
+ GBool nonsymbolic, useMacRoman, useUnicode;
char *charName;
Unicode u;
int code, i, n;
@@ -1404,32 +1404,9 @@ int *Gfx8BitFont::getCodeToGIDMap(FoFiTrueType *ff) {
map[i] = 0;
}
- // To match up with the Adobe-defined behaviour, we choose a cmap
- // like this:
- // 1. If the PDF font has an encoding:
- // 1a. If the PDF font specified MacRomanEncoding and the
- // TrueType font has a Macintosh Roman cmap, use it, and
- // reverse map the char names through MacRomanEncoding to
- // get char codes.
- // 1b. If the PDF font is not symbolic or the PDF font is not
- // embedded, and the TrueType font has a Microsoft Unicode
- // cmap or a non-Microsoft Unicode cmap, use it, and use the
- // Unicode indexes, not the char codes.
- // 1c. If the PDF font is symbolic and the TrueType font has a
- // Microsoft Symbol cmap, use it, and use char codes
- // directly (possibly with an offset of 0xf000).
- // 1d. If the TrueType font has a Macintosh Roman cmap, use it,
- // as in case 1a.
- // 2. If the PDF font does not have an encoding or the PDF font is
- // symbolic:
- // 2a. If the TrueType font has a Macintosh Roman cmap, use it,
- // and use char codes directly (possibly with an offset of
- // 0xf000).
- // 2b. If the TrueType font has a Microsoft Symbol cmap, use it,
- // and use char codes directly (possible with an offset of
- // 0xf000).
- // 3. If none of these rules apply, use the first cmap and hope for
- // the best (this shouldn't happen).
+ // This is based on the cmap/encoding selection algorithm in the PDF
+ // 2.0 spec, but with some differences to match up with Adobe's
+ // behavior.
unicodeCmap = macRomanCmap = msSymbolCmap = -1;
for (i = 0; i < ff->getNumCmaps(); ++i) {
cmapPlatform = ff->getCmapPlatform(i);
@@ -1443,31 +1420,29 @@ int *Gfx8BitFont::getCodeToGIDMap(FoFiTrueType *ff) {
msSymbolCmap = i;
}
}
- cmap = 0;
useMacRoman = gFalse;
useUnicode = gFalse;
- if (hasEncoding) {
- if (usesMacRomanEnc && macRomanCmap >= 0) {
- cmap = macRomanCmap;
- useMacRoman = gTrue;
- } else if ((!(flags & fontSymbolic) || embFontID.num < 0) &&
- unicodeCmap >= 0) {
- cmap = unicodeCmap;
- useUnicode = gTrue;
- } else if ((flags & fontSymbolic) && msSymbolCmap >= 0) {
- cmap = msSymbolCmap;
- } else if ((flags & fontSymbolic) && macRomanCmap >= 0) {
- cmap = macRomanCmap;
- } else if (macRomanCmap >= 0) {
- cmap = macRomanCmap;
- useMacRoman = gTrue;
- }
+ nonsymbolic = !(flags & fontSymbolic);
+ if (usesMacRomanEnc && macRomanCmap >= 0) {
+ cmap = macRomanCmap;
+ useMacRoman = gTrue;
+ } else if (embFontID.num < 0 && hasEncoding && unicodeCmap >= 0) {
+ cmap = unicodeCmap;
+ useUnicode = gTrue;
+ } else if (nonsymbolic && unicodeCmap >= 0) {
+ cmap = unicodeCmap;
+ useUnicode = gTrue;
+ } else if (nonsymbolic && macRomanCmap >= 0) {
+ cmap = macRomanCmap;
+ useMacRoman = gTrue;
+ } else if (msSymbolCmap >= 0) {
+ cmap = msSymbolCmap;
+ } else if (unicodeCmap >= 0) {
+ cmap = unicodeCmap;
+ } else if (macRomanCmap >= 0) {
+ cmap = macRomanCmap;
} else {
- if (msSymbolCmap >= 0) {
- cmap = msSymbolCmap;
- } else if (macRomanCmap >= 0) {
- cmap = macRomanCmap;
- }
+ cmap = 0;
}
// reverse map the char names through MacRomanEncoding, then map the
@@ -1613,6 +1588,7 @@ GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
int c1, c2;
int excepsSize, i, j, k, n;
+ missingWidth = 0;
ascent = 0.95;
descent = -0.35;
fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0;
@@ -1723,6 +1699,12 @@ GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
if (!(cMap = CMap::parse(NULL, collection, &obj1))) {
goto err2;
}
+
+ // check for fonts that use the Identity-H encoding (cmap), and the
+ // Adobe-Identity character collection
+ identityEnc = obj1.isName("Identity-H") &&
+ !collection->cmp("Adobe-Identity");
+
obj1.free();
// CIDToGIDMap
@@ -1745,6 +1727,7 @@ GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
cidToGID[cidToGIDLen++] = (c1 << 8) + c2;
}
obj1.streamClose();
+ identityEnc = gFalse;
} else if (obj1.isName("Identity")) {
hasIdentityCIDToGID = gTrue;
} else if (!obj1.isNull()) {
@@ -1868,7 +1851,7 @@ GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GString *nameA,
excepsSize, sizeof(GfxFontCIDWidthExcepV));
}
j = obj2.getInt();
- for (k = 0; k < obj3.arrayGetLength(); k += 3) {
+ for (k = 0; k + 2 < obj3.arrayGetLength(); k += 3) {
if (obj3.arrayGet(k, &obj4)->isNum() &&
obj3.arrayGet(k+1, &obj5)->isNum() &&
obj3.arrayGet(k+2, &obj6)->isNum()) {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/GfxFont.h b/Build/source/libs/xpdf/xpdf-src/xpdf/GfxFont.h
index fd90ce4f040..b2d8637a46d 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/GfxFont.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/GfxFont.h
@@ -336,6 +336,12 @@ public:
int *getCIDToGID() { return cidToGID; }
int getCIDToGIDLen() { return cidToGIDLen; }
+ // Returns true if this font uses the Identity-H encoding (cmap),
+ // and the Adobe-Identity character collection, and does not have a
+ // CIDToGIDMap. When this is true for a CID TrueType font, Adobe
+ // appears to treat char codes as raw GIDs.
+ GBool usesIdentityEncoding() { return identityEnc; }
+
virtual GBool problematicForUnicode();
private:
@@ -355,6 +361,7 @@ private:
int cidToGIDLen;
GBool hasKnownCollection;
GBool hasIdentityCIDToGID;
+ GBool identityEnc;
};
//------------------------------------------------------------------------
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/GfxState.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/GfxState.cc
index b1c650a586f..9a43608c2fe 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/GfxState.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/GfxState.cc
@@ -94,6 +94,7 @@ static const char *gfxColorSpaceModeNames[] = {
+
//------------------------------------------------------------------------
// GfxColorSpace
//------------------------------------------------------------------------
@@ -233,6 +234,7 @@ void GfxDeviceGrayColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxDeviceGrayColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
}
@@ -319,8 +321,8 @@ void GfxCalGrayColorSpace::getGray(GfxColor *color, GfxGray *gray,
*gray = clip01(color->c[0]);
}
- void GfxCalGrayColorSpace::getRGB(GfxColor *color, GfxRGB *rgb,
- GfxRenderingIntent ri) {
+void GfxCalGrayColorSpace::getRGB(GfxColor *color, GfxRGB *rgb,
+ GfxRenderingIntent ri) {
rgb->r = rgb->g = rgb->b = clip01(color->c[0]);
}
@@ -331,6 +333,7 @@ void GfxCalGrayColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxCalGrayColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
}
@@ -388,6 +391,7 @@ void GfxDeviceRGBColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxDeviceRGBColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
color->c[1] = 0;
@@ -534,6 +538,7 @@ void GfxCalRGBColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxCalRGBColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
color->c[1] = 0;
@@ -638,6 +643,7 @@ void GfxDeviceCMYKColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxDeviceCMYKColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
color->c[1] = 0;
@@ -834,6 +840,7 @@ void GfxLabColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxLabColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
if (aMin > 0) {
@@ -989,6 +996,7 @@ void GfxICCBasedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxICCBasedColorSpace::getDefaultColor(GfxColor *color) {
int i;
@@ -1097,6 +1105,9 @@ GfxColorSpace *GfxIndexedColorSpace::parse(Array *arr,
error(errSyntaxError, -1,
"Bad Indexed color space (lookup table stream too short)");
cs->indexHigh = indexHighA = i - 1;
+ if (cs->indexHigh < 0) {
+ goto err3;
+ }
}
cs->lookup[i*n + j] = (Guchar)x;
}
@@ -1107,6 +1118,9 @@ GfxColorSpace *GfxIndexedColorSpace::parse(Array *arr,
error(errSyntaxError, -1,
"Bad Indexed color space (lookup table string too short)");
cs->indexHigh = indexHighA = obj1.getString()->getLength() / n - 1;
+ if (cs->indexHigh < 0) {
+ goto err3;
+ }
}
s = obj1.getString()->getCString();
for (i = 0; i <= indexHighA; ++i) {
@@ -1173,6 +1187,7 @@ void GfxIndexedColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxIndexedColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = 0;
}
@@ -1238,7 +1253,7 @@ GfxColorSpace *GfxSeparationColorSpace::parse(Array *arr,
GString *nameA;
GfxColorSpace *altA;
Function *funcA;
- Object obj1;
+ Object obj1, obj2;
if (arr->getLength() != 4) {
error(errSyntaxError, -1, "Bad Separation color space");
@@ -1251,6 +1266,13 @@ GfxColorSpace *GfxSeparationColorSpace::parse(Array *arr,
nameA = new GString(obj1.getName());
obj1.free();
arr->get(2, &obj1);
+ // some PDF generators use an ICC profile stream here; Adobe
+ // apparently looks at the /Alternate entry in the stream dictionary
+ if (obj1.isStream() &&
+ !obj1.streamGetDict()->lookup("Alternate", &obj2)->isNull()) {
+ obj1.free();
+ obj1 = obj2;
+ }
if (!(altA = GfxColorSpace::parse(&obj1,
recursion + 1))) {
error(errSyntaxError, -1,
@@ -1323,6 +1345,7 @@ void GfxSeparationColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxSeparationColorSpace::getDefaultColor(GfxColor *color) {
color->c[0] = gfxColorComp1;
}
@@ -1438,6 +1461,13 @@ GfxColorSpace *GfxDeviceNColorSpace::parse(Array *arr,
}
obj1.free();
arr->get(2, &obj1);
+ // some PDF generators use an ICC profile stream here; Adobe
+ // apparently looks at the /Alternate entry in the stream dictionary
+ if (obj1.isStream() &&
+ !obj1.streamGetDict()->lookup("Alternate", &obj2)->isNull()) {
+ obj1.free();
+ obj1 = obj2;
+ }
if (!(altA = GfxColorSpace::parse(&obj1,
recursion + 1))) {
error(errSyntaxError, -1,
@@ -1521,6 +1551,7 @@ void GfxDeviceNColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxDeviceNColorSpace::getDefaultColor(GfxColor *color) {
int i;
@@ -1595,6 +1626,7 @@ void GfxPatternColorSpace::getCMYK(GfxColor *color, GfxCMYK *cmyk,
}
+
void GfxPatternColorSpace::getDefaultColor(GfxColor *color) {
// not used
}
@@ -3448,25 +3480,26 @@ void GfxPatchMeshShading::getColor(double *in, GfxColor *out) {
//------------------------------------------------------------------------
GfxImageColorMap::GfxImageColorMap(int bitsA, Object *decode,
- GfxColorSpace *colorSpaceA) {
+ GfxColorSpace *colorSpaceA,
+ int maxAllowedBits) {
GfxIndexedColorSpace *indexedCS;
GfxSeparationColorSpace *sepCS;
int maxPixel, indexHigh;
Guchar *indexedLookup;
Function *sepFunc;
Object obj;
- double x[gfxColorMaxComps];
- double y[gfxColorMaxComps];
+ double defaultLow[gfxColorMaxComps], defaultRange[gfxColorMaxComps];
+ double x[gfxColorMaxComps], y[gfxColorMaxComps];
int i, j, k;
ok = gTrue;
// bits per component and color space
bits = bitsA;
- if (bits <= 8) {
+ if (bits <= maxAllowedBits) {
maxPixel = (1 << bits) - 1;
} else {
- maxPixel = 0xff;
+ maxPixel = (1 << maxAllowedBits) - 1;
}
colorSpace = colorSpaceA;
@@ -3477,9 +3510,13 @@ GfxImageColorMap::GfxImageColorMap(int bitsA, Object *decode,
}
// get decode map
+ colorSpace->getDefaultRanges(defaultLow, defaultRange, maxPixel);
if (decode->isNull()) {
nComps = colorSpace->getNComps();
- colorSpace->getDefaultRanges(decodeLow, decodeRange, maxPixel);
+ for (i = 0; i < nComps; ++i) {
+ decodeLow[i] = defaultLow[i];
+ decodeRange[i] = defaultRange[i];
+ }
} else if (decode->isArray()) {
nComps = decode->arrayGetLength() / 2;
if (nComps < colorSpace->getNComps()) {
@@ -3514,8 +3551,13 @@ GfxImageColorMap::GfxImageColorMap(int bitsA, Object *decode,
lookup[k] = (GfxColorComp *)gmallocn(maxPixel + 1,
sizeof(GfxColorComp));
for (i = 0; i <= maxPixel; ++i) {
- lookup[k][i] = dblToCol(decodeLow[k] +
- (i * decodeRange[k]) / maxPixel);
+ double t = decodeLow[k] + (i * decodeRange[k]) / maxPixel;
+ if (t < defaultLow[k]) {
+ t = defaultLow[k];
+ } else if (t > defaultLow[k] + defaultRange[k]) {
+ t = defaultLow[k] + defaultRange[k];
+ }
+ lookup[k][i] = dblToCol(t);
}
}
@@ -3560,7 +3602,13 @@ GfxImageColorMap::GfxImageColorMap(int bitsA, Object *decode,
sizeof(GfxColorComp));
}
for (i = 0; i <= maxPixel; ++i) {
- x[0] = decodeLow[0] + (i * decodeRange[0]) / maxPixel;
+ double t = decodeLow[0] + (i * decodeRange[0]) / maxPixel;
+ if (t < defaultLow[0]) {
+ t = defaultLow[0];
+ } else if (t > defaultLow[0] + defaultRange[0]) {
+ t = defaultLow[0] + defaultRange[0];
+ }
+ x[0] = t;
sepFunc->transform(x, y);
for (k = 0; k < nComps2; ++k) {
lookup2[k][i] = dblToCol(y[k]);
@@ -3682,15 +3730,10 @@ void GfxImageColorMap::getCMYK(Guchar *x, GfxCMYK *cmyk,
void GfxImageColorMap::getColor(Guchar *x, GfxColor *color) {
- int maxPixel, i;
+ int i;
- if (bits <= 8) {
- maxPixel = (1 << bits) - 1;
- } else {
- maxPixel = 0xff;
- }
for (i = 0; i < nComps; ++i) {
- color->c[i] = dblToCol(decodeLow[i] + (x[i] * decodeRange[i]) / maxPixel);
+ color->c[i] = lookup[i][x[i]];
}
}
@@ -3779,6 +3822,7 @@ void GfxImageColorMap::getCMYKByteLine(Guchar *in, Guchar *out, int n,
}
}
+
//------------------------------------------------------------------------
// GfxSubpath and GfxPath
//------------------------------------------------------------------------
@@ -4078,6 +4122,8 @@ GfxState::GfxState(double hDPIA, double vDPIA, PDFRectangle *pageBox,
clipXMax = pageWidth;
clipYMax = pageHeight;
+ inCachedT3Char = gFalse;
+
saved = NULL;
}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/GfxState.h b/Build/source/libs/xpdf/xpdf-src/xpdf/GfxState.h
index 7cf92b69700..8e5d3b0b7a5 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/GfxState.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/GfxState.h
@@ -22,6 +22,8 @@
class Array;
class GfxFont;
class PDFRectangle;
+class GfxDeviceNColorSpace;
+class GfxSeparationColorSpace;
class GfxShading;
class GfxState;
@@ -80,17 +82,31 @@ static inline double colToDbl(GfxColorComp x) {
static inline GfxColorComp byteToCol(Guchar x) {
// (x / 255) << 16 = (0.0000000100000001... * x) << 16
- // = ((x << 8) + (x) + (x >> 8) + ...) << 16
+ // = ((x << 8) + (x) + (x >> 8) + ...)
// = (x << 8) + (x) + (x >> 7)
// [for rounding]
return (GfxColorComp)((x << 8) + x + (x >> 7));
}
+static inline GfxColorComp wordToCol(Gushort x) {
+ // (x / 65535) << 16 = (0.0000000000000001... * x) << 16
+ // = x + (x >> 15)
+ // [for rounding]
+ return (GfxColorComp)(x + (x >> 15));
+}
+
static inline Guchar colToByte(GfxColorComp x) {
- // 255 * x + 0.5 = 256 * x - x + 0x8000
+ // 255 * x + 0.5 = 256 * x - x + 0.5
+ // = [256 * (x << 16) - (x << 16) + (1 << 15)] >> 16
return (Guchar)(((x << 8) - x + 0x8000) >> 16);
}
+static inline Gushort colToWord(GfxColorComp x) {
+ // 65535 * x + 0.5 = 65536 * x - x + 0.5
+ // = [65536 * (x << 16) - (x << 16) + (1 << 15)] >> 16
+ return (Gushort)(((x << 16) - x + 0x8000) >> 16);
+}
+
//------------------------------------------------------------------------
// GfxColor
//------------------------------------------------------------------------
@@ -126,6 +142,7 @@ struct GfxCMYK {
+
//------------------------------------------------------------------------
// GfxColorSpace
//------------------------------------------------------------------------
@@ -918,7 +935,8 @@ class GfxImageColorMap {
public:
// Constructor.
- GfxImageColorMap(int bitsA, Object *decode, GfxColorSpace *colorSpaceA);
+ GfxImageColorMap(int bitsA, Object *decode, GfxColorSpace *colorSpaceA,
+ int maxAllowedBits = 8);
// Destructor.
~GfxImageColorMap();
@@ -1165,6 +1183,7 @@ public:
void getUserClipBBox(double *xMin, double *yMin, double *xMax, double *yMax);
double getLineX() { return lineX; }
double getLineY() { return lineY; }
+ GBool getInCachedT3Char() { return inCachedT3Char; }
// Is there a current point/path?
GBool isCurPt() { return path->isCurPt(); }
@@ -1260,6 +1279,9 @@ public:
{ lineX = tx; lineY = ty; textTransform(tx, ty, &curX, &curY); }
void textShift(double tx, double ty);
void shift(double dx, double dy);
+
+ // Cached Type 3 char status.
+ void setInCachedT3Char(GBool in) { inCachedT3Char = in; }
// Push/pop GfxState on/off stack.
GfxState *save();
@@ -1322,6 +1344,8 @@ private:
double clipXMin, clipYMin, // bounding box for clip region
clipXMax, clipYMax;
+ GBool inCachedT3Char; // in a cached (uncolored) Type 3 char
+
GfxState *saved; // next GfxState on stack
GfxState(GfxState *state, GBool copyPath);
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc
index 974102c73f5..2205a621322 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.cc
@@ -34,6 +34,7 @@
#include "Error.h"
#include "NameToCharCode.h"
#include "CharCodeToUnicode.h"
+#include "UnicodeRemapping.h"
#include "UnicodeMap.h"
#include "CMap.h"
#include "BuiltinFontTables.h"
@@ -144,6 +145,8 @@ struct Base14FontInfo {
GlobalParams *globalParams = NULL;
+const char *GlobalParams::defaultTextEncoding = "Latin1";
+
//------------------------------------------------------------------------
// PSFontParam16
//------------------------------------------------------------------------
@@ -376,7 +379,8 @@ void SysFontList::scanWindowsFonts(char *winFontDir) {
data[dataLen] = '\0';
n = (int)strlen(data);
if (!strcasecmp(data + n - 4, ".ttf") ||
- !strcasecmp(data + n - 4, ".ttc")) {
+ !strcasecmp(data + n - 4, ".ttc") ||
+ !strcasecmp(data + n - 4, ".otf")) {
fontPath = new GString(data);
if (!(dataLen >= 3 && data[1] == ':' && data[2] == '\\')) {
fontPath->insert(0, '\\');
@@ -552,6 +556,7 @@ GlobalParams::GlobalParams(const char *cfgFileName) {
unicodeMaps = new GHash(gTrue);
cMapDirs = new GHash(gTrue);
toUnicodeDirs = new GList();
+ unicodeRemapping = new UnicodeRemapping();
fontFiles = new GHash(gTrue);
fontDirs = new GList();
ccFontFiles = new GHash(gTrue);
@@ -585,7 +590,6 @@ GlobalParams::GlobalParams(const char *cfgFileName) {
psCenter = gTrue;
psDuplex = gFalse;
psLevel = psLevel2;
- psFile = NULL;
psResidentFonts = new GHash(gTrue);
psResidentFonts16 = new GList();
psResidentFontsCC = new GList();
@@ -605,7 +609,7 @@ GlobalParams::GlobalParams(const char *cfgFileName) {
psRasterSliceSize = 20000000;
psAlwaysRasterize = gFalse;
psNeverRasterize = gFalse;
- textEncoding = new GString("Latin1");
+ textEncoding = new GString(defaultTextEncoding);
#if defined(_WIN32)
textEOL = eolDOS;
#else
@@ -642,12 +646,15 @@ GlobalParams::GlobalParams(const char *cfgFileName) {
fullScreenMatteColor = new GString("#000000");
launchCommand = NULL;
movieCommand = NULL;
+ defaultPrinter = NULL;
mapNumericCharNames = gTrue;
mapUnknownCharNames = gFalse;
mapExtTrueTypeFontsViaUnicode = gTrue;
+ droppedFonts = new GHash(gTrue);
enableXFA = gTrue;
createDefaultKeyBindings();
popupMenuCmds = new GList();
+ tabStateFile = appendToPath(getHomeDir(), ".xpdf.tab-state");
printCommands = gFalse;
errQuiet = gFalse;
@@ -925,14 +932,14 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) {
parseCMapDir(tokens, fileName, line);
} else if (!cmd->cmp("toUnicodeDir")) {
parseToUnicodeDir(tokens, fileName, line);
+ } else if (!cmd->cmp("unicodeRemapping")) {
+ parseUnicodeRemapping(tokens, fileName, line);
} else if (!cmd->cmp("fontFile")) {
parseFontFile(tokens, fileName, line);
} else if (!cmd->cmp("fontDir")) {
parseFontDir(tokens, fileName, line);
} else if (!cmd->cmp("fontFileCC")) {
parseFontFileCC(tokens, fileName, line);
- } else if (!cmd->cmp("psFile")) {
- parsePSFile(tokens, fileName, line);
} else if (!cmd->cmp("psPaperSize")) {
parsePSPaperSize(tokens, fileName, line);
} else if (!cmd->cmp("psImageableArea")) {
@@ -1002,7 +1009,7 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) {
parseYesNo("psNeverRasterize", &psNeverRasterize,
tokens, fileName, line);
} else if (!cmd->cmp("textEncoding")) {
- parseTextEncoding(tokens, fileName, line);
+ parseString("textEncoding", &textEncoding, tokens, fileName, line);
} else if (!cmd->cmp("textEOL")) {
parseTextEOL(tokens, fileName, line);
} else if (!cmd->cmp("textPageBreaks")) {
@@ -1012,7 +1019,7 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) {
parseYesNo("textKeepTinyChars", &textKeepTinyChars,
tokens, fileName, line);
} else if (!cmd->cmp("initialZoom")) {
- parseInitialZoom(tokens, fileName, line);
+ parseString("initialZoom", &initialZoom, tokens, fileName, line);
} else if (!cmd->cmp("defaultFitZoom")) {
parseInteger("defaultFitZoom", &defaultFitZoom, tokens, fileName, line);
} else if (!cmd->cmp("initialSidebarState")) {
@@ -1073,16 +1080,18 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) {
parseYesNo("overprintPreview", &overprintPreview,
tokens, fileName, line);
} else if (!cmd->cmp("paperColor")) {
- parseColor("paperColor", &paperColor, tokens, fileName, line);
+ parseString("paperColor", &paperColor, tokens, fileName, line);
} else if (!cmd->cmp("matteColor")) {
- parseColor("matteColor", &matteColor, tokens, fileName, line);
+ parseString("matteColor", &matteColor, tokens, fileName, line);
} else if (!cmd->cmp("fullScreenMatteColor")) {
- parseColor("fullScreenMatteColor", &fullScreenMatteColor,
- tokens, fileName, line);
+ parseString("fullScreenMatteColor", &fullScreenMatteColor,
+ tokens, fileName, line);
} else if (!cmd->cmp("launchCommand")) {
- parseCommand("launchCommand", &launchCommand, tokens, fileName, line);
+ parseString("launchCommand", &launchCommand, tokens, fileName, line);
} else if (!cmd->cmp("movieCommand")) {
- parseCommand("movieCommand", &movieCommand, tokens, fileName, line);
+ parseString("movieCommand", &movieCommand, tokens, fileName, line);
+ } else if (!cmd->cmp("defaultPrinter")) {
+ parseString("defaultPrinter", &defaultPrinter, tokens, fileName, line);
} else if (!cmd->cmp("mapNumericCharNames")) {
parseYesNo("mapNumericCharNames", &mapNumericCharNames,
tokens, fileName, line);
@@ -1093,6 +1102,8 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) {
parseYesNo("mapExtTrueTypeFontsViaUnicode",
&mapExtTrueTypeFontsViaUnicode,
tokens, fileName, line);
+ } else if (!cmd->cmp("dropFont")) {
+ parseDropFont(tokens, fileName, line);
} else if (!cmd->cmp("enableXFA")) {
parseYesNo("enableXFA", &enableXFA, tokens, fileName, line);
} else if (!cmd->cmp("bind")) {
@@ -1101,6 +1112,8 @@ void GlobalParams::parseLine(char *buf, GString *fileName, int line) {
parseUnbind(tokens, fileName, line);
} else if (!cmd->cmp("popupMenuCmd")) {
parsePopupMenuCmd(tokens, fileName, line);
+ } else if (!cmd->cmp("tabStateFile")) {
+ parseString("tabStateFile", &tabStateFile, tokens, fileName, line);
} else if (!cmd->cmp("printCommands")) {
parseYesNo("printCommands", &printCommands, tokens, fileName, line);
} else if (!cmd->cmp("errQuiet")) {
@@ -1245,6 +1258,17 @@ void GlobalParams::parseToUnicodeDir(GList *tokens, GString *fileName,
toUnicodeDirs->append(((GString *)tokens->get(1))->copy());
}
+void GlobalParams::parseUnicodeRemapping(GList *tokens, GString *fileName,
+ int line) {
+ if (tokens->getLength() != 2) {
+ error(errConfig, -1,
+ "Bad 'unicodeRemapping' config file command ({0:t}:{1:d})",
+ fileName, line);
+ return;
+ }
+ unicodeRemapping->parseFile((GString *)tokens->get(1));
+}
+
void GlobalParams::parseFontFile(GList *tokens, GString *fileName, int line) {
if (tokens->getLength() != 3) {
error(errConfig, -1, "Bad 'fontFile' config file command ({0:t}:{1:d})",
@@ -1275,18 +1299,6 @@ void GlobalParams::parseFontFileCC(GList *tokens, GString *fileName,
((GString *)tokens->get(2))->copy());
}
-void GlobalParams::parsePSFile(GList *tokens, GString *fileName, int line) {
- if (tokens->getLength() != 2) {
- error(errConfig, -1, "Bad 'psFile' config file command ({0:t}:{1:d})",
- fileName, line);
- return;
- }
- if (psFile) {
- delete psFile;
- }
- psFile = ((GString *)tokens->get(1))->copy();
-}
-
void GlobalParams::parsePSPaperSize(GList *tokens, GString *fileName,
int line) {
GString *tok;
@@ -1424,18 +1436,6 @@ void GlobalParams::parsePSResidentFontCC(GList *tokens, GString *fileName,
psResidentFontsCC->append(param);
}
-void GlobalParams::parseTextEncoding(GList *tokens, GString *fileName,
- int line) {
- if (tokens->getLength() != 2) {
- error(errConfig, -1,
- "Bad 'textEncoding' config file command ({0:s}:{1:d})",
- fileName, line);
- return;
- }
- delete textEncoding;
- textEncoding = ((GString *)tokens->get(1))->copy();
-}
-
void GlobalParams::parseTextEOL(GList *tokens, GString *fileName, int line) {
GString *tok;
@@ -1457,17 +1457,6 @@ void GlobalParams::parseTextEOL(GList *tokens, GString *fileName, int line) {
}
}
-void GlobalParams::parseInitialZoom(GList *tokens,
- GString *fileName, int line) {
- if (tokens->getLength() != 2) {
- error(errConfig, -1, "Bad 'initialZoom' config file command ({0:t}:{1:d})",
- fileName, line);
- return;
- }
- delete initialZoom;
- initialZoom = ((GString *)tokens->get(1))->copy();
-}
-
void GlobalParams::parseStrokeAdjust(GList *tokens, GString *fileName,
int line) {
GString *tok;
@@ -1514,6 +1503,14 @@ void GlobalParams::parseScreenType(GList *tokens, GString *fileName,
}
}
+void GlobalParams::parseDropFont(GList *tokens, GString *fileName, int line) {
+ if (tokens->getLength() != 2) {
+ error(errConfig, -1, "Bad 'dropFont' config file command ({0:t}:{1:d})",
+ fileName, line);
+ return;
+ }
+ droppedFonts->add(((GString *)tokens->get(1))->copy(), 1);
+}
void GlobalParams::parseBind(GList *tokens, GString *fileName, int line) {
KeyBinding *binding;
@@ -1735,19 +1732,6 @@ void GlobalParams::parsePopupMenuCmd(GList *tokens,
cmds));
}
-void GlobalParams::parseCommand(const char *cmdName, GString **val,
- GList *tokens, GString *fileName, int line) {
- if (tokens->getLength() != 2) {
- error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
- cmdName, fileName, line);
- return;
- }
- if (*val) {
- delete *val;
- }
- *val = ((GString *)tokens->get(1))->copy();
-}
-
void GlobalParams::parseYesNo(const char *cmdName, GBool *flag,
GList *tokens, GString *fileName, int line) {
GString *tok;
@@ -1775,17 +1759,17 @@ GBool GlobalParams::parseYesNo2(char *token, GBool *flag) {
return gTrue;
}
-void GlobalParams::parseColor(const char *cmdName, GString **val,
- GList *tokens, GString *fileName, int line) {
+void GlobalParams::parseString(const char *cmdName, GString **s,
+ GList *tokens, GString *fileName, int line) {
if (tokens->getLength() != 2) {
error(errConfig, -1, "Bad '{0:s}' config file command ({1:t}:{2:d})",
cmdName, fileName, line);
return;
}
- if (*val) {
- delete *val;
+ if (*s) {
+ delete *s;
}
- *val = ((GString *)tokens->get(1))->copy();
+ *s = ((GString *)tokens->get(1))->copy();
}
void GlobalParams::parseInteger(const char *cmdName, int *val,
@@ -1867,14 +1851,12 @@ GlobalParams::~GlobalParams() {
deleteGHash(residentUnicodeMaps, UnicodeMap);
deleteGHash(unicodeMaps, GString);
deleteGList(toUnicodeDirs, GString);
+ delete unicodeRemapping;
deleteGHash(fontFiles, GString);
deleteGList(fontDirs, GString);
deleteGHash(ccFontFiles, GString);
deleteGHash(base14SysFonts, Base14FontInfo);
delete sysFonts;
- if (psFile) {
- delete psFile;
- }
deleteGHash(psResidentFonts, GString);
deleteGList(psResidentFonts16, PSFontParam16);
deleteGList(psResidentFontsCC, PSFontParam16);
@@ -1895,8 +1877,13 @@ GlobalParams::~GlobalParams() {
if (movieCommand) {
delete movieCommand;
}
+ if (defaultPrinter) {
+ delete defaultPrinter;
+ }
+ delete droppedFonts;
deleteGList(keyBindings, KeyBinding);
deleteGList(popupMenuCmds, PopupMenuCmd);
+ delete tabStateFile;
cMapDirs->startIter(&iter);
while (cMapDirs->getNext(&iter, &key, (void **)&list)) {
@@ -2224,8 +2211,12 @@ FILE *GlobalParams::findToUnicodeFile(GString *name) {
return NULL;
}
+UnicodeRemapping *GlobalParams::getUnicodeRemapping() {
+ return unicodeRemapping;
+}
+
GString *GlobalParams::findFontFile(GString *fontName) {
- static const char *exts[] = { ".pfa", ".pfb", ".ttf", ".ttc" };
+ static const char *exts[] = { ".pfa", ".pfb", ".ttf", ".ttc", ".otf" };
GString *path, *dir;
#ifdef _WIN32
GString *fontNameU;
@@ -2311,15 +2302,6 @@ GString *GlobalParams::findCCFontFile(GString *collection) {
return path;
}
-GString *GlobalParams::getPSFile() {
- GString *s;
-
- lockGlobalParams;
- s = psFile ? psFile->copy() : (GString *)NULL;
- unlockGlobalParams;
- return s;
-}
-
int GlobalParams::getPSPaperWidth() {
int w;
@@ -2890,6 +2872,15 @@ GString *GlobalParams::getFullScreenMatteColor() {
return s;
}
+GString *GlobalParams::getDefaultPrinter() {
+ GString *s;
+
+ lockGlobalParams;
+ s = defaultPrinter ? defaultPrinter->copy() : (GString *)NULL;
+ unlockGlobalParams;
+ return s;
+}
+
GBool GlobalParams::getMapNumericCharNames() {
GBool map;
@@ -2917,6 +2908,15 @@ GBool GlobalParams::getMapExtTrueTypeFontsViaUnicode() {
return map;
}
+GBool GlobalParams::isDroppedFont(const char *fontName) {
+ GBool isDropped;
+
+ lockGlobalParams;
+ isDropped = droppedFonts->lookupInt(fontName) != 0;
+ unlockGlobalParams;
+ return isDropped;
+}
+
GBool GlobalParams::getEnableXFA() {
GBool enable;
@@ -2974,6 +2974,15 @@ PopupMenuCmd *GlobalParams::getPopupMenuCmd(int idx) {
return cmd;
}
+GString *GlobalParams::getTabStateFile() {
+ GString *s;
+
+ lockGlobalParams;
+ s = tabStateFile->copy();
+ unlockGlobalParams;
+ return s;
+}
+
GBool GlobalParams::getPrintCommands() {
GBool p;
@@ -3064,18 +3073,13 @@ UnicodeMap *GlobalParams::getTextEncoding() {
// functions to set parameters
//------------------------------------------------------------------------
-void GlobalParams::addFontFile(GString *fontName, GString *path) {
- lockGlobalParams;
- fontFiles->add(fontName, path);
- unlockGlobalParams;
+void GlobalParams::addUnicodeRemapping(Unicode in, Unicode *out, int len) {
+ unicodeRemapping->addRemapping(in, out, len);
}
-void GlobalParams::setPSFile(char *file) {
+void GlobalParams::addFontFile(GString *fontName, GString *path) {
lockGlobalParams;
- if (psFile) {
- delete psFile;
- }
- psFile = new GString(file);
+ fontFiles->add(fontName, path);
unlockGlobalParams;
}
@@ -3365,6 +3369,13 @@ void GlobalParams::setEnableXFA(GBool enable) {
unlockGlobalParams;
}
+void GlobalParams::setTabStateFile(char *tabStateFileA) {
+ lockGlobalParams;
+ delete tabStateFile;
+ tabStateFile = new GString(tabStateFileA);
+ unlockGlobalParams;
+}
+
void GlobalParams::setPrintCommands(GBool printCommandsA) {
lockGlobalParams;
printCommands = printCommandsA;
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.h b/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.h
index 69367cc4ca0..066b420dfa8 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/GlobalParams.h
@@ -37,6 +37,7 @@ class CharCodeToUnicode;
class CharCodeToUnicodeCache;
class UnicodeMap;
class UnicodeMapCache;
+class UnicodeRemapping;
class CMap;
class CMapCache;
struct XpdfSecurityHandler;
@@ -239,13 +240,13 @@ public:
FILE *getUnicodeMapFile(GString *encodingName);
FILE *findCMapFile(GString *collection, GString *cMapName);
FILE *findToUnicodeFile(GString *name);
+ UnicodeRemapping *getUnicodeRemapping();
GString *findFontFile(GString *fontName);
GString *findBase14FontFile(GString *fontName, int *fontNum,
double *oblique);
GString *findSystemFontFile(GString *fontName, SysFontType *type,
int *fontNum);
GString *findCCFontFile(GString *collection);
- GString *getPSFile();
int getPSPaperWidth();
int getPSPaperHeight();
void getPSImageableArea(int *llx, int *lly, int *urx, int *ury);
@@ -309,13 +310,16 @@ public:
GString *getFullScreenMatteColor();
GString *getLaunchCommand() { return launchCommand; }
GString *getMovieCommand() { return movieCommand; }
+ GString *getDefaultPrinter();
GBool getMapNumericCharNames();
GBool getMapUnknownCharNames();
GBool getMapExtTrueTypeFontsViaUnicode();
+ GBool isDroppedFont(const char *fontName);
GBool getEnableXFA();
GList *getKeyBinding(int code, int mods, int context);
int getNumPopupMenuCmds();
PopupMenuCmd *getPopupMenuCmd(int idx);
+ GString *getTabStateFile();
GBool getPrintCommands();
GBool getErrQuiet();
@@ -327,8 +331,8 @@ public:
//----- functions to set parameters
+ void addUnicodeRemapping(Unicode in, Unicode *out, int len);
void addFontFile(GString *fontName, GString *path);
- void setPSFile(char *file);
GBool setPSPaperSize(char *size);
void setPSPaperWidth(int width);
void setPSPaperHeight(int height);
@@ -368,6 +372,7 @@ public:
void setMapUnknownCharNames(GBool map);
void setMapExtTrueTypeFontsViaUnicode(GBool map);
void setEnableXFA(GBool enable);
+ void setTabStateFile(char *tabStateFileA);
void setPrintCommands(GBool printCommandsA);
void setErrQuiet(GBool errQuietA);
@@ -376,6 +381,8 @@ public:
XpdfWin32ErrorInfo *getWin32ErrorInfo();
#endif
+ static const char *defaultTextEncoding;
+
private:
void createDefaultKeyBindings();
@@ -386,22 +393,21 @@ private:
void parseUnicodeMap(GList *tokens, GString *fileName, int line);
void parseCMapDir(GList *tokens, GString *fileName, int line);
void parseToUnicodeDir(GList *tokens, GString *fileName, int line);
+ void parseUnicodeRemapping(GList *tokens, GString *fileName, int line);
void parseFontFile(GList *tokens, GString *fileName, int line);
void parseFontDir(GList *tokens, GString *fileName, int line);
void parseFontFileCC(GList *tokens, GString *fileName,
int line);
- void parsePSFile(GList *tokens, GString *fileName, int line);
void parsePSPaperSize(GList *tokens, GString *fileName, int line);
void parsePSImageableArea(GList *tokens, GString *fileName, int line);
void parsePSLevel(GList *tokens, GString *fileName, int line);
void parsePSResidentFont(GList *tokens, GString *fileName, int line);
void parsePSResidentFont16(GList *tokens, GString *fileName, int line);
void parsePSResidentFontCC(GList *tokens, GString *fileName, int line);
- void parseTextEncoding(GList *tokens, GString *fileName, int line);
void parseTextEOL(GList *tokens, GString *fileName, int line);
- void parseInitialZoom(GList *tokens, GString *fileName, int line);
void parseStrokeAdjust(GList *tokens, GString *fileName, int line);
void parseScreenType(GList *tokens, GString *fileName, int line);
+ void parseDropFont(GList *tokens, GString *fileName, int line);
void parseBind(GList *tokens, GString *fileName, int line);
void parseUnbind(GList *tokens, GString *fileName, int line);
GBool parseKey(GString *modKeyStr, GString *contextStr,
@@ -409,13 +415,11 @@ private:
const char *cmdName,
GList *tokens, GString *fileName, int line);
void parsePopupMenuCmd(GList *tokens, GString *fileName, int line);
- void parseCommand(const char *cmdName, GString **val,
- GList *tokens, GString *fileName, int line);
void parseYesNo(const char *cmdName, GBool *flag,
GList *tokens, GString *fileName, int line);
GBool parseYesNo2(char *token, GBool *flag);
- void parseColor(const char *cmdName, GString **val,
- GList *tokens, GString *fileName, int line);
+ void parseString(const char *cmdName, GString **s,
+ GList *tokens, GString *fileName, int line);
void parseInteger(const char *cmdName, int *val,
GList *tokens, GString *fileName, int line);
void parseFloat(const char *cmdName, double *val,
@@ -444,6 +448,8 @@ private:
GHash *cMapDirs; // list of CMap dirs, indexed by collection
// name [GList[GString]]
GList *toUnicodeDirs; // list of ToUnicode CMap dirs [GString]
+ UnicodeRemapping * // Unicode remapping for text output
+ unicodeRemapping;
GHash *fontFiles; // font files: font name mapped to path
// [GString]
GList *fontDirs; // list of font dirs [GString]
@@ -452,7 +458,6 @@ private:
GHash *base14SysFonts; // Base-14 system font files: font name
// mapped to path [Base14FontInfo]
SysFontList *sysFonts; // system fonts
- GString *psFile; // PostScript file or command (for xpdf)
int psPaperWidth; // paper size, in PostScript points, for
int psPaperHeight; // PostScript output
int psImageableLLX, // imageable area, in PostScript points,
@@ -533,13 +538,17 @@ private:
GString *fullScreenMatteColor; // matte color in full-screen mode
GString *launchCommand; // command executed for 'launch' links
GString *movieCommand; // command executed for movie annotations
+ GString *defaultPrinter; // default printer (for interactive printing
+ // from the viewer)
GBool mapNumericCharNames; // map numeric char names (from font subsets)?
GBool mapUnknownCharNames; // map unknown char names?
GBool mapExtTrueTypeFontsViaUnicode; // map char codes to GID via Unicode
// for external TrueType fonts?
+ GHash *droppedFonts; // dropped fonts [int]
GBool enableXFA; // enable XFA form rendering
GList *keyBindings; // key & mouse button bindings [KeyBinding]
GList *popupMenuCmds; // popup menu commands [PopupMenuCmd]
+ GString *tabStateFile; // path for the tab state save file
GBool printCommands; // print the drawing commands
GBool errQuiet; // suppress error messages?
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/HTMLGen.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/HTMLGen.cc
index cfa15fe9edc..d6cbc24680d 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/HTMLGen.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/HTMLGen.cc
@@ -292,8 +292,13 @@ int HTMLGen::convertPage(
png_destroy_write_struct(&png, &pngInfo);
// page size
- pageW = doc->getPageCropWidth(pg);
- pageH = doc->getPageCropHeight(pg);
+ if (doc->getPageRotate(pg) == 90 || doc->getPageRotate(pg) == 270) {
+ pageW = doc->getPageCropHeight(pg);
+ pageH = doc->getPageCropWidth(pg);
+ } else {
+ pageW = doc->getPageCropWidth(pg);
+ pageH = doc->getPageCropHeight(pg);
+ }
// get the PDF text
doc->displayPage(textOut, pg, 72, 72, 0, gFalse, gTrue, gFalse);
@@ -563,27 +568,27 @@ void HTMLGen::appendUTF8(Unicode u, GString *s) {
s->append((char)(0xc0 + (u >> 6)));
s->append((char)(0x80 + (u & 0x3f)));
} else if (u <= 0xffff) {
- s->append((char)0xe0 + (u >> 12));
- s->append((char)0x80 + ((u >> 6) & 0x3f));
- s->append((char)0x80 + (u & 0x3f));
+ s->append((char)(0xe0 + (u >> 12)));
+ s->append((char)(0x80 + ((u >> 6) & 0x3f)));
+ s->append((char)(0x80 + (u & 0x3f)));
} else if (u <= 0x1fffff) {
- s->append((char)0xf0 + (u >> 18));
- s->append((char)0x80 + ((u >> 12) & 0x3f));
- s->append((char)0x80 + ((u >> 6) & 0x3f));
- s->append((char)0x80 + (u & 0x3f));
+ s->append((char)(0xf0 + (u >> 18)));
+ s->append((char)(0x80 + ((u >> 12) & 0x3f)));
+ s->append((char)(0x80 + ((u >> 6) & 0x3f)));
+ s->append((char)(0x80 + (u & 0x3f)));
} else if (u <= 0x3ffffff) {
- s->append((char)0xf8 + (u >> 24));
- s->append((char)0x80 + ((u >> 18) & 0x3f));
- s->append((char)0x80 + ((u >> 12) & 0x3f));
- s->append((char)0x80 + ((u >> 6) & 0x3f));
- s->append((char)0x80 + (u & 0x3f));
+ s->append((char)(0xf8 + (u >> 24)));
+ s->append((char)(0x80 + ((u >> 18) & 0x3f)));
+ s->append((char)(0x80 + ((u >> 12) & 0x3f)));
+ s->append((char)(0x80 + ((u >> 6) & 0x3f)));
+ s->append((char)(0x80 + (u & 0x3f)));
} else if (u <= 0x7fffffff) {
- s->append((char)0xfc + (u >> 30));
- s->append((char)0x80 + ((u >> 24) & 0x3f));
- s->append((char)0x80 + ((u >> 18) & 0x3f));
- s->append((char)0x80 + ((u >> 12) & 0x3f));
- s->append((char)0x80 + ((u >> 6) & 0x3f));
- s->append((char)0x80 + (u & 0x3f));
+ s->append((char)(0xfc + (u >> 30)));
+ s->append((char)(0x80 + ((u >> 24) & 0x3f)));
+ s->append((char)(0x80 + ((u >> 18) & 0x3f)));
+ s->append((char)(0x80 + ((u >> 12) & 0x3f)));
+ s->append((char)(0x80 + ((u >> 6) & 0x3f)));
+ s->append((char)(0x80 + (u & 0x3f)));
}
}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/ImageOutputDev.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/ImageOutputDev.cc
index 2e9b1390db9..1fb32be0b58 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/ImageOutputDev.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/ImageOutputDev.cc
@@ -242,7 +242,7 @@ void ImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
i = size < (int)sizeof(buf) ? size : (int)sizeof(buf);
n = str->getBlock(buf, i);
for (j = 0; j < n; ++j) {
- buf[j] ^= 0xff;
+ buf[j] = (char)(buf[j] ^ 0xff);
}
fwrite(buf, 1, n, f);
if (n < i) {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/JArithmeticDecoder.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/JArithmeticDecoder.cc
index 5bbad63d9e1..3d10cb4acad 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/JArithmeticDecoder.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/JArithmeticDecoder.cc
@@ -48,7 +48,7 @@ void JArithmeticDecoderStats::copyFrom(JArithmeticDecoderStats *stats) {
}
void JArithmeticDecoderStats::setEntry(Guint cx, int i, int mps) {
- cxTab[cx] = (i << 1) + mps;
+ cxTab[cx] = (Guchar)((i << 1) + mps);
}
//------------------------------------------------------------------------
@@ -202,13 +202,13 @@ int JArithmeticDecoder::decodeBit(Guint context,
if (a < qe) {
bit = 1 - mpsCX;
if (switchTab[iCX]) {
- stats->cxTab[context] = (nlpsTab[iCX] << 1) | (1 - mpsCX);
+ stats->cxTab[context] = (Guchar)((nlpsTab[iCX] << 1) | (1 - mpsCX));
} else {
- stats->cxTab[context] = (nlpsTab[iCX] << 1) | mpsCX;
+ stats->cxTab[context] = (Guchar)((nlpsTab[iCX] << 1) | mpsCX);
}
} else {
bit = mpsCX;
- stats->cxTab[context] = (nmpsTab[iCX] << 1) | mpsCX;
+ stats->cxTab[context] = (Guchar)((nmpsTab[iCX] << 1) | mpsCX);
}
// RENORMD
do {
@@ -225,13 +225,13 @@ int JArithmeticDecoder::decodeBit(Guint context,
// LPS_EXCHANGE
if (a < qe) {
bit = mpsCX;
- stats->cxTab[context] = (nmpsTab[iCX] << 1) | mpsCX;
+ stats->cxTab[context] = (Guchar)((nmpsTab[iCX] << 1) | mpsCX);
} else {
bit = 1 - mpsCX;
if (switchTab[iCX]) {
- stats->cxTab[context] = (nlpsTab[iCX] << 1) | (1 - mpsCX);
+ stats->cxTab[context] = (Guchar)((nlpsTab[iCX] << 1) | (1 - mpsCX));
} else {
- stats->cxTab[context] = (nlpsTab[iCX] << 1) | mpsCX;
+ stats->cxTab[context] = (Guchar)((nlpsTab[iCX] << 1) | mpsCX);
}
}
a = qe;
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/JBIG2Stream.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/JBIG2Stream.cc
index 5e8bca71335..d3c9b6f8c4d 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/JBIG2Stream.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/JBIG2Stream.cc
@@ -494,8 +494,8 @@ int JBIG2MMRDecoder::get2DCode() {
++nBytesRead;
++byteCounter;
p = &twoDimTab1[(buf >> 1) & 0x7f];
- } else if (bufLen == 8) {
- p = &twoDimTab1[(buf >> 1) & 0x7f];
+ } else if (bufLen >= 7) {
+ p = &twoDimTab1[(buf >> (bufLen - 7)) & 0x7f];
} else {
p = &twoDimTab1[(buf << (7 - bufLen)) & 0x7f];
if (p->bits < 0 || p->bits > (int)bufLen) {
@@ -684,9 +684,9 @@ public:
{ return (x < 0 || x >= w || y < 0 || y >= h) ? 0 :
(data[y * line + (x >> 3)] >> (7 - (x & 7))) & 1; }
void setPixel(int x, int y)
- { data[y * line + (x >> 3)] |= 1 << (7 - (x & 7)); }
+ { data[y * line + (x >> 3)] |= (Guchar)(1 << (7 - (x & 7))); }
void clearPixel(int x, int y)
- { data[y * line + (x >> 3)] &= 0x7f7f >> (x & 7); }
+ { data[y * line + (x >> 3)] &= (Guchar)(0x7f7f >> (x & 7)); }
void getPixelPtr(int x, int y, JBIG2BitmapPtr *ptr);
int nextPixel(JBIG2BitmapPtr *ptr);
void duplicateRow(int yDest, int ySrc);
@@ -825,7 +825,8 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y,
Guint combOp) {
int x0, x1, y0, y1, xx, yy;
Guchar *srcPtr, *destPtr;
- Guint src0, src1, src, dest, s1, s2, m1, m2, m3;
+ Guchar dest, src0, src1, src, m1, m2, m3;
+ Guint s1, s2;
GBool oneByte;
// check for the pathological case where y = -2^31
@@ -861,9 +862,9 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y,
s1 = x & 7;
s2 = 8 - s1;
- m1 = 0xff >> (x1 & 7);
- m2 = 0xff << (((x1 & 7) == 0) ? 0 : 8 - (x1 & 7));
- m3 = (0xff >> s1) & m2;
+ m1 = (Guchar)(0xff >> (x1 & 7));
+ m2 = (Guchar)(0xff << (((x1 & 7) == 0) ? 0 : 8 - (x1 & 7)));
+ m3 = (Guchar)((0xff >> s1) & m2);
oneByte = x0 == ((x1 - 1) & ~7);
@@ -878,19 +879,19 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y,
src1 = *srcPtr;
switch (combOp) {
case 0: // or
- dest |= (src1 >> s1) & m2;
+ dest |= (Guchar)((src1 >> s1) & m2);
break;
case 1: // and
- dest &= ((0xff00 | src1) >> s1) | m1;
+ dest &= (Guchar)(((0xff00 | src1) >> s1) | m1);
break;
case 2: // xor
- dest ^= (src1 >> s1) & m2;
+ dest ^= (Guchar)((src1 >> s1) & m2);
break;
case 3: // xnor
- dest ^= ((src1 ^ 0xff) >> s1) & m2;
+ dest ^= (Guchar)(((src1 ^ 0xff) >> s1) & m2);
break;
case 4: // replace
- dest = (dest & ~m3) | ((src1 >> s1) & m3);
+ dest = (Guchar)((dest & ~m3) | ((src1 >> s1) & m3));
break;
}
*destPtr = dest;
@@ -931,19 +932,19 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y,
dest = *destPtr;
switch (combOp) {
case 0: // or
- dest |= src1 >> s1;
+ dest |= (Guchar)(src1 >> s1);
break;
case 1: // and
- dest &= (0xff00 | src1) >> s1;
+ dest &= (Guchar)((0xff00 | src1) >> s1);
break;
case 2: // xor
- dest ^= src1 >> s1;
+ dest ^= (Guchar)(src1 >> s1);
break;
case 3: // xnor
- dest ^= (src1 ^ 0xff) >> s1;
+ dest ^= (Guchar)((src1 ^ 0xff) >> s1);
break;
case 4: // replace
- dest = (dest & (0xff << s2)) | (src1 >> s1);
+ dest = (Guchar)((dest & (0xff << s2)) | (src1 >> s1));
break;
}
*destPtr++ = dest;
@@ -960,7 +961,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y,
dest = *destPtr;
src0 = src1;
src1 = *srcPtr++;
- src = (((src0 << 8) | src1) >> s1) & 0xff;
+ src = (Guchar)(((src0 << 8) | src1) >> s1);
switch (combOp) {
case 0: // or
dest |= src;
@@ -989,7 +990,7 @@ void JBIG2Bitmap::combine(JBIG2Bitmap *bitmap, int x, int y,
dest = *destPtr;
src0 = src1;
src1 = *srcPtr++;
- src = (((src0 << 8) | src1) >> s1) & 0xff;
+ src = (Guchar)(((src0 << 8) | src1) >> s1);
switch (combOp) {
case 0: // or
dest |= src & m2;
@@ -1712,6 +1713,12 @@ GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length,
"Bad delta-height value in JBIG2 symbol dictionary");
goto syntaxError;
}
+ // sanity check to avoid extremely long run-times with damaged streams
+ if (dh > 1000000) {
+ error(errSyntaxError, getPos(),
+ "Bogus delta-height value in JBIG2 symbol dictionary");
+ goto syntaxError;
+ }
symHeight += dh;
symWidth = 0;
totalWidth = 0;
@@ -2814,17 +2821,17 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
if (mmr) {
mmrDecoder->reset();
- if (w > INT_MAX - 2) {
+ if (w > INT_MAX - 3) {
error(errSyntaxError, getPos(), "Bad width in JBIG2 generic bitmap");
// force a call to gmalloc(-1), which will throw an exception
- w = -3;
+ w = -4;
}
// 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = w
// ---> max codingLine size = w + 1
- // refLine has one extra guard entry at the end
- // ---> max refLine size = w + 2
+ // refLine has two extra guard entries at the end
+ // ---> max refLine size = w + 3
codingLine = (int *)gmallocn(w + 1, sizeof(int));
- refLine = (int *)gmallocn(w + 2, sizeof(int));
+ refLine = (int *)gmallocn(w + 3, sizeof(int));
codingLine[0] = w;
for (y = 0; y < h; ++y) {
@@ -2834,6 +2841,7 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
refLine[i] = codingLine[i];
}
refLine[i++] = w;
+ refLine[i++] = w;
refLine[i] = w;
// decode a line
@@ -3125,7 +3133,9 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
atBuf3 |= *atP3++;
}
}
- for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) {
+ for (x1 = 0, mask = 0x80;
+ x1 < 8 && x < w;
+ ++x1, ++x, mask = (Guchar)(mask >> 1)) {
// build the context
cx0 = (buf0 >> 14) & 0x07;
@@ -3182,7 +3192,9 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
}
buf2 |= *p2++;
}
- for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) {
+ for (x1 = 0, mask = 0x80;
+ x1 < 8 && x < w;
+ ++x1, ++x, mask = (Guchar)(mask >> 1)) {
// build the context
cx0 = (buf0 >> 14) & 0x07;
@@ -3258,7 +3270,9 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
atBuf0 |= *atP0++;
}
}
- for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) {
+ for (x1 = 0, mask = 0x80;
+ x1 < 8 && x < w;
+ ++x1, ++x, mask = (Guchar)(mask >> 1)) {
// build the context
cx0 = (buf0 >> 13) & 0x0f;
@@ -3300,7 +3314,9 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
}
buf2 |= *p2++;
}
- for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) {
+ for (x1 = 0, mask = 0x80;
+ x1 < 8 && x < w;
+ ++x1, ++x, mask = (Guchar)(mask >> 1)) {
// build the context
cx0 = (buf0 >> 13) & 0x0f;
@@ -3373,7 +3389,9 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
atBuf0 |= *atP0++;
}
}
- for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) {
+ for (x1 = 0, mask = 0x80;
+ x1 < 8 && x < w;
+ ++x1, ++x, mask = (Guchar)(mask >> 1)) {
// build the context
cx0 = (buf0 >> 14) & 0x07;
@@ -3415,7 +3433,9 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
}
buf2 |= *p2++;
}
- for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) {
+ for (x1 = 0, mask = 0x80;
+ x1 < 8 && x < w;
+ ++x1, ++x, mask = (Guchar)(mask >> 1)) {
// build the context
cx0 = (buf0 >> 14) & 0x07;
@@ -3478,7 +3498,9 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
atBuf0 |= *atP0++;
}
}
- for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) {
+ for (x1 = 0, mask = 0x80;
+ x1 < 8 && x < w;
+ ++x1, ++x, mask = (Guchar)(mask >> 1)) {
// build the context
cx1 = (buf1 >> 14) & 0x1f;
@@ -3515,7 +3537,9 @@ JBIG2Bitmap *JBIG2Stream::readGenericBitmap(GBool mmr, int w, int h,
}
buf2 |= *p2++;
}
- for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) {
+ for (x1 = 0, mask = 0x80;
+ x1 < 8 && x < w;
+ ++x1, ++x, mask = (Guchar)(mask >> 1)) {
// build the context
cx1 = (buf1 >> 14) & 0x1f;
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/JPXStream.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/JPXStream.cc
index 90a52c455b8..79a7c51eda9 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/JPXStream.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/JPXStream.cc
@@ -230,7 +230,7 @@ JPXCover jpxCover(150);
JPXStream::JPXStream(Stream *strA):
FilterStream(strA)
{
- bufStr = new BufStream(str, 2);
+ bufStr = new BufStream(str, 3);
nComps = 0;
bpc = NULL;
@@ -270,10 +270,11 @@ Stream *JPXStream::copy() {
}
void JPXStream::reset() {
+ img.ySize = 0;
bufStr->reset();
if (readBoxes() == jpxDecodeFatalError) {
// readBoxes reported an error, so we go immediately to EOF
- curY = img.ySizeR;
+ curY = img.ySize >> reduction;
} else {
curY = img.yOffsetR;
}
@@ -420,8 +421,12 @@ void JPXStream::fillReadBuf() {
#else
tileComp = &img.tiles[tileIdx].tileComps[havePalette ? 0 : curComp];
#endif
- tx = jpxCeilDiv((curX - img.xTileOffsetR) % img.xTileSizeR, tileComp->hSep);
- ty = jpxCeilDiv((curY - img.yTileOffsetR) % img.yTileSizeR, tileComp->vSep);
+ //~ can curX/curY be less than x/yTileOffsetR?
+ //~ if yes, we need to use tx = max(0, ....)
+ tx = jpxFloorDiv((curX - img.xTileOffsetR) % img.xTileSizeR,
+ tileComp->hSep);
+ ty = jpxFloorDiv((curY - img.yTileOffsetR) % img.yTileSizeR,
+ tileComp->vSep);
pix = (int)tileComp->data[ty * tileComp->w + tx];
pixBits = tileComp->prec;
eol = gFalse;
@@ -589,7 +594,7 @@ JPXDecodeResult JPXStream::readBoxes() {
JPXDecodeResult result;
GBool haveCodestream;
Guint boxType, boxLen, dataLen;
- Guint bpc1, compression, unknownColorspace, ipr;
+ Guint w, h, n, bpc1, compression, unknownColorspace, ipr;
Guint i, j;
haveImgHdr = gFalse;
@@ -627,9 +632,9 @@ JPXDecodeResult JPXStream::readBoxes() {
break;
case 0x69686472: // image header
cover(9);
- if (!readULong(&height) ||
- !readULong(&width) ||
- !readUWord(&nComps) ||
+ if (!readULong(&h) ||
+ !readULong(&w) ||
+ !readUWord(&n) ||
!readUByte(&bpc1) ||
!readUByte(&compression) ||
!readUByte(&unknownColorspace) ||
@@ -642,6 +647,9 @@ JPXDecodeResult JPXStream::readBoxes() {
"Unknown compression type in JPX stream");
return jpxDecodeFatalError;
}
+ height = h;
+ width = w;
+ nComps = n;
bpc = (Guint *)gmallocn(nComps, sizeof(Guint));
for (i = 0; i < nComps; ++i) {
bpc[i] = bpc1;
@@ -895,7 +903,9 @@ JPXDecodeResult JPXStream::readCodestream(Guint len) {
JPXTileComp *tileComp;
int segType;
GBool haveSIZ, haveCOD, haveQCD, haveSOT, ok;
- Guint precinctSize, style;
+ Guint style, progOrder, nLayers, multiComp, nDecompLevels;
+ Guint codeBlockW, codeBlockH, codeBlockStyle, transform;
+ Guint precinctSize;
Guint segLen, capabilities, comp, i, j, r;
//----- main header
@@ -941,7 +951,8 @@ JPXDecodeResult JPXStream::readCodestream(Guint len) {
img.xTileOffset > img.xOffset ||
img.yTileOffset > img.yOffset ||
img.xTileSize + img.xTileOffset <= img.xOffset ||
- img.yTileSize + img.yTileOffset <= img.yOffset) {
+ img.yTileSize + img.yTileOffset <= img.yOffset ||
+ img.nComps == 0) {
error(errSyntaxError, getPos(), "Error in JPX SIZ marker segment");
return jpxDecodeFatalError;
}
@@ -1010,65 +1021,54 @@ JPXDecodeResult JPXStream::readCodestream(Guint len) {
"JPX COD marker segment before SIZ segment");
return jpxDecodeFatalError;
}
- if (!readUByte(&img.tiles[0].tileComps[0].style) ||
- !readUByte(&img.tiles[0].progOrder) ||
- !readUWord(&img.tiles[0].nLayers) ||
- !readUByte(&img.tiles[0].multiComp) ||
- !readUByte(&img.tiles[0].tileComps[0].nDecompLevels) ||
- !readUByte(&img.tiles[0].tileComps[0].codeBlockW) ||
- !readUByte(&img.tiles[0].tileComps[0].codeBlockH) ||
- !readUByte(&img.tiles[0].tileComps[0].codeBlockStyle) ||
- !readUByte(&img.tiles[0].tileComps[0].transform)) {
+ if (!readUByte(&style) ||
+ !readUByte(&progOrder) ||
+ !readUWord(&nLayers) ||
+ !readUByte(&multiComp) ||
+ !readUByte(&nDecompLevels) ||
+ !readUByte(&codeBlockW) ||
+ !readUByte(&codeBlockH) ||
+ !readUByte(&codeBlockStyle) ||
+ !readUByte(&transform)) {
error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
return jpxDecodeFatalError;
}
- if (img.tiles[0].tileComps[0].nDecompLevels > 32 ||
- img.tiles[0].tileComps[0].codeBlockW > 8 ||
- img.tiles[0].tileComps[0].codeBlockH > 8) {
+ if (nDecompLevels < 1 ||
+ nDecompLevels > 31 ||
+ codeBlockW > 8 ||
+ codeBlockH > 8) {
error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
return jpxDecodeFatalError;
}
#if 1 //~ progression orders 2-4 are unimplemented
- if (img.tiles[0].progOrder >= 2) {
+ if (progOrder >= 2) {
error(errUnimplemented, -1,
"JPX progression order {0:d} is unimplemented",
- img.tiles[0].progOrder);
+ progOrder);
}
#endif
- img.tiles[0].tileComps[0].codeBlockW += 2;
- img.tiles[0].tileComps[0].codeBlockH += 2;
+ codeBlockW += 2;
+ codeBlockH += 2;
for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
- if (i != 0) {
- img.tiles[i].progOrder = img.tiles[0].progOrder;
- img.tiles[i].nLayers = img.tiles[0].nLayers;
- img.tiles[i].multiComp = img.tiles[0].multiComp;
- }
+ img.tiles[i].progOrder = progOrder;
+ img.tiles[i].nLayers = nLayers;
+ img.tiles[i].multiComp = multiComp;
for (comp = 0; comp < img.nComps; ++comp) {
- if (!(i == 0 && comp == 0)) {
- img.tiles[i].tileComps[comp].style =
- img.tiles[0].tileComps[0].style;
- img.tiles[i].tileComps[comp].nDecompLevels =
- img.tiles[0].tileComps[0].nDecompLevels;
- img.tiles[i].tileComps[comp].codeBlockW =
- img.tiles[0].tileComps[0].codeBlockW;
- img.tiles[i].tileComps[comp].codeBlockH =
- img.tiles[0].tileComps[0].codeBlockH;
- img.tiles[i].tileComps[comp].codeBlockStyle =
- img.tiles[0].tileComps[0].codeBlockStyle;
- img.tiles[i].tileComps[comp].transform =
- img.tiles[0].tileComps[0].transform;
- }
+ img.tiles[i].tileComps[comp].style = style;
+ img.tiles[i].tileComps[comp].nDecompLevels = nDecompLevels;
+ img.tiles[i].tileComps[comp].codeBlockW = codeBlockW;
+ img.tiles[i].tileComps[comp].codeBlockH = codeBlockH;
+ img.tiles[i].tileComps[comp].codeBlockStyle = codeBlockStyle;
+ img.tiles[i].tileComps[comp].transform = transform;
img.tiles[i].tileComps[comp].resLevels =
- (JPXResLevel *)gmallocn(
- (img.tiles[i].tileComps[comp].nDecompLevels + 1),
- sizeof(JPXResLevel));
- for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) {
+ (JPXResLevel *)gmallocn(nDecompLevels + 1, sizeof(JPXResLevel));
+ for (r = 0; r <= nDecompLevels; ++r) {
img.tiles[i].tileComps[comp].resLevels[r].precincts = NULL;
}
}
}
- for (r = 0; r <= img.tiles[0].tileComps[0].nDecompLevels; ++r) {
- if (img.tiles[0].tileComps[0].style & 0x01) {
+ for (r = 0; r <= nDecompLevels; ++r) {
+ if (style & 0x01) {
cover(91);
if (!readUByte(&precinctSize)) {
error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
@@ -1086,7 +1086,7 @@ JPXDecodeResult JPXStream::readCodestream(Guint len) {
for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
for (comp = 0; comp < img.nComps; ++comp) {
if (!(i == 0 && comp == 0)) {
- for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) {
+ for (r = 0; r <= nDecompLevels; ++r) {
img.tiles[i].tileComps[comp].resLevels[r].precinctWidth =
img.tiles[0].tileComps[0].resLevels[r].precinctWidth;
img.tiles[i].tileComps[comp].resLevels[r].precinctHeight =
@@ -1108,50 +1108,42 @@ JPXDecodeResult JPXStream::readCodestream(Guint len) {
(img.nComps <= 256 && !readUByte(&comp)) ||
comp >= img.nComps ||
!readUByte(&style) ||
- !readUByte(&img.tiles[0].tileComps[comp].nDecompLevels) ||
- !readUByte(&img.tiles[0].tileComps[comp].codeBlockW) ||
- !readUByte(&img.tiles[0].tileComps[comp].codeBlockH) ||
- !readUByte(&img.tiles[0].tileComps[comp].codeBlockStyle) ||
- !readUByte(&img.tiles[0].tileComps[comp].transform)) {
+ !readUByte(&nDecompLevels) ||
+ !readUByte(&codeBlockW) ||
+ !readUByte(&codeBlockH) ||
+ !readUByte(&codeBlockStyle) ||
+ !readUByte(&transform)) {
error(errSyntaxError, getPos(), "Error in JPX COC marker segment");
return jpxDecodeFatalError;
}
- if (img.tiles[0].tileComps[comp].nDecompLevels > 32 ||
- img.tiles[0].tileComps[comp].codeBlockW > 8 ||
- img.tiles[0].tileComps[comp].codeBlockH > 8) {
+ if (nDecompLevels < 1 ||
+ nDecompLevels > 31 ||
+ codeBlockW > 8 ||
+ codeBlockH > 8) {
error(errSyntaxError, getPos(), "Error in JPX COC marker segment");
return jpxDecodeFatalError;
}
- img.tiles[0].tileComps[comp].style =
- (img.tiles[0].tileComps[comp].style & ~1) | (style & 1);
- img.tiles[0].tileComps[comp].codeBlockW += 2;
- img.tiles[0].tileComps[comp].codeBlockH += 2;
+ style = (img.tiles[0].tileComps[comp].style & ~1) | (style & 1);
+ codeBlockW += 2;
+ codeBlockH += 2;
for (i = 0; i < img.nXTiles * img.nYTiles; ++i) {
- if (i != 0) {
- img.tiles[i].tileComps[comp].style =
- img.tiles[0].tileComps[comp].style;
- img.tiles[i].tileComps[comp].nDecompLevels =
- img.tiles[0].tileComps[comp].nDecompLevels;
- img.tiles[i].tileComps[comp].codeBlockW =
- img.tiles[0].tileComps[comp].codeBlockW;
- img.tiles[i].tileComps[comp].codeBlockH =
- img.tiles[0].tileComps[comp].codeBlockH;
- img.tiles[i].tileComps[comp].codeBlockStyle =
- img.tiles[0].tileComps[comp].codeBlockStyle;
- img.tiles[i].tileComps[comp].transform =
- img.tiles[0].tileComps[comp].transform;
- }
+ img.tiles[i].tileComps[comp].style = style;
+ img.tiles[i].tileComps[comp].nDecompLevels = nDecompLevels;
+ img.tiles[i].tileComps[comp].codeBlockW = codeBlockW;
+ img.tiles[i].tileComps[comp].codeBlockH = codeBlockH;
+ img.tiles[i].tileComps[comp].codeBlockStyle = codeBlockStyle;
+ img.tiles[i].tileComps[comp].transform = transform;
img.tiles[i].tileComps[comp].resLevels =
(JPXResLevel *)greallocn(
img.tiles[i].tileComps[comp].resLevels,
- (img.tiles[i].tileComps[comp].nDecompLevels + 1),
+ nDecompLevels + 1,
sizeof(JPXResLevel));
- for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) {
+ for (r = 0; r <= nDecompLevels; ++r) {
img.tiles[i].tileComps[comp].resLevels[r].precincts = NULL;
}
}
- for (r = 0; r <= img.tiles[0].tileComps[comp].nDecompLevels; ++r) {
- if (img.tiles[0].tileComps[comp].style & 0x01) {
+ for (r = 0; r <= nDecompLevels; ++r) {
+ if (style & 0x01) {
if (!readUByte(&precinctSize)) {
error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
return jpxDecodeFatalError;
@@ -1507,7 +1499,9 @@ GBool JPXStream::readTilePart() {
GBool haveSOD;
Guint tileIdx, tilePartLen, tilePartIdx, nTileParts;
GBool tilePartToEOC;
- Guint precinctSize, style;
+ Guint style, progOrder, nLayers, multiComp, nDecompLevels;
+ Guint codeBlockW, codeBlockH, codeBlockStyle, transform;
+ Guint precinctSize, qStyle;
Guint n, nSBs, nx, ny, sbx0, sby0, comp, segLen;
Guint i, j, k, cbX, cbY, r, pre, sb, cbi, cbj;
int segType, level;
@@ -1545,21 +1539,22 @@ GBool JPXStream::readTilePart() {
switch (segType) {
case 0x52: // COD - coding style default
cover(34);
- if (!readUByte(&img.tiles[tileIdx].tileComps[0].style) ||
- !readUByte(&img.tiles[tileIdx].progOrder) ||
- !readUWord(&img.tiles[tileIdx].nLayers) ||
- !readUByte(&img.tiles[tileIdx].multiComp) ||
- !readUByte(&img.tiles[tileIdx].tileComps[0].nDecompLevels) ||
- !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockW) ||
- !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockH) ||
- !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockStyle) ||
- !readUByte(&img.tiles[tileIdx].tileComps[0].transform)) {
+ if (!readUByte(&style) ||
+ !readUByte(&progOrder) ||
+ !readUWord(&nLayers) ||
+ !readUByte(&multiComp) ||
+ !readUByte(&nDecompLevels) ||
+ !readUByte(&codeBlockW) ||
+ !readUByte(&codeBlockH) ||
+ !readUByte(&codeBlockStyle) ||
+ !readUByte(&transform)) {
error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
return gFalse;
}
- if (img.tiles[tileIdx].tileComps[0].nDecompLevels > 32 ||
- img.tiles[tileIdx].tileComps[0].codeBlockW > 8 ||
- img.tiles[tileIdx].tileComps[0].codeBlockH > 8) {
+ if (nDecompLevels < 1 ||
+ nDecompLevels > 31 ||
+ codeBlockW > 8 ||
+ codeBlockH > 8) {
error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
return gFalse;
}
@@ -1570,36 +1565,29 @@ GBool JPXStream::readTilePart() {
img.tiles[tileIdx].progOrder);
}
#endif
- img.tiles[tileIdx].tileComps[0].codeBlockW += 2;
- img.tiles[tileIdx].tileComps[0].codeBlockH += 2;
+ codeBlockW += 2;
+ codeBlockH += 2;
+ img.tiles[tileIdx].progOrder = progOrder;
+ img.tiles[tileIdx].nLayers = nLayers;
+ img.tiles[tileIdx].multiComp = multiComp;
for (comp = 0; comp < img.nComps; ++comp) {
- if (comp != 0) {
- img.tiles[tileIdx].tileComps[comp].style =
- img.tiles[tileIdx].tileComps[0].style;
- img.tiles[tileIdx].tileComps[comp].nDecompLevels =
- img.tiles[tileIdx].tileComps[0].nDecompLevels;
- img.tiles[tileIdx].tileComps[comp].codeBlockW =
- img.tiles[tileIdx].tileComps[0].codeBlockW;
- img.tiles[tileIdx].tileComps[comp].codeBlockH =
- img.tiles[tileIdx].tileComps[0].codeBlockH;
- img.tiles[tileIdx].tileComps[comp].codeBlockStyle =
- img.tiles[tileIdx].tileComps[0].codeBlockStyle;
- img.tiles[tileIdx].tileComps[comp].transform =
- img.tiles[tileIdx].tileComps[0].transform;
- }
+ img.tiles[tileIdx].tileComps[comp].style = style;
+ img.tiles[tileIdx].tileComps[comp].nDecompLevels = nDecompLevels;
+ img.tiles[tileIdx].tileComps[comp].codeBlockW = codeBlockW;
+ img.tiles[tileIdx].tileComps[comp].codeBlockH = codeBlockH;
+ img.tiles[tileIdx].tileComps[comp].codeBlockStyle = codeBlockStyle;
+ img.tiles[tileIdx].tileComps[comp].transform = transform;
img.tiles[tileIdx].tileComps[comp].resLevels =
(JPXResLevel *)greallocn(
img.tiles[tileIdx].tileComps[comp].resLevels,
- (img.tiles[tileIdx].tileComps[comp].nDecompLevels + 1),
+ nDecompLevels + 1,
sizeof(JPXResLevel));
- for (r = 0;
- r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels;
- ++r) {
+ for (r = 0; r <= nDecompLevels; ++r) {
img.tiles[tileIdx].tileComps[comp].resLevels[r].precincts = NULL;
}
}
- for (r = 0; r <= img.tiles[tileIdx].tileComps[0].nDecompLevels; ++r) {
- if (img.tiles[tileIdx].tileComps[0].style & 0x01) {
+ for (r = 0; r <= nDecompLevels; ++r) {
+ if (style & 0x01) {
if (!readUByte(&precinctSize)) {
error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
return gFalse;
@@ -1614,9 +1602,7 @@ GBool JPXStream::readTilePart() {
}
}
for (comp = 1; comp < img.nComps; ++comp) {
- for (r = 0;
- r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels;
- ++r) {
+ for (r = 0; r <= nDecompLevels; ++r) {
img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctWidth =
img.tiles[tileIdx].tileComps[0].resLevels[r].precinctWidth;
img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctHeight =
@@ -1630,34 +1616,38 @@ GBool JPXStream::readTilePart() {
(img.nComps <= 256 && !readUByte(&comp)) ||
comp >= img.nComps ||
!readUByte(&style) ||
- !readUByte(&img.tiles[tileIdx].tileComps[comp].nDecompLevels) ||
- !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockW) ||
- !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockH) ||
- !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockStyle) ||
- !readUByte(&img.tiles[tileIdx].tileComps[comp].transform)) {
+ !readUByte(&nDecompLevels) ||
+ !readUByte(&codeBlockW) ||
+ !readUByte(&codeBlockH) ||
+ !readUByte(&codeBlockStyle) ||
+ !readUByte(&transform)) {
error(errSyntaxError, getPos(), "Error in JPX COC marker segment");
return gFalse;
}
- if (img.tiles[tileIdx].tileComps[comp].nDecompLevels > 32 ||
- img.tiles[tileIdx].tileComps[comp].codeBlockW > 8 ||
- img.tiles[tileIdx].tileComps[comp].codeBlockH > 8) {
+ if (nDecompLevels < 1 ||
+ nDecompLevels > 31 ||
+ codeBlockW > 8 ||
+ codeBlockH > 8) {
error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
return gFalse;
}
img.tiles[tileIdx].tileComps[comp].style =
(img.tiles[tileIdx].tileComps[comp].style & ~1) | (style & 1);
- img.tiles[tileIdx].tileComps[comp].codeBlockW += 2;
- img.tiles[tileIdx].tileComps[comp].codeBlockH += 2;
+ img.tiles[tileIdx].tileComps[comp].nDecompLevels = nDecompLevels;
+ img.tiles[tileIdx].tileComps[comp].codeBlockW = codeBlockW + 2;
+ img.tiles[tileIdx].tileComps[comp].codeBlockH = codeBlockH + 2;
+ img.tiles[tileIdx].tileComps[comp].codeBlockStyle = codeBlockStyle;
+ img.tiles[tileIdx].tileComps[comp].transform = transform;
img.tiles[tileIdx].tileComps[comp].resLevels =
(JPXResLevel *)greallocn(
img.tiles[tileIdx].tileComps[comp].resLevels,
- (img.tiles[tileIdx].tileComps[comp].nDecompLevels + 1),
+ nDecompLevels + 1,
sizeof(JPXResLevel));
- for (r = 0; r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; ++r) {
+ for (r = 0; r <= nDecompLevels; ++r) {
img.tiles[tileIdx].tileComps[comp].resLevels[r].precincts = NULL;
}
- for (r = 0; r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; ++r) {
- if (img.tiles[tileIdx].tileComps[comp].style & 0x01) {
+ for (r = 0; r <= nDecompLevels; ++r) {
+ if (style & 0x01) {
if (!readUByte(&precinctSize)) {
error(errSyntaxError, getPos(), "Error in JPX COD marker segment");
return gFalse;
@@ -1890,6 +1880,17 @@ GBool JPXStream::readTilePart() {
}
} while (!haveSOD);
+ for (comp = 0; comp < img.nComps; ++comp) {
+ tileComp = &img.tiles[tileIdx].tileComps[comp];
+ qStyle = tileComp->quantStyle & 0x1f;
+ if ((qStyle == 0 && tileComp->nQuantSteps < 3 * tileComp->nDecompLevels) ||
+ (qStyle == 1 && tileComp->nQuantSteps < 1) ||
+ (qStyle == 2 && tileComp->nQuantSteps < 3 * tileComp->nDecompLevels)) {
+ error(errSyntaxError, getPos(), "Too few quant steps in JPX tile part");
+ return gFalse;
+ }
+ }
+
//----- initialize the tile, precincts, and code-blocks
if (tilePartIdx == 0) {
tile = &img.tiles[tileIdx];
@@ -2083,7 +2084,8 @@ GBool JPXStream::readTilePart() {
}
}
memset(cb->touched, 0,
- (1 << (tileComp->codeBlockW + tileComp->codeBlockH)));
+ ((size_t)1 << (tileComp->codeBlockW
+ + tileComp->codeBlockH)));
} else {
cb->coeffs = NULL;
cb->touched = NULL;
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc
index d46303c6579..283a070b576 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Lexer.cc
@@ -141,7 +141,7 @@ Object *Lexer::getObj(Object *obj) {
// number
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- case '-': case '.':
+ case '+': case '-': case '.':
// Adobe's number lexer has some "interesting" behavior:
// "--123" is interpreted as 0
// "--123.4" is interpreted as -123.4 [I've seen this in the wild]
@@ -159,7 +159,9 @@ Object *Lexer::getObj(Object *obj) {
neg = gFalse;
doubleMinus = gFalse;
xf = xi = 0;
- if (c == '-') {
+ if (c == '+') {
+ // just ignore it
+ } else if (c == '-') {
neg = gTrue;
if (lookChar() == '-') {
doubleMinus = gTrue;
@@ -373,9 +375,9 @@ Object *Lexer::getObj(Object *obj) {
// accept longer names
++n;
if (n < tokBufSize) {
- *p++ = c;
+ *p++ = (char)c;
} else if (n == tokBufSize) {
- *p = c;
+ *p = (char)c;
s = new GString(tokBuf, n);
} else {
s->append((char)c);
@@ -393,7 +395,7 @@ Object *Lexer::getObj(Object *obj) {
// array punctuation
case '[':
case ']':
- tokBuf[0] = c;
+ tokBuf[0] = (char)c;
tokBuf[1] = '\0';
obj->initCmd(tokBuf);
break;
@@ -484,7 +486,7 @@ Object *Lexer::getObj(Object *obj) {
// command
default:
p = tokBuf;
- *p++ = c;
+ *p++ = (char)c;
n = 1;
while ((c = lookChar()) != EOF && !specialChars[c]) {
getChar();
@@ -492,7 +494,7 @@ Object *Lexer::getObj(Object *obj) {
error(errSyntaxError, getPos(), "Command token too long");
break;
}
- *p++ = c;
+ *p++ = (char)c;
}
*p = '\0';
if (tokBuf[0] == 't' && !strcmp(tokBuf, "true")) {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/NameToUnicodeTable.h b/Build/source/libs/xpdf/xpdf-src/xpdf/NameToUnicodeTable.h
index c516dea27e6..5000bd3e284 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/NameToUnicodeTable.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/NameToUnicodeTable.h
@@ -2785,6 +2785,7 @@ static struct {
{0x30ce, "nokatakana"},
{0xff89, "nokatakanahalfwidth"},
{0x00a0, "nonbreakingspace"},
+ {0x00a0, "nobreakspace"},
{0x0e13, "nonenthai"},
{0x0e19, "nonuthai"},
{0x0646, "noonarabic"},
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Object.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Object.cc
index 45d8cf8060c..c223074677f 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Object.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Object.cc
@@ -46,7 +46,7 @@ const char *objTypeNames[numObjTypes] = {
#if MULTITHREADED
GAtomicCounter Object::numAlloc[numObjTypes] =
#else
-int Object::numAlloc[numObjTypes] =
+long Object::numAlloc[numObjTypes] =
#endif
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#endif
@@ -226,7 +226,7 @@ void Object::print(FILE *f) {
void Object::memCheck(FILE *f) {
#ifdef DEBUG_MEM
int i;
- int t;
+ long t;
t = 0;
for (i = 0; i < numObjTypes; ++i)
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Object.h b/Build/source/libs/xpdf/xpdf-src/xpdf/Object.h
index 68d59a05f84..cb636510149 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Object.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Object.h
@@ -168,7 +168,7 @@ public:
// Array accessors.
int arrayGetLength();
void arrayAdd(Object *elem);
- Object *arrayGet(int i, Object *obj);
+ Object *arrayGet(int i, Object *obj, int recursion = 0);
Object *arrayGetNF(int i, Object *obj);
// Dict accessors.
@@ -239,8 +239,8 @@ inline int Object::arrayGetLength()
inline void Object::arrayAdd(Object *elem)
{ array->add(elem); }
-inline Object *Object::arrayGet(int i, Object *obj)
- { return array->get(i, obj); }
+inline Object *Object::arrayGet(int i, Object *obj, int recursion)
+ { return array->get(i, obj, recursion); }
inline Object *Object::arrayGetNF(int i, Object *obj)
{ return array->getNF(i, obj); }
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/OptionalContent.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/OptionalContent.cc
index a790989a72c..6188856e8aa 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/OptionalContent.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/OptionalContent.cc
@@ -42,10 +42,10 @@
OptionalContent::OptionalContent(PDFDoc *doc) {
Object *ocProps;
- Object ocgList, defView, obj1, obj2;
+ Object ocgList, defView, uad, obj1, obj2, obj3, obj4;
Ref ref1;
OptionalContentGroup *ocg;
- int i;
+ int i, j;
xref = doc->getXRef();
ocgs = new GList();
@@ -70,34 +70,41 @@ OptionalContent::OptionalContent(PDFDoc *doc) {
//----- read the default viewing OCCD
if (ocProps->dictLookup("D", &defView)->isDict()) {
- //----- initial state from OCCD
- if (defView.dictLookup("OFF", &obj1)->isArray()) {
+ //----- read the usage app dicts
+ if (defView.dictLookup("AS", &obj1)->isArray()) {
for (i = 0; i < obj1.arrayGetLength(); ++i) {
- if (obj1.arrayGetNF(i, &obj2)->isRef()) {
- ref1 = obj2.getRef();
- if ((ocg = findOCG(&ref1))) {
- ocg->setState(gFalse);
- } else {
- error(errSyntaxError, -1,
- "Invalid OCG reference in OFF array in default viewing OCCD");
+ if (obj1.arrayGet(i, &uad)->isDict()) {
+ if (uad.dictLookup("Event", &obj2)->isName("View")) {
+ if (uad.dictLookup("OCGs", &obj3)->isArray()) {
+ for (j = 0; j < obj3.arrayGetLength(); ++j) {
+ if (obj3.arrayGetNF(j, &obj4)->isRef()) {
+ ref1 = obj4.getRef();
+ if ((ocg = findOCG(&ref1))) {
+ ocg->setInViewUsageAppDict();
+ }
+ }
+ obj4.free();
+ }
+ }
+ obj3.free();
}
+ obj2.free();
}
- obj2.free();
+ uad.free();
}
}
obj1.free();
- // the default OCCD is required to have a BaseState of ON, so
- // the ON array is redundant -- but some (broken) PDF files
- // include OCGs in both the OFF and ON arrays
- if (defView.dictLookup("ON", &obj1)->isArray()) {
+
+ //----- initial state from OCCD
+ if (defView.dictLookup("OFF", &obj1)->isArray()) {
for (i = 0; i < obj1.arrayGetLength(); ++i) {
if (obj1.arrayGetNF(i, &obj2)->isRef()) {
ref1 = obj2.getRef();
if ((ocg = findOCG(&ref1))) {
- ocg->setState(gTrue);
+ ocg->setState(gFalse);
} else {
error(errSyntaxError, -1,
- "Invalid OCG reference in ON array in default viewing OCCD");
+ "Invalid OCG reference in OFF array in default viewing OCCD");
}
}
obj2.free();
@@ -108,10 +115,9 @@ OptionalContent::OptionalContent(PDFDoc *doc) {
//----- initial state from OCG usage dict
for (i = 0; i < ocgs->getLength(); ++i) {
ocg = (OptionalContentGroup *)ocgs->get(i);
- //~ should this look at PrintState when printing, or is it
- //~ better to always print the ViewState?
- if (ocg->getViewState() == ocUsageOff) {
- ocg->setState(gFalse);
+ if (ocg->getInViewUsageAppDict() &&
+ ocg->getViewState() != ocUsageUnset) {
+ ocg->setState(ocg->getViewState() == ocUsageOn);
}
}
@@ -370,6 +376,7 @@ OptionalContentGroup::OptionalContentGroup(Ref *refA, TextString *nameA,
viewState = viewStateA;
printState = printStateA;
state = gTrue;
+ inViewUsageAppDict = gFalse;
}
OptionalContentGroup::~OptionalContentGroup() {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/OptionalContent.h b/Build/source/libs/xpdf/xpdf-src/xpdf/OptionalContent.h
index 4aa970e7356..f00ef296a0c 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/OptionalContent.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/OptionalContent.h
@@ -85,6 +85,8 @@ public:
OCUsageState getPrintState() { return printState; }
GBool getState() { return state; }
void setState(GBool stateA) { state = stateA; }
+ GBool getInViewUsageAppDict() { return inViewUsageAppDict; }
+ void setInViewUsageAppDict() { inViewUsageAppDict = gTrue; }
private:
@@ -96,6 +98,8 @@ private:
OCUsageState viewState, // suggested state when viewing
printState; // suggested state when printing
GBool state; // current state (on/off)
+ GBool inViewUsageAppDict; // true if this OCG is listed in a
+ // usage app dict with Event=View
friend class OCDisplayNode;
};
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/OutputDev.h b/Build/source/libs/xpdf/xpdf-src/xpdf/OutputDev.h
index bec419308a3..f53dab16a23 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/OutputDev.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/OutputDev.h
@@ -82,6 +82,7 @@ public:
virtual GBool needCharCount() { return gFalse; }
+
//----- initialization and control
// Set default transform matrix.
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PDF417Barcode.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/PDF417Barcode.cc
new file mode 100644
index 00000000000..0dd35ee4902
--- /dev/null
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PDF417Barcode.cc
@@ -0,0 +1,1916 @@
+//========================================================================
+//
+// PDF417Barcode.cc
+//
+// Copyright 2018 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <math.h>
+#include "gtypes.h"
+#include "GString.h"
+#include "GList.h"
+#include "Error.h"
+#include "PDF417Barcode.h"
+
+//------------------------------------------------------------------------
+
+#define maxDataCodewords 928
+#define maxErrorCorrectionLevel 8
+#define maxErrorCorrectionCodewords (1 << (maxErrorCorrectionLevel + 1))
+
+// mode latches
+#define textModeLatch 900
+#define byteModeLatchMult6 924
+#define byteModeLatchNonMult6 901
+#define byteModeShift 913
+#define numericModeLatch 902
+
+// text submode latches and shifts
+#define textAlphaLowerLatch 27
+#define textAlphaMixedLatch 28
+#define textAlphaPuncShift 29
+#define textLowerAlphaShift 27
+#define textLowerMixedLatch 28
+#define textLowerPuncShift 29
+#define textMixedPuncLatch 25
+#define textMixedLowerLatch 27
+#define textMixedAlphaLatch 28
+#define textMixedPuncShift 29
+#define textPuncAlphaLatch 29
+
+#define textSubmodeAlpha 0
+#define textSubmodeLower 1
+#define textSubmodeMixed 2
+#define textSubmodePunc 3
+#define textSubmodeAlphaShift 4
+#define textSubmodePuncShift 5
+
+// textCompaction[char][submode] = base-30 value
+// or 30 if char isn't available
+static char textCompaction[128][4] = {
+ { 30, 30, 30, 30 }, // 0
+ { 30, 30, 30, 30 }, // 1
+ { 30, 30, 30, 30 }, // 2
+ { 30, 30, 30, 30 }, // 3
+ { 30, 30, 30, 30 }, // 4
+ { 30, 30, 30, 30 }, // 5
+ { 30, 30, 30, 30 }, // 6
+ { 30, 30, 30, 30 }, // 7
+ { 30, 30, 30, 30 }, // 8
+ { 30, 30, 12, 12 }, // 9
+ { 30, 30, 30, 15 }, // 10
+ { 30, 30, 30, 30 }, // 11
+ { 30, 30, 30, 30 }, // 12
+ { 30, 30, 11, 11 }, // 13
+ { 30, 30, 30, 30 }, // 14
+ { 30, 30, 30, 30 }, // 15
+ { 30, 30, 30, 30 }, // 16
+ { 30, 30, 30, 30 }, // 17
+ { 30, 30, 30, 30 }, // 18
+ { 30, 30, 30, 30 }, // 19
+ { 30, 30, 30, 30 }, // 20
+ { 30, 30, 30, 30 }, // 21
+ { 30, 30, 30, 30 }, // 22
+ { 30, 30, 30, 30 }, // 23
+ { 30, 30, 30, 30 }, // 24
+ { 30, 30, 30, 30 }, // 25
+ { 30, 30, 30, 30 }, // 26
+ { 30, 30, 30, 30 }, // 27
+ { 30, 30, 30, 30 }, // 28
+ { 30, 30, 30, 30 }, // 29
+ { 30, 30, 30, 30 }, // 30
+ { 30, 30, 30, 30 }, // 31
+ { 26, 26, 26, 30 }, // 32
+ { 30, 30, 30, 10 }, // 33
+ { 30, 30, 30, 20 }, // 34
+ { 30, 30, 15, 30 }, // 35
+ { 30, 30, 18, 18 }, // 36
+ { 30, 30, 21, 30 }, // 37
+ { 30, 30, 10, 30 }, // 38
+ { 30, 30, 30, 28 }, // 39
+ { 30, 30, 30, 23 }, // 40
+ { 30, 30, 30, 24 }, // 41
+ { 30, 30, 22, 22 }, // 42
+ { 30, 30, 20, 30 }, // 43
+ { 30, 30, 13, 13 }, // 44
+ { 30, 30, 16, 16 }, // 45
+ { 30, 30, 17, 17 }, // 46
+ { 30, 30, 19, 19 }, // 47
+ { 30, 30, 0, 30 }, // 48
+ { 30, 30, 1, 30 }, // 49
+ { 30, 30, 2, 30 }, // 50
+ { 30, 30, 3, 30 }, // 51
+ { 30, 30, 4, 30 }, // 52
+ { 30, 30, 5, 30 }, // 53
+ { 30, 30, 6, 30 }, // 54
+ { 30, 30, 7, 30 }, // 55
+ { 30, 30, 8, 30 }, // 56
+ { 30, 30, 9, 30 }, // 57
+ { 30, 30, 14, 14 }, // 58
+ { 30, 30, 30, 0 }, // 59
+ { 30, 30, 30, 1 }, // 60
+ { 30, 30, 23, 30 }, // 61
+ { 30, 30, 30, 2 }, // 62
+ { 30, 30, 30, 25 }, // 63
+ { 30, 30, 30, 3 }, // 64
+ { 0, 30, 30, 30 }, // 65
+ { 1, 30, 30, 30 }, // 66
+ { 2, 30, 30, 30 }, // 67
+ { 3, 30, 30, 30 }, // 68
+ { 4, 30, 30, 30 }, // 69
+ { 5, 30, 30, 30 }, // 70
+ { 6, 30, 30, 30 }, // 71
+ { 7, 30, 30, 30 }, // 72
+ { 8, 30, 30, 30 }, // 73
+ { 9, 30, 30, 30 }, // 74
+ { 10, 30, 30, 30 }, // 75
+ { 11, 30, 30, 30 }, // 76
+ { 12, 30, 30, 30 }, // 77
+ { 13, 30, 30, 30 }, // 78
+ { 14, 30, 30, 30 }, // 79
+ { 15, 30, 30, 30 }, // 80
+ { 16, 30, 30, 30 }, // 81
+ { 17, 30, 30, 30 }, // 82
+ { 18, 30, 30, 30 }, // 83
+ { 19, 30, 30, 30 }, // 84
+ { 20, 30, 30, 30 }, // 85
+ { 21, 30, 30, 30 }, // 86
+ { 22, 30, 30, 30 }, // 87
+ { 23, 30, 30, 30 }, // 88
+ { 24, 30, 30, 30 }, // 89
+ { 25, 30, 30, 30 }, // 90
+ { 30, 30, 30, 4 }, // 91
+ { 30, 30, 30, 5 }, // 92
+ { 30, 30, 30, 6 }, // 93
+ { 30, 30, 24, 30 }, // 94
+ { 30, 30, 30, 7 }, // 95
+ { 30, 30, 30, 8 }, // 96
+ { 30, 0, 30, 30 }, // 97
+ { 30, 1, 30, 30 }, // 98
+ { 30, 2, 30, 30 }, // 30
+ { 30, 3, 30, 30 }, // 100
+ { 30, 4, 30, 30 }, // 101
+ { 30, 5, 30, 30 }, // 102
+ { 30, 6, 30, 30 }, // 103
+ { 30, 7, 30, 30 }, // 104
+ { 30, 8, 30, 30 }, // 105
+ { 30, 9, 30, 30 }, // 106
+ { 30, 10, 30, 30 }, // 107
+ { 30, 11, 30, 30 }, // 108
+ { 30, 12, 30, 30 }, // 109
+ { 30, 13, 30, 30 }, // 110
+ { 30, 14, 30, 30 }, // 111
+ { 30, 15, 30, 30 }, // 112
+ { 30, 16, 30, 30 }, // 113
+ { 30, 17, 30, 30 }, // 114
+ { 30, 18, 30, 30 }, // 115
+ { 30, 19, 30, 30 }, // 116
+ { 30, 20, 30, 30 }, // 117
+ { 30, 21, 30, 30 }, // 118
+ { 30, 22, 30, 30 }, // 119
+ { 30, 23, 30, 30 }, // 120
+ { 30, 24, 30, 30 }, // 121
+ { 30, 25, 30, 30 }, // 122
+ { 30, 30, 30, 26 }, // 123
+ { 30, 30, 30, 21 }, // 124
+ { 30, 30, 30, 27 }, // 125
+ { 30, 30, 30, 9 }, // 126
+ { 30, 30, 30, 30 } // 127
+};
+
+static int errorCorrectionCoeffLevel0[2] = {
+ 27, 917
+};
+
+static int errorCorrectionCoeffLevel1[4] = {
+ 522, 568, 723, 809
+};
+
+static int errorCorrectionCoeffLevel2[8] = {
+ 237, 308, 436, 284, 646, 653, 428, 379
+};
+
+static int errorCorrectionCoeffLevel3[16] = {
+ 274, 562, 232, 755, 599, 524, 801, 132,
+ 295, 116, 442, 428, 295, 42, 176, 65
+};
+
+static int errorCorrectionCoeffLevel4[32] = {
+ 361, 575, 922, 525, 176, 586, 640, 321,
+ 536, 742, 677, 742, 687, 284, 193, 517,
+ 273, 494, 263, 147, 593, 800, 571, 320,
+ 803, 133, 231, 390, 685, 330, 63, 410
+};
+
+static int errorCorrectionCoeffLevel5[64] = {
+ 539, 422, 6, 93, 862, 771, 453, 106,
+ 610, 287, 107, 505, 733, 877, 381, 612,
+ 723, 476, 462, 172, 430, 609, 858, 822,
+ 543, 376, 511, 400, 672, 762, 283, 184,
+ 440, 35, 519, 31, 460, 594, 225, 535,
+ 517, 352, 605, 158, 651, 201, 488, 502,
+ 648, 733, 717, 83, 404, 97, 280, 771,
+ 840, 629, 4, 381, 843, 623, 264, 543
+};
+
+static int errorCorrectionCoeffLevel6[128] = {
+ 521, 310, 864, 547, 858, 580, 296, 379,
+ 53, 779, 897, 444, 400, 925, 749, 415,
+ 822, 93, 217, 208, 928, 244, 583, 620,
+ 246, 148, 447, 631, 292, 908, 490, 704,
+ 516, 258, 457, 907, 594, 723, 674, 292,
+ 272, 96, 684, 432, 686, 606, 860, 569,
+ 193, 219, 129, 186, 236, 287, 192, 775,
+ 278, 173, 40, 379, 712, 463, 646, 776,
+ 171, 491, 297, 763, 156, 732, 95, 270,
+ 447, 90, 507, 48, 228, 821, 808, 898,
+ 784, 663, 627, 378, 382, 262, 380, 602,
+ 754, 336, 89, 614, 87, 432, 670, 616,
+ 157, 374, 242, 726, 600, 269, 375, 898,
+ 845, 454, 354, 130, 814, 587, 804, 34,
+ 211, 330, 539, 297, 827, 865, 37, 517,
+ 834, 315, 550, 86, 801, 4, 108, 539
+};
+
+static int errorCorrectionCoeffLevel7[256] = {
+ 524, 894, 75, 766, 882, 857, 74, 204,
+ 82, 586, 708, 250, 905, 786, 138, 720,
+ 858, 194, 311, 913, 275, 190, 375, 850,
+ 438, 733, 194, 280, 201, 280, 828, 757,
+ 710, 814, 919, 89, 68, 569, 11, 204,
+ 796, 605, 540, 913, 801, 700, 799, 137,
+ 439, 418, 592, 668, 353, 859, 370, 694,
+ 325, 240, 216, 257, 284, 549, 209, 884,
+ 315, 70, 329, 793, 490, 274, 877, 162,
+ 749, 812, 684, 461, 334, 376, 849, 521,
+ 307, 291, 803, 712, 19, 358, 399, 908,
+ 103, 511, 51, 8, 517, 225, 289, 470,
+ 637, 731, 66, 255, 917, 269, 463, 830,
+ 730, 433, 848, 585, 136, 538, 906, 90,
+ 2, 290, 743, 199, 655, 903, 329, 49,
+ 802, 580, 355, 588, 188, 462, 10, 134,
+ 628, 320, 479, 130, 739, 71, 263, 318,
+ 374, 601, 192, 605, 142, 673, 687, 234,
+ 722, 384, 177, 752, 607, 640, 455, 193,
+ 689, 707, 805, 641, 48, 60, 732, 621,
+ 895, 544, 261, 852, 655, 309, 697, 755,
+ 756, 60, 231, 773, 434, 421, 726, 528,
+ 503, 118, 49, 795, 32, 144, 500, 238,
+ 836, 394, 280, 566, 319, 9, 647, 550,
+ 73, 914, 342, 126, 32, 681, 331, 792,
+ 620, 60, 609, 441, 180, 791, 893, 754,
+ 605, 383, 228, 749, 760, 213, 54, 297,
+ 134, 54, 834, 299, 922, 191, 910, 532,
+ 609, 829, 189, 20, 167, 29, 872, 449,
+ 83, 402, 41, 656, 505, 579, 481, 173,
+ 404, 251, 688, 95, 497, 555, 642, 543,
+ 307, 159, 924, 558, 648, 55, 497, 10
+};
+
+static int errorCorrectionCoeffLevel8[512] = {
+ 352, 77, 373, 504, 35, 599, 428, 207,
+ 409, 574, 118, 498, 285, 380, 350, 492,
+ 197, 265, 920, 155, 914, 299, 229, 643,
+ 294, 871, 306, 88, 87, 193, 352, 781,
+ 846, 75, 327, 520, 435, 543, 203, 666,
+ 249, 346, 781, 621, 640, 268, 794, 534,
+ 539, 781, 408, 390, 644, 102, 476, 499,
+ 290, 632, 545, 37, 858, 916, 552, 41,
+ 542, 289, 122, 272, 383, 800, 485, 98,
+ 752, 472, 761, 107, 784, 860, 658, 741,
+ 290, 204, 681, 407, 855, 85, 99, 62,
+ 482, 180, 20, 297, 451, 593, 913, 142,
+ 808, 684, 287, 536, 561, 76, 653, 899,
+ 729, 567, 744, 390, 513, 192, 516, 258,
+ 240, 518, 794, 395, 768, 848, 51, 610,
+ 384, 168, 190, 826, 328, 596, 786, 303,
+ 570, 381, 415, 641, 156, 237, 151, 429,
+ 531, 207, 676, 710, 89, 168, 304, 402,
+ 40, 708, 575, 162, 864, 229, 65, 861,
+ 841, 512, 164, 477, 221, 92, 358, 785,
+ 288, 357, 850, 836, 827, 736, 707, 94,
+ 8, 494, 114, 521, 2, 499, 851, 543,
+ 152, 729, 771, 95, 248, 361, 578, 323,
+ 856, 797, 289, 51, 684, 466, 533, 820,
+ 669, 45, 902, 452, 167, 342, 244, 173,
+ 35, 463, 651, 51, 699, 591, 452, 578,
+ 37, 124, 298, 332, 552, 43, 427, 119,
+ 662, 777, 475, 850, 764, 364, 578, 911,
+ 283, 711, 472, 420, 245, 288, 594, 394,
+ 511, 327, 589, 777, 699, 688, 43, 408,
+ 842, 383, 721, 521, 560, 644, 714, 559,
+ 62, 145, 873, 663, 713, 159, 672, 729,
+ 624, 59, 193, 417, 158, 209, 563, 564,
+ 343, 693, 109, 608, 563, 365, 181, 772,
+ 677, 310, 248, 353, 708, 410, 579, 870,
+ 617, 841, 632, 860, 289, 536, 35, 777,
+ 618, 586, 424, 833, 77, 597, 346, 269,
+ 757, 632, 695, 751, 331, 247, 184, 45,
+ 787, 680, 18, 66, 407, 369, 54, 492,
+ 228, 613, 830, 922, 437, 519, 644, 905,
+ 789, 420, 305, 441, 207, 300, 892, 827,
+ 141, 537, 381, 662, 513, 56, 252, 341,
+ 242, 797, 838, 837, 720, 224, 307, 631,
+ 61, 87, 560, 310, 756, 665, 397, 808,
+ 851, 309, 473, 795, 378, 31, 647, 915,
+ 459, 806, 590, 731, 425, 216, 548, 249,
+ 321, 881, 699, 535, 673, 782, 210, 815,
+ 905, 303, 843, 922, 281, 73, 469, 791,
+ 660, 162, 498, 308, 155, 422, 907, 817,
+ 187, 62, 16, 425, 535, 336, 286, 437,
+ 375, 273, 610, 296, 183, 923, 116, 667,
+ 751, 353, 62, 366, 691, 379, 687, 842,
+ 37, 357, 720, 742, 330, 5, 39, 923,
+ 311, 424, 242, 749, 321, 54, 669, 316,
+ 342, 299, 534, 105, 667, 488, 640, 672,
+ 576, 540, 316, 486, 721, 610, 46, 656,
+ 447, 171, 616, 464, 190, 531, 297, 321,
+ 762, 752, 533, 175, 134, 14, 381, 433,
+ 717, 45, 111, 20, 596, 284, 736, 138,
+ 646, 411, 877, 669, 141, 919, 45, 780,
+ 407, 164, 332, 899, 165, 726, 600, 325,
+ 498, 655, 357, 752, 768, 223, 849, 647,
+ 63, 310, 863, 251, 366, 304, 282, 738,
+ 675, 410, 389, 244, 31, 121, 303, 263
+};
+
+static int *errorCorrectionCoeff[maxErrorCorrectionLevel + 1] = {
+ errorCorrectionCoeffLevel0,
+ errorCorrectionCoeffLevel1,
+ errorCorrectionCoeffLevel2,
+ errorCorrectionCoeffLevel3,
+ errorCorrectionCoeffLevel4,
+ errorCorrectionCoeffLevel5,
+ errorCorrectionCoeffLevel6,
+ errorCorrectionCoeffLevel7,
+ errorCorrectionCoeffLevel8
+};
+
+#define startPatternLength 8
+static char startPattern[startPatternLength] = {8,1,1,1,1,1,1,3};
+
+#define stopPatternLength 9
+static char stopPattern[stopPatternLength] = {7,1,1,3,1,1,1,2,1};
+
+#define patternLength 8
+
+// patterns[codeword][cluster][element] = element (bar or space) width
+static char patterns[929][3][patternLength] = {
+ {{3,1,1,1,1,1,3,6}, {5,1,1,1,1,1,2,5}, {2,1,1,1,1,1,5,5}},
+ {{4,1,1,1,1,1,4,4}, {6,1,1,1,1,1,3,3}, {3,1,1,1,1,1,6,3}},
+ {{5,1,1,1,1,1,5,2}, {4,1,1,1,1,2,1,6}, {1,1,1,1,1,2,4,6}},
+ {{3,1,1,1,1,2,3,5}, {5,1,1,1,1,2,2,4}, {2,1,1,1,1,2,5,4}},
+ {{4,1,1,1,1,2,4,3}, {6,1,1,1,1,2,3,2}, {3,1,1,1,1,2,6,2}},
+ {{5,1,1,1,1,2,5,1}, {4,1,1,1,1,3,1,5}, {1,1,1,1,1,3,4,5}},
+ {{2,1,1,1,1,3,2,6}, {5,1,1,1,1,3,2,3}, {2,1,1,1,1,3,5,3}},
+ {{3,1,1,1,1,3,3,4}, {6,1,1,1,1,3,3,1}, {3,1,1,1,1,3,6,1}},
+ {{2,1,1,1,1,4,2,5}, {4,1,1,1,1,4,1,4}, {1,1,1,1,1,4,4,4}},
+ {{1,1,1,1,1,5,1,6}, {5,1,1,1,1,4,2,2}, {2,1,1,1,1,4,5,2}},
+ {{2,1,1,1,1,5,2,4}, {4,1,1,1,1,5,1,3}, {1,1,1,1,1,5,4,3}},
+ {{1,1,1,1,1,6,1,5}, {5,1,1,1,1,5,2,1}, {6,1,1,1,2,1,1,4}},
+ {{2,1,1,1,2,1,3,6}, {4,1,1,1,1,6,1,2}, {1,1,1,1,2,1,5,5}},
+ {{3,1,1,1,2,1,4,4}, {4,1,1,1,2,1,2,5}, {2,1,1,1,2,1,6,3}},
+ {{4,1,1,1,2,1,5,2}, {5,1,1,1,2,1,3,3}, {6,1,1,1,2,2,1,3}},
+ {{2,1,1,1,2,2,3,5}, {6,1,1,1,2,1,4,1}, {1,1,1,1,2,2,5,4}},
+ {{3,1,1,1,2,2,4,3}, {3,1,1,1,2,2,1,6}, {2,1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,3,1,1,1,2}, {1,1,6,3,1,2,2,1}, {2,5,4,1,1,1,2,1}},
+ {{3,2,4,2,2,1,1,2}, {1,4,4,1,1,1,4,1}, {1,5,4,1,1,2,1,2}},
+ {{3,3,3,3,1,2,1,1}, {1,3,5,1,1,1,3,2}, {1,5,4,1,1,3,1,1}},
+ {{3,1,5,1,3,1,1,2}, {1,3,5,1,1,2,3,1}, {1,6,3,2,1,1,2,1}},
+ {{3,2,4,2,2,2,1,1}, {1,2,6,1,1,1,2,3}, {1,5,4,1,2,1,2,1}},
+ {{3,1,5,1,3,2,1,1}, {2,2,6,1,1,1,3,1}, {2,4,5,1,1,1,1,2}},
+ {{2,4,2,4,1,1,1,2}, {1,2,6,1,1,2,2,2}, {2,4,5,1,1,2,1,1}},
+ {{2,3,3,3,2,1,1,2}, {1,2,6,1,1,3,2,1}, {1,5,4,2,1,1,1,2}},
+ {{2,4,2,4,1,2,1,1}, {1,3,5,2,1,1,3,1}, {1,4,5,1,2,1,1,2}},
+ {{2,2,4,2,3,1,1,2}, {1,2,6,1,2,1,3,1}, {1,5,4,2,1,2,1,1}},
+ {{2,3,3,3,2,2,1,1}, {1,2,6,2,1,1,2,2}, {1,4,5,1,2,2,1,1}},
+ {{2,1,5,1,4,1,1,2}, {1,2,6,2,1,2,2,1}, {3,3,6,1,1,1,1,1}}
+};
+
+//------------------------------------------------------------------------
+
+static int makeDataCodewords(GString *value, int *codewords);
+static int countNumeric(GString *value, int start);
+static int countText(GString *value, int start);
+static int countBinary(GString *value, int start);
+static GBool makeNumericCodewords(GString *value, int start, int n,
+ int *codewords, int &codewordIdx);
+static int divMod900(int *d, int n);
+static GBool makeByteCodewords(GString *value, int start, int n,
+ int *codewords, int &codewordIdx);
+static GBool makeTextCodewords(GString *value, int start, int n,
+ int *codewords, int &codewordIdx);
+static GBool appendTextHalfSymbol(int *codewords, int &codewordIdx,
+ int halfSymbol, int &prevHalfSymbol);
+static GBool appendDataCodeword(int *codewords, int &codewordIdx,
+ int codeword);
+static void makeErrorCorrectionCodewords(int errorCorrectionLevel,
+ int *codewords, int length);
+static void drawBarcode(int *codewords, int totalLength,
+ int nRows, int nCols,
+ int errorCorrectionLevel,
+ double moduleWidth, double moduleHeight,
+ double fieldWidth, double fieldHeight,
+ GString *appearBuf);
+static void drawPattern(int &x, int y, char *pattern, int length,
+ GString *appearBuf);
+
+//------------------------------------------------------------------------
+
+GBool drawPDF417Barcode(double fieldWidth, double fieldHeight,
+ double moduleWidth, double moduleHeight,
+ int errorCorrectionLevel, GString *value,
+ GString *appearBuf) {
+ int codewords[maxDataCodewords + maxErrorCorrectionCodewords];
+
+ if (moduleWidth <= 0 || moduleHeight <= 0) {
+ error(errSyntaxError, -1, "Invalid module size in PDF417 barcode");
+ return gFalse;
+ }
+
+ // each row contains:
+ // - left quiet zone (2 modules, minimum)
+ // - start code (17 modules)
+ // - left row indicator (17 modules)
+ // - nCols codewords (17 modules each)
+ // - right row indicator (17 modules)
+ // - stop code (18 modules)
+ // - right quiet zone (2 modules, minimum)
+ // total = 73 + nCols * 17
+ int nCols = (int)floor((fieldWidth / moduleWidth - 73) / 17);
+ if (nCols < 1) {
+ error(errSyntaxError, -1, "Invalid field size for PDF417 barcode");
+ return gFalse;
+ }
+ if (nCols > 30) {
+ nCols = 30;
+ }
+
+ int nDataCodewords = makeDataCodewords(value, codewords);
+ if (nDataCodewords == maxDataCodewords) {
+ error(errSyntaxError, -1, "Too many codewords in PDF417 barcode");
+ return gFalse;
+ }
+
+ int nErrorCorrectionCodewords = 1 << (errorCorrectionLevel + 1);
+
+ // total codewords = 1 + nDataCodewords + nPadCodewords
+ // + nErrorCorrectionCodewords
+ int nRows = (1 + nDataCodewords + nErrorCorrectionCodewords + (nCols - 1))
+ / nCols;
+ if (nRows < 3) {
+ nRows = 3;
+ }
+ if (nRows > 90) {
+ error(errSyntaxError, -1, "Too many rows in PDF417 barcode");
+ return gFalse;
+ }
+ int nPadCodewords = nRows * nCols
+ - (1 + nDataCodewords + nErrorCorrectionCodewords);
+ int length = 1 + nDataCodewords + nPadCodewords;
+ if (length > maxDataCodewords) {
+ error(errSyntaxError, -1, "Too many codewords in PDF417 barcode");
+ return gFalse;
+ }
+ codewords[0] = length;
+ for (int i = 1 + nDataCodewords; i < length; ++i) {
+ codewords[i] = 900;
+ }
+
+ makeErrorCorrectionCodewords(errorCorrectionLevel, codewords, length);
+
+ // we need at least 3 modules of vertical quiet space above and below
+ // (the spec says 2, but Adobe seems to use 3)
+ if (nRows * moduleHeight + 6 * moduleWidth > fieldHeight) {
+ error(errSyntaxError, -1, "Too many rows in PDF417 barcode");
+ return gFalse;
+ }
+
+ // Adobe adjusts the module height to fill the available space
+ double moduleHeight2 = (fieldHeight - 6 * moduleWidth) / nRows;
+
+ drawBarcode(codewords, length + nErrorCorrectionCodewords,
+ nRows, nCols, errorCorrectionLevel,
+ moduleWidth, moduleHeight2, fieldWidth, fieldHeight,
+ appearBuf);
+
+ return gTrue;
+}
+
+// Generate up to maxDataCodewords-1 codewords in codewords[1 .. m],
+// leaving codewords[0] unused. Returns the number of generated
+// codewords (m), or maxDataCodewords if there are too many to fit.
+static int makeDataCodewords(GString *value, int *codewords) {
+ GBool textMode = gTrue;
+ int codewordIdx = 1;
+ int valueIdx = 0;
+ while (valueIdx < value->getLength()) {
+
+ int nNumeric = countNumeric(value, valueIdx);
+ if (nNumeric >= 13) {
+ if (!appendDataCodeword(codewords, codewordIdx, numericModeLatch) ||
+ !makeNumericCodewords(value, valueIdx, nNumeric,
+ codewords, codewordIdx)) {
+ return maxDataCodewords;
+ }
+ valueIdx += nNumeric;
+ textMode = gFalse;
+
+ } else {
+ int nText = countText(value, valueIdx);
+ if (nText >= 5) {
+ if (!textMode) {
+ if (!appendDataCodeword(codewords, codewordIdx, textModeLatch)) {
+ return maxDataCodewords;
+ }
+ }
+ if (!makeTextCodewords(value, valueIdx, nText,
+ codewords, codewordIdx)) {
+ return maxDataCodewords;
+ }
+ valueIdx += nText;
+ textMode = gTrue;
+
+ } else {
+ int nBinary = countBinary(value, valueIdx);
+ //~ this doesn't currently use byte mode shift when nBinary==1
+ //~ because we don't track the text submode (which is needed
+ //~ because we'll return to that submode after the byte shift)
+ int code = (nBinary % 6 == 0) ? byteModeLatchMult6
+ : byteModeLatchNonMult6;
+ if (!appendDataCodeword(codewords, codewordIdx, code) ||
+ !makeByteCodewords(value, valueIdx, nBinary,
+ codewords, codewordIdx)) {
+ return maxDataCodewords;
+ }
+ valueIdx += nBinary;
+ textMode = gFalse;
+ }
+ }
+ }
+
+ return codewordIdx - 1;
+}
+
+static int countNumeric(GString *value, int start) {
+ int n = 0;
+ for (int i = start; i < value->getLength(); ++i) {
+ char c = value->getChar(i);
+ if (!(c >= '0' && c <= '9')) {
+ break;
+ }
+ ++n;
+ }
+ return n;
+}
+
+static int countText(GString *value, int start) {
+ int n = 0;
+ for (int i = start; i < value->getLength(); ++i) {
+ char c = value->getChar(i);
+ if ((c & 0x80) ||
+ (textCompaction[(int)c][0] == 30 &&
+ textCompaction[(int)c][1] == 30 &&
+ textCompaction[(int)c][2] == 30 &&
+ textCompaction[(int)c][3] == 30) ||
+ countNumeric(value, i) >= 13) {
+ break;
+ }
+ ++n;
+ }
+ return n;
+}
+
+static int countBinary(GString *value, int start) {
+ int n = 0;
+ for (int i = start; i < value->getLength(); ++i) {
+ if (countNumeric(value, i) >= 13 ||
+ countText(value, i) >= 5) {
+ break;
+ }
+ ++n;
+ }
+ return n;
+}
+
+static GBool makeNumericCodewords(GString *value, int start, int n,
+ int *codewords, int &codewordIdx) {
+ for (int i = 0; i < n; i += 44) {
+ int nInDigits = n - i;
+ if (nInDigits > 44) {
+ nInDigits = 44;
+ }
+ int inDigits[45];
+ inDigits[0] = 1;
+ for (int j = 0; j < nInDigits; ++j) {
+ inDigits[j+1] = value->getChar(start + i + j) - '0';
+ }
+ int nOutDigits = 1 + nInDigits / 3;
+ int outDigits[15];
+ for (int j = 0; j < nOutDigits; ++j) {
+ outDigits[nOutDigits - 1 - j] = divMod900(inDigits, nInDigits + 1);
+ }
+ for (int j = 0; j < nOutDigits; ++j) {
+ if (!appendDataCodeword(codewords, codewordIdx, outDigits[j])) {
+ return gFalse;
+ }
+ }
+ }
+ return gTrue;
+}
+
+// Given x = sum(i = 0..n-1, d[i] * 10^(n-1-i))
+// Compute x' = x / 900 and return x % 900.
+static int divMod900(int *d, int n) {
+ int r = 0;
+ for (int i = 0; i < n; ++i) {
+ int dd = r * 10 + d[i];
+ d[i] = dd / 900;
+ r = dd % 900;
+ }
+ return r;
+}
+
+static GBool makeByteCodewords(GString *value, int start, int n,
+ int *codewords, int &codewordIdx) {
+ int i;
+ for (i = 0; i <= n - 6; i += 6) {
+ long long in = 0;
+ for (int j = 0; j < 6; ++j) {
+ in = (in << 8) | (value->getChar(start + i + j) & 0xff);
+ }
+ int outCodes[5];
+ for (int j = 4; j >= 0; --j) {
+ outCodes[j] = (int)(in % 900);
+ in /= 900;
+ }
+ for (int j = 0; j < 4; ++j) {
+ if (!appendDataCodeword(codewords, codewordIdx, outCodes[j])) {
+ return gFalse;
+ }
+ }
+ }
+ for (; i < n; ++i) {
+ if (!appendDataCodeword(codewords, codewordIdx,
+ value->getChar(start + i) & 0xff)) {
+ return gFalse;
+ }
+ }
+ return gTrue;
+}
+
+static GBool makeTextCodewords(GString *value, int start, int n,
+ int *codewords, int &codewordIdx) {
+ int submode = textSubmodeAlpha;
+ int prevSubmode = textSubmodeAlpha;
+ int nextSubmode;
+ int prevHalfSymbol = 30;
+ int valueIdx = start;
+ while (valueIdx < start + n) {
+ int c = value->getChar(valueIdx) & 0x7f;
+ nextSubmode = submode;
+ switch (submode) {
+ case textSubmodeAlpha:
+ if (textCompaction[c][textSubmodeAlpha] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textCompaction[c][textSubmodeAlpha],
+ prevHalfSymbol)) {
+ return gFalse;
+ }
+ ++valueIdx;
+ } else if (textCompaction[c][textSubmodeLower] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textAlphaLowerLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodeLower;
+ } else if (textCompaction[c][textSubmodeMixed] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textAlphaMixedLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodeMixed;
+ } else if (textCompaction[c][textSubmodePunc] < 30) {
+ if (valueIdx < start + n - 2 &&
+ textCompaction[value->getChar(valueIdx + 1) & 0x7f]
+ [textSubmodePunc] < 30 &&
+ textCompaction[value->getChar(valueIdx + 2) & 0x7f]
+ [textSubmodePunc] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textAlphaMixedLatch, prevHalfSymbol) ||
+ !appendTextHalfSymbol(codewords, codewordIdx,
+ textMixedPuncLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodePunc;
+ } else {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textAlphaPuncShift, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodePuncShift;
+ }
+ } else {
+ // this shouldn't happen
+ ++valueIdx;
+ }
+ break;
+ case textSubmodeAlphaShift:
+ if (textCompaction[c][textSubmodeAlpha] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textCompaction[c][textSubmodeAlpha],
+ prevHalfSymbol)) {
+ return gFalse;
+ }
+ ++valueIdx;
+ } else {
+ // this shouldn't happen
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ 0, prevHalfSymbol)) {
+ return gFalse;
+ }
+ }
+ nextSubmode = prevSubmode;
+ break;
+ case textSubmodeLower:
+ if (textCompaction[c][textSubmodeAlpha] < 30) {
+ if (valueIdx < start + n - 2 &&
+ textCompaction[value->getChar(valueIdx + 1) & 0x7f]
+ [textSubmodeAlpha] < 30 &&
+ textCompaction[value->getChar(valueIdx + 2) & 0x7f]
+ [textSubmodeAlpha] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textLowerMixedLatch, prevHalfSymbol) ||
+ !appendTextHalfSymbol(codewords, codewordIdx,
+ textMixedAlphaLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodeAlpha;
+ } else {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textLowerAlphaShift, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodeAlphaShift;
+ }
+ } else if (textCompaction[c][textSubmodeLower] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textCompaction[c][textSubmodeLower],
+ prevHalfSymbol)) {
+ return gFalse;
+ }
+ ++valueIdx;
+ } else if (textCompaction[c][textSubmodeMixed] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textLowerMixedLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodeMixed;
+ } else if (textCompaction[c][textSubmodePunc] < 30) {
+ if (valueIdx < start + n - 2 &&
+ textCompaction[value->getChar(valueIdx + 1) & 0x7f]
+ [textSubmodePunc] < 30 &&
+ textCompaction[value->getChar(valueIdx + 2) & 0x7f]
+ [textSubmodePunc] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textLowerMixedLatch, prevHalfSymbol) ||
+ !appendTextHalfSymbol(codewords, codewordIdx,
+ textMixedPuncLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodePunc;
+ } else {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textLowerPuncShift, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodePuncShift;
+ }
+ } else {
+ // this shouldn't happen
+ ++valueIdx;
+ }
+ break;
+ case textSubmodeMixed:
+ if (textCompaction[c][textSubmodeAlpha] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textMixedAlphaLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodeAlpha;
+ } else if (textCompaction[c][textSubmodeLower] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textMixedLowerLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodeLower;
+ } else if (textCompaction[c][textSubmodeMixed] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textCompaction[c][textSubmodeMixed],
+ prevHalfSymbol)) {
+ return gFalse;
+ }
+ ++valueIdx;
+ } else if (textCompaction[c][textSubmodePunc] < 30) {
+ if (valueIdx < start + n - 1 &&
+ textCompaction[value->getChar(valueIdx + 1) & 0x7f]
+ [textSubmodePunc] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textMixedPuncLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodePunc;
+ } else {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textMixedPuncShift, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodePuncShift;
+ }
+ } else {
+ // this shouldn't happen
+ ++valueIdx;
+ }
+ break;
+ case textSubmodePunc:
+ if (textCompaction[c][textSubmodeAlpha] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textPuncAlphaLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodeAlpha;
+ } else if (textCompaction[c][textSubmodeLower] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textPuncAlphaLatch, prevHalfSymbol) ||
+ !appendTextHalfSymbol(codewords, codewordIdx,
+ textAlphaLowerLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodeLower;
+ } else if (textCompaction[c][textSubmodeMixed] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textPuncAlphaLatch, prevHalfSymbol) ||
+ !appendTextHalfSymbol(codewords, codewordIdx,
+ textAlphaMixedLatch, prevHalfSymbol)) {
+ return gFalse;
+ }
+ nextSubmode = textSubmodeMixed;
+ } else if (textCompaction[c][textSubmodePunc] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textCompaction[c][textSubmodePunc],
+ prevHalfSymbol)) {
+ return gFalse;
+ }
+ ++valueIdx;
+ } else {
+ // this shouldn't happen
+ ++valueIdx;
+ }
+ break;
+ case textSubmodePuncShift:
+ if (textCompaction[c][textSubmodePunc] < 30) {
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ textCompaction[c][textSubmodePunc],
+ prevHalfSymbol)) {
+ return gFalse;
+ }
+ ++valueIdx;
+ } else {
+ // this shouldn't happen
+ if (!appendTextHalfSymbol(codewords, codewordIdx,
+ 0, prevHalfSymbol)) {
+ return gFalse;
+ }
+ }
+ nextSubmode = prevSubmode;
+ break;
+ }
+ prevSubmode = submode;
+ submode = nextSubmode;
+ }
+
+ // padding
+ if (prevHalfSymbol < 30) {
+ appendTextHalfSymbol(codewords, codewordIdx, 29, prevHalfSymbol);
+ }
+
+ return gTrue;
+}
+
+static GBool appendTextHalfSymbol(int *codewords, int &codewordIdx,
+ int halfSymbol, int &prevHalfSymbol) {
+ if (prevHalfSymbol == 30) {
+ prevHalfSymbol = halfSymbol;
+ } else {
+ int codeword = prevHalfSymbol * 30 + halfSymbol;
+ if (!appendDataCodeword(codewords, codewordIdx, codeword)) {
+ return gFalse;
+ }
+ prevHalfSymbol = 30;
+ }
+ return gTrue;
+}
+
+static GBool appendDataCodeword(int *codewords, int &codewordIdx,
+ int codeword) {
+ if (codewordIdx >= maxDataCodewords) {
+ return gFalse;
+ }
+ codewords[codewordIdx++] = codeword;
+ return gTrue;
+}
+
+// Compute the error correction codewords and add to codewords[].
+static void makeErrorCorrectionCodewords(int errorCorrectionLevel,
+ int *codewords, int length) {
+ int e[1 << (maxErrorCorrectionLevel + 1)];
+ int k = 1 << (errorCorrectionLevel + 1);
+ for (int i = 0; i < k; ++i) {
+ e[i] = 0;
+ }
+ for (int i = 0; i < length; ++i) {
+ int t1 = (codewords[i] + e[k-1]) % 929;
+ int t2, t3;
+ for (int j = k-1; j >= 1; --j) {
+ t2 = (t1 * errorCorrectionCoeff[errorCorrectionLevel][j]) % 929;
+ t3 = 929 - t2;
+ e[j] = (e[j-1] + t3) % 929;
+ }
+ t2 = (t1 * errorCorrectionCoeff[errorCorrectionLevel][0]) % 929;
+ t3 = 929 - t2;
+ e[0] = t3 % 929;
+ }
+ int j = length;
+ for (int i = k-1; i >= 0; --i) {
+ int ee = e[i] ? (929 - e[i]) : 0;
+ codewords[j++] = ee;
+ }
+}
+
+// Draw the barcode in the rectangle (0, 0, fieldWidth, fieldHeight).
+static void drawBarcode(int *codewords, int totalLength,
+ int nRows, int nCols,
+ int errorCorrectionLevel,
+ double moduleWidth, double moduleHeight,
+ double fieldWidth, double fieldHeight,
+ GString *appearBuf) {
+ double w = (73 + nCols * 17) * moduleWidth;
+ double h = nRows * moduleHeight;
+ double x0 = 0.5 * (fieldWidth - w);
+ double y0 = 0.5 * (fieldHeight - h);
+
+ appearBuf->append("0 g q\n");
+ appearBuf->appendf("{0:.4f} 0 0 {1:.4f} {2:.4f} {3:.4f} cm\n",
+ moduleWidth, moduleHeight, x0, y0);
+
+ int i = 0;
+ for (int row = 0; row < nRows; ++row) {
+ int cluster = row % 3;
+ int y = nRows - 1 - row;
+ int left = 0;
+ int right = 0;
+ switch (cluster) {
+ case 0:
+ left = 30 * (row / 3) + (nRows - 1) / 3;
+ right = 30 * (row / 3) + (nCols - 1);
+ break;
+ case 1:
+ left = 30 * (row / 3) + (errorCorrectionLevel * 3) + (nRows - 1) % 3;
+ right = 30 * (row / 3) + (nRows - 1) / 3;
+ break;
+ case 2:
+ left = 30 * (row / 3) + (nCols - 1);
+ right = 30 * (row / 3) + (errorCorrectionLevel * 3) + (nRows - 1) % 3;
+ break;
+ }
+ int x = 0;
+ drawPattern(x, y, startPattern, startPatternLength, appearBuf);
+ drawPattern(x, y, patterns[left][cluster], patternLength, appearBuf);
+ for (int col = 0; col < nCols; ++col) {
+ drawPattern(x, y, patterns[codewords[i]][cluster], patternLength,
+ appearBuf);
+ ++i;
+ }
+ drawPattern(x, y, patterns[right][cluster], patternLength, appearBuf);
+ drawPattern(x, y, stopPattern, stopPatternLength, appearBuf);
+ }
+
+ appearBuf->append("Q\n");
+}
+
+static void drawPattern(int &x, int y, char *pattern, int length,
+ GString *appearBuf) {
+ for (int i = 0; i < length; ++i) {
+ if (!(i & 1)) {
+ appearBuf->appendf("{0:d} {1:d} {2:d} 1 re f\n", x, y, pattern[i]);
+ }
+ x += pattern[i];
+ }
+}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PDF417Barcode.h b/Build/source/libs/xpdf/xpdf-src/xpdf/PDF417Barcode.h
new file mode 100644
index 00000000000..8166865280b
--- /dev/null
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PDF417Barcode.h
@@ -0,0 +1,32 @@
+//========================================================================
+//
+// PDF417Barcode.h
+//
+// Copyright 2018 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef PDF417BARCODE_H
+#define PDF417BARCODE_H
+
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+class GString;
+
+// Draw a PDF417 barcode:
+// fieldWidth, fieldHeight = field size (in points)
+// moduleWidth, moduleHeight = requested module size (in points)
+// errorCorrectionLevel = 0 .. 8
+// value = byte string
+// output is appended to appearBuf
+// Returns true on success, false on error.
+extern GBool drawPDF417Barcode(double fieldWidth, double fieldHeight,
+ double moduleWidth, double moduleHeight,
+ int errorCorrectionLevel, GString *value,
+ GString *appearBuf);
+
+#endif
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PDFCore.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/PDFCore.cc
index de411537a66..53ec6634bc6 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/PDFCore.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PDFCore.cc
@@ -673,25 +673,23 @@ void PDFCore::scrollToRightEdge() {
}
void PDFCore::scrollToTopEdge() {
- scrollTo(state->getScrollX(), tileMap->getPageTopY(tileMap->getFirstPage()));
+ scrollTo(state->getScrollX(),
+ tileMap->getPageTopY(tileMap->getFirstPage()));
}
void PDFCore::scrollToBottomEdge() {
- int horizMax, vertMax;
-
- tileMap->getScrollLimits(&horizMax, &vertMax);
- scrollTo(state->getScrollX(), vertMax - state->getWinH());
+ scrollTo(state->getScrollX(),
+ tileMap->getPageBottomY(tileMap->getLastPage()));
}
void PDFCore::scrollToTopLeft() {
- scrollTo(0, tileMap->getPageTopY(tileMap->getFirstPage()));
+ scrollTo(tileMap->getPageLeftX(tileMap->getFirstPage()),
+ tileMap->getPageTopY(tileMap->getFirstPage()));
}
void PDFCore::scrollToBottomRight() {
- int horizMax, vertMax;
-
- tileMap->getScrollLimits(&horizMax, &vertMax);
- scrollTo(horizMax - state->getWinW(), vertMax - state->getWinH());
+ scrollTo(tileMap->getPageRightX(tileMap->getLastPage()),
+ tileMap->getPageBottomY(tileMap->getLastPage()));
}
void PDFCore::setZoom(double zoom) {
@@ -899,6 +897,10 @@ void PDFCore::setSelectMode(SelectMode mode) {
}
}
+SplashColorPtr PDFCore::getSelectionColor() {
+ return state->getSelectColor();
+}
+
void PDFCore::setSelectionColor(SplashColor color) {
int wx0, wy0, wx1, wy1;
@@ -1648,6 +1650,11 @@ FormField *PDFCore::getFormField(int idx) {
return doc->getCatalog()->getForm()->getField(idx);
}
+GBool PDFCore::overText(int pg, double x, double y) {
+ loadText(pg);
+ return text->checkPointInside(x, y);
+}
+
void PDFCore::forceRedraw() {
startUpdate();
state->forceRedraw();
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PDFCore.h b/Build/source/libs/xpdf/xpdf-src/xpdf/PDFCore.h
index bb327318a4b..056a6c1432e 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/PDFCore.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PDFCore.h
@@ -164,6 +164,7 @@ public:
void setSelectMode(SelectMode mode);
// Selection color.
+ SplashColorPtr getSelectionColor();
void setSelectionColor(SplashColor color);
// Modify the selection. These functions use device coordinates.
@@ -242,6 +243,7 @@ public:
FormField *findFormField(int pg, double x, double y);
int findFormFieldIdx(int pg, double x, double y);
FormField *getFormField(int idx);
+ GBool overText(int pg, double x, double y);
void forceRedraw();
void setTileDoneCbk(void (*cbk)(void *data), void *data);
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.cc
index 119f3abac4d..ce73e517bac 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.cc
@@ -34,6 +34,7 @@
#include "Lexer.h"
#include "Parser.h"
#include "SecurityHandler.h"
+#include "UTF8.h"
#ifndef DISABLE_OUTLINE
#include "Outline.h"
#endif
@@ -57,19 +58,7 @@ PDFDoc::PDFDoc(GString *fileNameA, GString *ownerPassword,
int n, i;
#endif
- ok = gFalse;
- errCode = errNone;
-
- core = coreA;
-
- file = NULL;
- str = NULL;
- xref = NULL;
- catalog = NULL;
-#ifndef DISABLE_OUTLINE
- outline = NULL;
-#endif
- optContent = NULL;
+ init(coreA);
fileName = fileNameA;
#ifdef _WIN32
@@ -122,19 +111,7 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GString *ownerPassword,
Object obj;
int i;
- ok = gFalse;
- errCode = errNone;
-
- core = coreA;
-
- file = NULL;
- str = NULL;
- xref = NULL;
- catalog = NULL;
-#ifndef DISABLE_OUTLINE
- outline = NULL;
-#endif
- optContent = NULL;
+ init(coreA);
// save both Unicode and 8-bit copies of the file name
fileName = new GString();
@@ -147,17 +124,13 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GString *ownerPassword,
// try to open file
// NB: _wfopen is only available in NT
-/*
version.dwOSVersionInfoSize = sizeof(version);
GetVersionEx(&version);
if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) {
file = _wfopen(fileNameU, L"rb");
} else {
-*/
file = fopen(fileName->getCString(), "rb");
-/*
}
-*/
if (!file) {
error(errIO, -1, "Couldn't open file '{0:t}'", fileName);
errCode = errOpenFile;
@@ -172,15 +145,77 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GString *ownerPassword,
}
#endif
+PDFDoc::PDFDoc(char *fileNameA, GString *ownerPassword,
+ GString *userPassword, PDFCore *coreA) {
+/*
+#ifdef _WIN32
+ OSVERSIONINFO version;
+#endif
+*/
+ Object obj;
+/*
+#ifdef _WIN32
+ Unicode u;
+ int n, i, j;
+#endif
+*/
+
+ init(coreA);
+
+ fileName = new GString(fileNameA);
+
+#if defined(_WIN32)
+#if 0
+ n = 0;
+ i = 0;
+ while (getUTF8(fileName, &i, &u)) {
+ ++n;
+ }
+ fileNameU = (wchar_t *)gmallocn(n + 1, sizeof(wchar_t));
+ i = j = 0;
+ while (j < n && getUTF8(fileName, &i, &u)) {
+ fileNameU[j++] = (wchar_t)u;
+ }
+ fileNameU[n] = L'\0';
+ // NB: _wfopen is only available in NT
+ version.dwOSVersionInfoSize = sizeof(version);
+ GetVersionEx(&version);
+ if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+ file = _wfopen(fileNameU, L"rb");
+ } else {
+#endif /* 0 */
+ file = fopen(fileName->getCString(), "rb");
+#if 0
+ }
+#endif /* 0 */
+
+#elif defined(VMS)
+ file = fopen(fileName->getCString(), "rb", "ctx=stm");
+#else
+ file = fopen(fileName->getCString(), "rb");
+#endif
+
+ if (!file) {
+ error(errIO, -1, "Couldn't open file '{0:t}'", fileName);
+ errCode = errOpenFile;
+ return;
+ }
+
+ // create stream
+ obj.initNull();
+ str = new FileStream(file, 0, gFalse, 0, &obj);
+
+ ok = setup(ownerPassword, userPassword);
+}
+
PDFDoc::PDFDoc(BaseStream *strA, GString *ownerPassword,
GString *userPassword, PDFCore *coreA) {
#ifdef _WIN32
int n, i;
#endif
- ok = gFalse;
- errCode = errNone;
- core = coreA;
+ init(coreA);
+
if (strA->getFileName()) {
fileName = strA->getFileName()->copy();
#ifdef _WIN32
@@ -197,15 +232,21 @@ PDFDoc::PDFDoc(BaseStream *strA, GString *ownerPassword,
fileNameU = NULL;
#endif
}
+ ok = setup(ownerPassword, userPassword);
+}
+
+void PDFDoc::init(PDFCore *coreA) {
+ ok = gFalse;
+ errCode = errNone;
+ core = coreA;
file = NULL;
- str = strA;
+ str = NULL;
xref = NULL;
catalog = NULL;
#ifndef DISABLE_OUTLINE
outline = NULL;
#endif
optContent = NULL;
- ok = setup(ownerPassword, userPassword);
}
GBool PDFDoc::setup(GString *ownerPassword, GString *userPassword) {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.h b/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.h
index 0d67c0dc4c8..e7005b16eb2 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PDFDoc.h
@@ -40,12 +40,20 @@ public:
PDFDoc(GString *fileNameA, GString *ownerPassword = NULL,
GString *userPassword = NULL, PDFCore *coreA = NULL);
+
#ifdef _WIN32
PDFDoc(wchar_t *fileNameA, int fileNameLen, GString *ownerPassword = NULL,
GString *userPassword = NULL, PDFCore *coreA = NULL);
#endif
+
+ // This version takes a UTF-8 file name (which is only relevant on
+ // Windows).
+ PDFDoc(char *fileNameA, GString *ownerPassword = NULL,
+ GString *userPassword = NULL, PDFCore *coreA = NULL);
+
PDFDoc(BaseStream *strA, GString *ownerPassword = NULL,
GString *userPassword = NULL, PDFCore *coreA = NULL);
+
~PDFDoc();
// Was PDF document successfully opened?
@@ -185,6 +193,7 @@ public:
private:
+ void init(PDFCore *coreA);
GBool setup(GString *ownerPassword, GString *userPassword);
GBool setup2(GString *ownerPassword, GString *userPassword,
GBool repairXRef);
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc
index 050311a3b1d..aa0b172db9b 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.cc
@@ -1240,7 +1240,7 @@ GBool ColorKeyToMaskEncoder::fillBuf() {
for (x = 0; x < width; x += 8) {
byte = 0;
for (xx = 0; xx < 8; ++xx) {
- byte <<= 1;
+ byte = (Guchar)(byte << 1);
if (x + xx < width) {
for (i = 0; i < numComps; ++i) {
if (linePtr[i] < maskColors[2 * i] ||
@@ -1296,7 +1296,7 @@ PSOutputDev::PSOutputDev(char *fileName, PDFDoc *docA,
fontFileInfo = new GHash();
imgIDs = NULL;
formIDs = NULL;
- xobjStack = NULL;
+ visitedResources = NULL;
saveStack = NULL;
paperSizes = NULL;
embFontList = NULL;
@@ -1358,7 +1358,7 @@ PSOutputDev::PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA,
fontFileInfo = new GHash();
imgIDs = NULL;
formIDs = NULL;
- xobjStack = NULL;
+ visitedResources = NULL;
saveStack = NULL;
paperSizes = NULL;
embFontList = NULL;
@@ -1489,7 +1489,6 @@ void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA,
formIDLen = 0;
formIDSize = 0;
- xobjStack = new GList();
noStateChanges = gFalse;
saveStack = new GList();
numTilingPatterns = 0;
@@ -1561,9 +1560,6 @@ PSOutputDev::~PSOutputDev() {
deleteGHash(fontFileInfo, PSFontFileInfo);
gfree(imgIDs);
gfree(formIDs);
- if (xobjStack) {
- delete xobjStack;
- }
if (saveStack) {
delete saveStack;
}
@@ -1737,6 +1733,7 @@ void PSOutputDev::writeDocSetup(Catalog *catalog) {
Form *form;
Object obj1, obj2, obj3;
GString *s;
+ GBool needDefaultFont;
int pg, i, j;
// check to see which pages will be rasterized
@@ -1749,12 +1746,16 @@ void PSOutputDev::writeDocSetup(Catalog *catalog) {
rasterizePage = NULL;
}
+ visitedResources = (char *)gmalloc(xref->getNumObjects());
+ memset(visitedResources, 0, xref->getNumObjects());
+
if (mode == psModeForm) {
// swap the form and xpdf dicts
writePS("xpdf end begin dup begin\n");
} else {
writePS("xpdf begin\n");
}
+ needDefaultFont = gFalse;
for (pg = firstPage; pg <= lastPage; ++pg) {
if (rasterizePage[pg - firstPage]) {
continue;
@@ -1765,6 +1766,9 @@ void PSOutputDev::writeDocSetup(Catalog *catalog) {
}
annots = new Annots(doc, page->getAnnots(&obj1));
obj1.free();
+ if (annots->getNumAnnots()) {
+ needDefaultFont = gTrue;
+ }
for (i = 0; i < annots->getNumAnnots(); ++i) {
if (annots->getAnnot(i)->getAppearance(&obj1)->isStream()) {
obj1.streamGetDict()->lookup("Resources", &obj2);
@@ -1778,6 +1782,9 @@ void PSOutputDev::writeDocSetup(Catalog *catalog) {
delete annots;
}
if ((form = catalog->getForm())) {
+ if (form->getNumFields() > 0) {
+ needDefaultFont = gTrue;
+ }
for (i = 0; i < form->getNumFields(); ++i) {
form->getField(i)->getResources(&obj1);
if (obj1.isArray()) {
@@ -1794,6 +1801,9 @@ void PSOutputDev::writeDocSetup(Catalog *catalog) {
obj1.free();
}
}
+ if (needDefaultFont) {
+ setupDefaultFont();
+ }
if (mode != psModeForm) {
if (mode != psModeEPS && !manualCtrl) {
writePSFmt("{0:s} pdfSetup\n",
@@ -1818,6 +1828,9 @@ void PSOutputDev::writeDocSetup(Catalog *catalog) {
if (mode != psModeForm) {
writePS("end\n");
}
+
+ gfree(visitedResources);
+ visitedResources = NULL;
}
void PSOutputDev::writePageTrailer() {
@@ -1895,9 +1908,9 @@ GBool PSOutputDev::checkIfPageNeedsToBeRasterized(int pg) {
void PSOutputDev::setupResources(Dict *resDict) {
Object xObjDict, xObjRef, xObj, patDict, patRef, pat;
Object gsDict, gsRef, gs, smask, smaskGroup, resObj;
- Ref ref0, ref1;
+ Ref ref0;
GBool skip;
- int i, j;
+ int i;
setupFonts(resDict);
setupImages(resDict);
@@ -1907,20 +1920,12 @@ void PSOutputDev::setupResources(Dict *resDict) {
if (xObjDict.isDict()) {
for (i = 0; i < xObjDict.dictGetLength(); ++i) {
- // avoid infinite recursion on XObjects
+ // check for an already-visited XObject
skip = gFalse;
if ((xObjDict.dictGetValNF(i, &xObjRef)->isRef())) {
ref0 = xObjRef.getRef();
- for (j = 0; j < xobjStack->getLength(); ++j) {
- ref1 = *(Ref *)xobjStack->get(j);
- if (ref1.num == ref0.num && ref1.gen == ref0.gen) {
- skip = gTrue;
- break;
- }
- }
- if (!skip) {
- xobjStack->append(&ref0);
- }
+ skip = (GBool)visitedResources[ref0.num];
+ visitedResources[ref0.num] = 1;
}
if (!skip) {
@@ -1936,9 +1941,6 @@ void PSOutputDev::setupResources(Dict *resDict) {
xObj.free();
}
- if (xObjRef.isRef() && !skip) {
- xobjStack->del(xobjStack->getLength() - 1);
- }
xObjRef.free();
}
}
@@ -1950,20 +1952,12 @@ void PSOutputDev::setupResources(Dict *resDict) {
inType3Char = gTrue;
for (i = 0; i < patDict.dictGetLength(); ++i) {
- // avoid infinite recursion on Patterns
+ // check for an already-visited Pattern
skip = gFalse;
if ((patDict.dictGetValNF(i, &patRef)->isRef())) {
ref0 = patRef.getRef();
- for (j = 0; j < xobjStack->getLength(); ++j) {
- ref1 = *(Ref *)xobjStack->get(j);
- if (ref1.num == ref0.num && ref1.gen == ref0.gen) {
- skip = gTrue;
- break;
- }
- }
- if (!skip) {
- xobjStack->append(&ref0);
- }
+ skip = (GBool)visitedResources[ref0.num];
+ visitedResources[ref0.num] = 1;
}
if (!skip) {
@@ -1979,9 +1973,6 @@ void PSOutputDev::setupResources(Dict *resDict) {
pat.free();
}
- if (patRef.isRef() && !skip) {
- xobjStack->del(xobjStack->getLength() - 1);
- }
patRef.free();
}
inType3Char = gFalse;
@@ -1993,20 +1984,12 @@ void PSOutputDev::setupResources(Dict *resDict) {
if (gsDict.isDict()) {
for (i = 0; i < gsDict.dictGetLength(); ++i) {
- // avoid infinite recursion on ExtGStates
+ // check for an already-visited ExtGState
skip = gFalse;
if ((gsDict.dictGetValNF(i, &gsRef)->isRef())) {
ref0 = gsRef.getRef();
- for (j = 0; j < xobjStack->getLength(); ++j) {
- ref1 = *(Ref *)xobjStack->get(j);
- if (ref1.num == ref0.num && ref1.gen == ref0.gen) {
- skip = gTrue;
- break;
- }
- }
- if (!skip) {
- xobjStack->append(&ref0);
- }
+ skip = (GBool)visitedResources[ref0.num];
+ visitedResources[ref0.num] = 1;
}
if (!skip) {
@@ -2027,9 +2010,6 @@ void PSOutputDev::setupResources(Dict *resDict) {
gs.free();
}
- if (gsRef.isRef() && !skip) {
- xobjStack->del(xobjStack->getLength() - 1);
- }
gsRef.free();
}
}
@@ -2149,6 +2129,9 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) {
fi->ff = setupExternalCIDTrueTypeFont(font, fontLoc->path,
fontLoc->fontNum, gTrue);
break;
+ case fontCIDType0COT:
+ fi->ff = setupExternalOpenTypeCFFFont(font, fontLoc->path);
+ break;
default:
break;
}
@@ -2194,7 +2177,7 @@ void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) {
}
}
if (code < 256) {
- w1 = ((Gfx8BitFont *)font)->getWidth(code);
+ w1 = ((Gfx8BitFont *)font)->getWidth((Guchar)code);
} else {
w1 = 0;
}
@@ -2272,8 +2255,10 @@ PSFontFileInfo *PSOutputDev::setupEmbeddedType1Font(GfxFont *font, Ref *id) {
int length1, length2, n;
// check if font is already embedded
- if ((ff = (PSFontFileInfo *)
- fontFileInfo->lookup(font->getEmbeddedFontName()))) {
+ if (!font->getEmbeddedFontName()) {
+ rename = gTrue;
+ } else if ((ff = (PSFontFileInfo *)
+ fontFileInfo->lookup(font->getEmbeddedFontName()))) {
if (ff->loc == psFontFileEmbedded &&
ff->embFontID.num == id->num &&
ff->embFontID.gen == id->gen) {
@@ -2408,7 +2393,7 @@ PSFontFileInfo *PSOutputDev::setupExternalType1Font(GfxFont *font,
if ((c = fgetc(fontFile)) == EOF) {
break;
}
- writePSChar(c);
+ writePSChar((char)c);
}
} else {
for (i = 0; i < n; ++i) {
@@ -2438,10 +2423,10 @@ PSFontFileInfo *PSOutputDev::setupExternalType1Font(GfxFont *font,
// plain text (PFA) format
} else {
- writePSChar(buf[0]);
- writePSChar(buf[1]);
+ writePSChar((char)buf[0]);
+ writePSChar((char)buf[1]);
while ((c = fgetc(fontFile)) != EOF) {
- writePSChar(c);
+ writePSChar((char)c);
}
}
@@ -2999,6 +2984,119 @@ PSFontFileInfo *PSOutputDev::setupEmbeddedOpenTypeCFFFont(GfxFont *font,
return ff;
}
+// This assumes an OpenType CFF font that has a Unicode cmap (in the
+// OpenType section), and a CFF blob that uses an identity CID-to-GID
+// mapping.
+PSFontFileInfo *PSOutputDev::setupExternalOpenTypeCFFFont(GfxFont *font,
+ GString *fileName) {
+ GString *psName;
+ PSFontFileInfo *ff;
+ FoFiTrueType *ffTT;
+ GHashIter *iter;
+ CharCodeToUnicode *ctu;
+ Unicode uBuf[8];
+ int *codeToGID;
+ int codeToGIDLen;
+ int cmap, cmapPlatform, cmapEncoding, code;
+
+ // create a code-to-GID mapping, via Unicode
+ if (!(ffTT = FoFiTrueType::load(fileName->getCString(), 0, gTrue))) {
+ return NULL;
+ }
+ if (!ffTT->isOpenTypeCFF()) {
+ delete ffTT;
+ return NULL;
+ }
+ if (!(ctu = ((GfxCIDFont *)font)->getToUnicode())) {
+ error(errSyntaxError, -1,
+ "Couldn't find a mapping to Unicode for font '{0:s}'",
+ font->getName() ? font->getName()->getCString() : "(unnamed)");
+ delete ffTT;
+ return NULL;
+ }
+ // look for a Unicode cmap
+ for (cmap = 0; cmap < ffTT->getNumCmaps(); ++cmap) {
+ cmapPlatform = ffTT->getCmapPlatform(cmap);
+ cmapEncoding = ffTT->getCmapEncoding(cmap);
+ if ((cmapPlatform == 3 && cmapEncoding == 1) ||
+ (cmapPlatform == 0 && cmapEncoding <= 4)) {
+ break;
+ }
+ }
+ if (cmap >= ffTT->getNumCmaps()) {
+ error(errSyntaxError, -1,
+ "Couldn't find a Unicode cmap in font '{0:s}'",
+ font->getName() ? font->getName()->getCString() : "(unnamed)");
+ ctu->decRefCnt();
+ delete ffTT;
+ return NULL;
+ }
+ // map CID -> Unicode -> GID
+ if (ctu->isIdentity()) {
+ codeToGIDLen = 65536;
+ } else {
+ codeToGIDLen = ctu->getLength();
+ }
+ codeToGID = (int *)gmallocn(codeToGIDLen, sizeof(int));
+ for (code = 0; code < codeToGIDLen; ++code) {
+ if (ctu->mapToUnicode(code, uBuf, 8) > 0) {
+ codeToGID[code] = ffTT->mapCodeToGID(cmap, uBuf[0]);
+ } else {
+ codeToGID[code] = 0;
+ }
+ }
+ ctu->decRefCnt();
+
+ // check if font is already embedded
+ fontFileInfo->startIter(&iter);
+ while (fontFileInfo->getNext(&iter, &psName, (void **)&ff)) {
+ if (ff->loc == psFontFileExternal &&
+ ff->type == font->getType() &&
+ !ff->extFileName->cmp(fileName) &&
+ ff->codeToGIDLen == codeToGIDLen &&
+ ff->codeToGID &&
+ !memcmp(ff->codeToGID, codeToGID, codeToGIDLen * sizeof(int))) {
+ fontFileInfo->killIter(&iter);
+ gfree(codeToGID);
+ delete ffTT;
+ return ff;
+ }
+ }
+
+ // generate name
+ psName = makePSFontName(font, font->getID());
+
+ // beginning comment
+ writePSFmt("%%BeginResource: font {0:t}\n", psName);
+ embFontList->append("%%+ font ");
+ embFontList->append(psName->getCString());
+ embFontList->append("\n");
+
+ // convert it to a Type 0 font
+ if (globalParams->getPSLevel() >= psLevel3) {
+ // Level 3: use a CID font
+ ffTT->convertToCIDType0(psName->getCString(),
+ codeToGID, codeToGIDLen,
+ outputFunc, outputStream);
+ } else {
+ // otherwise: use a non-CID composite font
+ ffTT->convertToType0(psName->getCString(),
+ codeToGID, codeToGIDLen,
+ outputFunc, outputStream);
+ }
+ delete ffTT;
+
+ // ending comment
+ writePS("%%EndResource\n");
+
+ ff = new PSFontFileInfo(psName, font->getType(), psFontFileExternal);
+ ff->extFileName = fileName->copy();
+ ff->codeToGID = codeToGID;
+ ff->codeToGIDLen = codeToGIDLen;
+ fontFileInfo->add(ff->psName, ff);
+ return ff;
+}
+
PSFontFileInfo *PSOutputDev::setupType3Font(GfxFont *font,
Dict *parentResDict) {
PSFontFileInfo *ff;
@@ -3404,17 +3502,17 @@ GString *PSOutputDev::asciiHexDecodeType1EexecSection(GString *in) {
continue;
}
if (c >= '0' && c <= '9') {
- byte += c - '0';
+ byte = (Guchar)(byte + (c - '0'));
} else if (c >= 'A' && c <= 'F') {
- byte += c - 'A' + 10;
+ byte = (Guchar)(byte + (c - 'A' + 10));
} else if (c >= 'a' && c <= 'f') {
- byte += c - 'a' + 10;
+ byte = (Guchar)(byte + (c - 'a' + 10));
} else {
delete out;
return in;
}
if (state == 0) {
- byte <<= 4;
+ byte = (Guchar)(byte << 4);
state = 1;
} else {
out->append((char)byte);
@@ -3557,6 +3655,10 @@ void PSOutputDev::renameType1Font(GString *font, GString *name) {
font->insert(i, name);
}
+void PSOutputDev::setupDefaultFont() {
+ writePS("/xpdf_default_font /Helvetica 1 1 ISOLatin1Encoding pdfMakeFont\n");
+}
+
void PSOutputDev::setupImages(Dict *resDict) {
Object xObjDict, xObj, xObjRef, subtypeObj, maskObj, maskRef;
Ref imgID;
@@ -3591,12 +3693,17 @@ void PSOutputDev::setupImages(Dict *resDict) {
imgIDs = (Ref *)greallocn(imgIDs, imgIDSize, sizeof(Ref));
}
imgIDs[imgIDLen++] = imgID;
- setupImage(imgID, xObj.getStream(), gFalse);
- if (level >= psLevel3 &&
- xObj.streamGetDict()->lookup("Mask", &maskObj)->isStream()) {
- setupImage(imgID, maskObj.getStream(), gTrue);
+ setupImage(imgID, xObj.getStream(), gFalse, NULL);
+ if (level >= psLevel3) {
+ xObj.streamGetDict()->lookup("Mask", &maskObj);
+ if (maskObj.isStream()) {
+ setupImage(imgID, maskObj.getStream(), gTrue, NULL);
+ } else if (level == psLevel3Gray && maskObj.isArray()) {
+ setupImage(imgID, xObj.getStream(), gFalse,
+ maskObj.getArray());
+ }
+ maskObj.free();
}
- maskObj.free();
}
} else {
error(errSyntaxError, -1,
@@ -3612,12 +3719,12 @@ void PSOutputDev::setupImages(Dict *resDict) {
xObjDict.free();
}
-//~ this doesn't currently handle color key masks in psLevel3Gray
-//~ (which need to be converted to explicit masks)
-void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask) {
+void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask,
+ Array *colorKeyMask) {
StreamColorSpaceMode csMode;
GfxColorSpace *colorSpace;
GfxImageColorMap *colorMap;
+ int maskColors[2*gfxColorMaxComps];
Object obj1;
GBool imageMask, useLZW, useRLE, useCompressed, useASCIIHex;
GString *s;
@@ -3696,8 +3803,20 @@ void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask) {
useCompressed = gFalse;
useASCIIHex = gTrue;
} else {
- if (colorMap && (colorMap->getColorSpace()->getMode() == csDeviceN ||
- level == psLevel2Gray || level == psLevel3Gray)) {
+ if (colorKeyMask) {
+ if (globalParams->getPSUncompressPreloadedImages()) {
+ useLZW = useRLE = gFalse;
+ } else if (globalParams->getPSLZW()) {
+ useLZW = gTrue;
+ useRLE = gFalse;
+ } else {
+ useRLE = gTrue;
+ useLZW = gFalse;
+ }
+ useCompressed = gFalse;
+ } else if (colorMap &&
+ (colorMap->getColorSpace()->getMode() == csDeviceN ||
+ level == psLevel2Gray || level == psLevel3Gray)) {
if (globalParams->getPSLZW()) {
useLZW = gTrue;
useRLE = gFalse;
@@ -3731,7 +3850,17 @@ void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask) {
if (useCompressed) {
str = str->getUndecodedStream();
}
- if (colorMap && (level == psLevel2Gray || level == psLevel3Gray)) {
+ if (colorKeyMask) {
+ memset(maskColors, 0, sizeof(maskColors));
+ for (i = 0; i < colorKeyMask->getLength() && i < 2*gfxColorMaxComps; ++i) {
+ colorKeyMask->get(i, &obj1);
+ if (obj1.isInt()) {
+ maskColors[i] = obj1.getInt();
+ }
+ obj1.free();
+ }
+ str = new ColorKeyToMaskEncoder(str, width, height, colorMap, maskColors);
+ } else if (colorMap && (level == psLevel2Gray || level == psLevel3Gray)) {
str = new GrayRecoder(str, width, height, colorMap);
} else if (colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) {
str = new DeviceNRecoder(str, width, height, colorMap);
@@ -3783,7 +3912,7 @@ void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask) {
++size;
}
writePSFmt("{0:d} array dup /{1:s}Data_{2:d}_{3:d} exch def\n",
- size, mask ? "Mask" : "Im", id.num, id.gen);
+ size, (mask || colorKeyMask) ? "Mask" : "Im", id.num, id.gen);
str->close();
// write the data into the array
@@ -3798,10 +3927,10 @@ void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask) {
break;
}
if (c == 'z') {
- writePSChar(c);
+ writePSChar((char)c);
++col;
} else {
- writePSChar(c);
+ writePSChar((char)c);
++col;
for (i = 1; i <= (useASCIIHex ? 1 : 4); ++i) {
do {
@@ -3810,7 +3939,7 @@ void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask) {
if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
break;
}
- writePSChar(c);
+ writePSChar((char)c);
++col;
}
}
@@ -4837,10 +4966,17 @@ void PSOutputDev::updateTransfer(GfxState *state) {
void PSOutputDev::updateFont(GfxState *state) {
if (state->getFont()) {
- writePSFmt("/F{0:d}_{1:d} {2:.6g} Tf\n",
- state->getFont()->getID()->num, state->getFont()->getID()->gen,
- fabs(state->getFontSize()) < 0.0001 ? 0.0001
- : state->getFontSize());
+ if (state->getFont()->getTag() &&
+ !state->getFont()->getTag()->cmp("xpdf_default_font")) {
+ writePSFmt("/xpdf_default_font {0:.6g} Tf\n",
+ fabs(state->getFontSize()) < 0.0001 ? 0.0001
+ : state->getFontSize());
+ } else {
+ writePSFmt("/F{0:d}_{1:d} {2:.6g} Tf\n",
+ state->getFont()->getID()->num, state->getFont()->getID()->gen,
+ fabs(state->getFontSize()) < 0.0001 ? 0.0001
+ : state->getFontSize());
+ }
noStateChanges = gFalse;
}
}
@@ -5056,6 +5192,7 @@ void PSOutputDev::tilingPatternFillL2(GfxState *state, Gfx *gfx,
writePSFmt(" /XStep {0:.6g}\n", xStep);
writePSFmt(" /YStep {0:.6g}\n", yStep);
writePS(" /PaintProc {\n");
+ writePS(" pop\n");
box.x1 = bbox[0];
box.y1 = bbox[1];
box.x2 = bbox[2];
@@ -5850,7 +5987,7 @@ void PSOutputDev::doImageL1(Object *ref, GfxState *state,
if (c == '>' || c == EOF) {
break;
}
- writePSChar(c);
+ writePSChar((char)c);
++col;
// each line is: "<...data...><eol>"
// so max data length = 255 - 4 = 251
@@ -6061,10 +6198,10 @@ void PSOutputDev::doImageL2(Object *ref, GfxState *state,
break;
}
if (c == 'z') {
- writePSChar(c);
+ writePSChar((char)c);
++col;
} else {
- writePSChar(c);
+ writePSChar((char)c);
++col;
for (i = 1; i <= (useASCIIHex ? 1 : 4); ++i) {
do {
@@ -6073,7 +6210,7 @@ void PSOutputDev::doImageL2(Object *ref, GfxState *state,
if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
break;
}
- writePSChar(c);
+ writePSChar((char)c);
++col;
}
}
@@ -6608,14 +6745,28 @@ void PSOutputDev::doImageL3(Object *ref, GfxState *state,
// mask data source
if (maskColors && colorMap && level == psLevel3Gray) {
s = NULL;
- if (globalParams->getPSLZW()) {
- maskUseLZW = gTrue;
- maskUseRLE = gFalse;
+ if (mode == psModeForm || inType3Char || preload) {
+ if (globalParams->getPSUncompressPreloadedImages()) {
+ maskUseLZW = maskUseRLE = gFalse;
+ } else if (globalParams->getPSLZW()) {
+ maskUseLZW = gTrue;
+ maskUseRLE = gFalse;
+ } else {
+ maskUseRLE = gTrue;
+ maskUseLZW = gFalse;
+ }
+ maskUseASCII = gFalse;
+ maskUseCompressed = gFalse;
} else {
- maskUseRLE = gTrue;
- maskUseLZW = gFalse;
+ if (globalParams->getPSLZW()) {
+ maskUseLZW = gTrue;
+ maskUseRLE = gFalse;
+ } else {
+ maskUseRLE = gTrue;
+ maskUseLZW = gFalse;
+ }
+ maskUseASCII = gTrue;
}
- maskUseASCII = gTrue;
maskUseCompressed = gFalse;
maskWidth = width;
maskHeight = height;
@@ -6647,13 +6798,13 @@ void PSOutputDev::doImageL3(Object *ref, GfxState *state,
}
maskFilters = new GString();
if (maskUseASCII) {
- maskFilters->appendf(" /ASCII{0:s}Decode filter\n",
+ maskFilters->appendf(" /ASCII{0:s}Decode filter\n",
useASCIIHex ? "Hex" : "85");
}
if (maskUseLZW) {
- maskFilters->append(" /LZWDecode filter\n");
+ maskFilters->append(" /LZWDecode filter\n");
} else if (maskUseRLE) {
- maskFilters->append(" /RunLengthDecode filter\n");
+ maskFilters->append(" /RunLengthDecode filter\n");
}
if (maskUseCompressed) {
maskFilters->append(s);
@@ -6661,8 +6812,7 @@ void PSOutputDev::doImageL3(Object *ref, GfxState *state,
if (s) {
delete s;
}
- if ((mode == psModeForm || inType3Char || preload) &&
- !(maskColors && colorMap && level == psLevel3Gray)) {
+ if (mode == psModeForm || inType3Char || preload) {
writePSFmt("MaskData_{0:d}_{1:d} pdfMaskInit\n",
ref->getRefNum(), ref->getRefGen());
} else {
@@ -6744,10 +6894,10 @@ void PSOutputDev::doImageL3(Object *ref, GfxState *state,
break;
}
if (c == 'z') {
- writePSChar(c);
+ writePSChar((char)c);
++col;
} else {
- writePSChar(c);
+ writePSChar((char)c);
++col;
for (i = 1; i <= (useASCIIHex ? 1 : 4); ++i) {
do {
@@ -6756,7 +6906,7 @@ void PSOutputDev::doImageL3(Object *ref, GfxState *state,
if (c == (useASCIIHex ? '>' : '~') || c == EOF) {
break;
}
- writePSChar(c);
+ writePSChar((char)c);
++col;
}
}
@@ -6907,8 +7057,7 @@ void PSOutputDev::doImageL3(Object *ref, GfxState *state,
maskInvert ? 1 : 0, maskInvert ? 0 : 1);
// mask data source
- if ((mode == psModeForm || inType3Char || preload) &&
- !(maskColors && colorMap && level == psLevel3Gray)) {
+ if (mode == psModeForm || inType3Char || preload) {
writePS(" /DataSource {pdfMaskSrc}\n");
writePS(maskFilters->getCString());
} else {
@@ -8216,7 +8365,7 @@ void PSOutputDev::writePSTextLine(GString *s) {
writePSFmt("\\{0:03o}", c);
j += 4;
} else {
- writePSChar(c);
+ writePSChar((char)c);
++j;
}
}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.h b/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.h
index 8e3a74878af..66057a7cb74 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PSOutputDev.h
@@ -259,6 +259,8 @@ public:
virtual void psXObject(Stream *psStream, Stream *level1Stream);
//----- miscellaneous
+ void setImageableArea(int imgLLXA, int imgLLYA, int imgURXA, int imgURYA)
+ { imgLLX = imgLLXA; imgLLY = imgLLYA; imgURX = imgURXA; imgURY = imgURYA; }
void setOffset(double x, double y)
{ tx0 = x; ty0 = y; }
void setScale(double x, double y)
@@ -307,6 +309,8 @@ private:
int fontNum,
GBool needVerticalMetrics);
PSFontFileInfo *setupEmbeddedOpenTypeCFFFont(GfxFont *font, Ref *id);
+ PSFontFileInfo *setupExternalOpenTypeCFFFont(GfxFont *font,
+ GString *fileName);
PSFontFileInfo *setupType3Font(GfxFont *font, Dict *parentResDict);
GString *makePSFontName(GfxFont *font, Ref *id);
GString *fixType1Font(GString *font, int length1, int length2);
@@ -320,8 +324,9 @@ private:
GString *copyType1PFA(Guchar *font, int fontSize);
GString *copyType1PFB(Guchar *font, int fontSize);
void renameType1Font(GString *font, GString *name);
+ void setupDefaultFont();
void setupImages(Dict *resDict);
- void setupImage(Ref id, Stream *stream, GBool mask);
+ void setupImage(Ref id, Stream *str, GBool mask, Array *colorKeyMask);
void setupForms(Dict *resDict);
void setupForm(Object *strRef, Object *strObj);
void addProcessColor(double c, double m, double y, double k);
@@ -455,8 +460,7 @@ private:
Ref *formIDs; // list of IDs for predefined forms
int formIDLen; // number of entries in formIDs array
int formIDSize; // size of formIDs array
- GList *xobjStack; // stack of XObject dicts currently being
- // processed
+ char *visitedResources; // vector of resource objects already visited
GBool noStateChanges; // true if there have been no state changes
// since the last save
GList *saveStack; // "no state changes" flag for each
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PSTokenizer.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/PSTokenizer.cc
index dd49630b463..bbdb0ec44d5 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/PSTokenizer.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PSTokenizer.cc
@@ -77,12 +77,12 @@ GBool PSTokenizer::getToken(char *buf, int size, int *length) {
// read a token
i = 0;
- buf[i++] = c;
+ buf[i++] = (char)c;
if (c == '(') {
backslash = gFalse;
while ((c = lookChar()) != EOF) {
if (i < size - 1) {
- buf[i++] = c;
+ buf[i++] = (char)c;
}
getChar();
if (c == '\\') {
@@ -97,7 +97,7 @@ GBool PSTokenizer::getToken(char *buf, int size, int *length) {
while ((c = lookChar()) != EOF) {
getChar();
if (i < size - 1 && specialChars[c] != 1) {
- buf[i++] = c;
+ buf[i++] = (char)c;
}
if (c == '>') {
break;
@@ -107,7 +107,7 @@ GBool PSTokenizer::getToken(char *buf, int size, int *length) {
while ((c = lookChar()) != EOF && !specialChars[c]) {
getChar();
if (i < size - 1) {
- buf[i++] = c;
+ buf[i++] = (char)c;
}
}
}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/PreScanOutputDev.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/PreScanOutputDev.cc
index cffdca76477..d6f40333215 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/PreScanOutputDev.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/PreScanOutputDev.cc
@@ -289,12 +289,28 @@ void PreScanOutputDev::beginTransparencyGroup(
void PreScanOutputDev::check(GfxState *state,
GfxColorSpace *colorSpace, GfxColor *color,
double opacity, GfxBlendMode blendMode) {
+ GfxGray gr;
+ GfxCMYK cmyk;
GfxRGB rgb;
if (colorSpace->getMode() == csPattern) {
mono = gFalse;
gray = gFalse;
gdi = gFalse;
+ } else if (colorSpace->getMode() == csDeviceGray ||
+ colorSpace->getMode() == csCalGray) {
+ colorSpace->getGray(color, &gr, state->getRenderingIntent());
+ if (!(gr == 0 || gr == gfxColorComp1)) {
+ mono = gFalse;
+ }
+ } else if (colorSpace->getMode() == csDeviceCMYK) {
+ colorSpace->getCMYK(color, &cmyk, state->getRenderingIntent());
+ if (cmyk.c != 0 || cmyk.m != 0 || cmyk.y != 0) {
+ mono = gFalse;
+ gray = gFalse;
+ } else if (!(cmyk.k == 0 || cmyk.k == gfxColorComp1)) {
+ mono = gFalse;
+ }
} else {
colorSpace->getRGB(color, &rgb, state->getRenderingIntent());
if (rgb.r != rgb.g || rgb.g != rgb.b || rgb.b != rgb.r) {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/SplashOutputDev.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/SplashOutputDev.cc
index 72fe72e7647..770e54780f1 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/SplashOutputDev.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/SplashOutputDev.cc
@@ -65,6 +65,14 @@ static SplashStrokeAdjustMode mapStrokeAdjustMode[3] = {
};
//------------------------------------------------------------------------
+
+// Clip x to lie in [0, 255].
+static inline Guchar clip255(int x) {
+ return x < 0 ? 0 : x > 255 ? 255 : (Guchar)x;
+}
+
+
+//------------------------------------------------------------------------
// Blend functions
//------------------------------------------------------------------------
@@ -73,7 +81,7 @@ static void splashOutBlendMultiply(SplashColorPtr src, SplashColorPtr dest,
int i;
for (i = 0; i < splashColorModeNComps[cm]; ++i) {
- blend[i] = (dest[i] * src[i]) / 255;
+ blend[i] = (Guchar)((dest[i] * src[i]) / 255);
}
}
@@ -82,11 +90,11 @@ static void splashOutBlendScreen(SplashColorPtr src, SplashColorPtr dest,
int i;
for (i = 0; i < splashColorModeNComps[cm]; ++i) {
- blend[i] = dest[i] + src[i] - (dest[i] * src[i]) / 255;
+ blend[i] = (Guchar)(dest[i] + src[i] - (dest[i] * src[i]) / 255);
}
}
-// note: this is the same os HardLight
+// note: this is the same as HardLight, with src/dest reversed
static void splashOutBlendOverlay(SplashColorPtr src, SplashColorPtr dest,
SplashColorPtr blend, SplashColorMode cm) {
int i;
@@ -94,8 +102,8 @@ static void splashOutBlendOverlay(SplashColorPtr src, SplashColorPtr dest,
for (i = 0; i < splashColorModeNComps[cm]; ++i) {
// the spec says "if Cs <= 0.5" -- note that 0x80 is 128/255=0.5020
blend[i] = dest[i] < 0x80
- ? (src[i] * 2 * dest[i]) / 255
- : 255 - 2 * ((255 - src[i]) * (255 - dest[i])) / 255;
+ ? (Guchar)((src[i] * 2 * dest[i]) / 255)
+ : (Guchar)(255 - 2 * ((255 - src[i]) * (255 - dest[i])) / 255);
}
}
@@ -128,7 +136,7 @@ static void splashOutBlendColorDodge(SplashColorPtr src, SplashColorPtr dest,
} else if (dest[i] >= 255 - src[i]) {
blend[i] = 255;
} else {
- blend[i] = (dest[i] * 255) / (255 - src[i]);
+ blend[i] = (Guchar)((dest[i] * 255) / (255 - src[i]));
}
}
}
@@ -143,7 +151,7 @@ static void splashOutBlendColorBurn(SplashColorPtr src, SplashColorPtr dest,
} else if (255 - dest[i] >= src[i]) {
blend[i] = 0;
} else {
- blend[i] = 255 - (((255 - dest[i]) * 255) / src[i]);
+ blend[i] = (Guchar)(255 - (((255 - dest[i]) * 255) / src[i]));
}
}
}
@@ -155,8 +163,8 @@ static void splashOutBlendHardLight(SplashColorPtr src, SplashColorPtr dest,
for (i = 0; i < splashColorModeNComps[cm]; ++i) {
// the spec says "if Cs <= 0.5" -- note that 0x80 is 128/255=0.5020
blend[i] = src[i] < 0x80
- ? (dest[i] * 2 * src[i]) / 255
- : 255 - 2 * ((255 - dest[i]) * (255 - src[i])) / 255;
+ ? (Guchar)((dest[i] * 2 * src[i]) / 255)
+ : (Guchar)(255 - 2 * ((255 - dest[i]) * (255 - src[i])) / 255);
}
}
@@ -167,8 +175,9 @@ static void splashOutBlendSoftLight(SplashColorPtr src, SplashColorPtr dest,
for (i = 0; i < splashColorModeNComps[cm]; ++i) {
// the spec says "if Cs <= 0.5" -- note that 0x80 is 128/255=0.5020
if (src[i] < 0x80) {
- blend[i] = dest[i] - (255 - 2 * src[i]) * dest[i] * (255 - dest[i]) /
- (255 * 255);
+ blend[i] = (Guchar)(dest[i] -
+ (255 - 2 * src[i]) * dest[i] * (255 - dest[i]) /
+ (255 * 255));
} else {
// the spec says "if Cb <= 0.25" -- note that 0x40 is 64/255=0.2510
if (dest[i] < 0x40) {
@@ -177,7 +186,7 @@ static void splashOutBlendSoftLight(SplashColorPtr src, SplashColorPtr dest,
} else {
x = (int)sqrt(255.0 * dest[i]);
}
- blend[i] = dest[i] + (2 * src[i] - 255) * (x - dest[i]) / 255;
+ blend[i] = (Guchar)(dest[i] + (2 * src[i] - 255) * (x - dest[i]) / 255);
}
}
}
@@ -188,7 +197,8 @@ static void splashOutBlendDifference(SplashColorPtr src, SplashColorPtr dest,
int i;
for (i = 0; i < splashColorModeNComps[cm]; ++i) {
- blend[i] = dest[i] < src[i] ? src[i] - dest[i] : dest[i] - src[i];
+ blend[i] = dest[i] < src[i] ? (Guchar)(src[i] - dest[i])
+ : (Guchar)(dest[i] - src[i]);
}
}
@@ -197,7 +207,7 @@ static void splashOutBlendExclusion(SplashColorPtr src, SplashColorPtr dest,
int i;
for (i = 0; i < splashColorModeNComps[cm]; ++i) {
- blend[i] = dest[i] + src[i] - (2 * dest[i] * src[i]) / 255;
+ blend[i] = (Guchar)(dest[i] + src[i] - (2 * dest[i] * src[i]) / 255);
}
}
@@ -423,6 +433,7 @@ SplashBlendFunc splashOutBlendFuncs[] = {
&splashOutBlendLuminosity
};
+
//------------------------------------------------------------------------
// SplashOutFontFileID
//------------------------------------------------------------------------
@@ -526,7 +537,7 @@ T3FontCache::T3FontCache(Ref *fontIDA, double m11A, double m12A,
cacheTags = (T3FontCacheTag *)gmallocn(cacheSets * cacheAssoc,
sizeof(T3FontCacheTag));
for (i = 0; i < cacheSets * cacheAssoc; ++i) {
- cacheTags[i].mru = i & (cacheAssoc - 1);
+ cacheTags[i].mru = (Gushort)(i & (cacheAssoc - 1));
}
}
@@ -565,6 +576,9 @@ struct SplashTransparencyGroup {
GfxColorSpace *blendingColorSpace;
GBool isolated;
+ //----- modified region in tBitmap
+ int modXMin, modYMin, modXMax, modYMax;
+
//----- saved state
SplashBitmap *origBitmap;
Splash *origSplash;
@@ -627,6 +641,7 @@ SplashOutputDev::SplashOutputDev(SplashColorMode colorModeA,
startPageCbkData = NULL;
}
+
void SplashOutputDev::setupScreenParams(double hDPI, double vDPI) {
screenParams.size = globalParams->getScreenSize();
screenParams.dotRadius = globalParams->getScreenDotRadius();
@@ -906,6 +921,7 @@ void SplashOutputDev::updateStrokeAdjust(GfxState *state) {
#endif
}
+
void SplashOutputDev::updateFillColor(GfxState *state) {
GfxGray gray;
GfxRGB rgb;
@@ -960,6 +976,7 @@ void SplashOutputDev::updateStrokeColor(GfxState *state) {
}
}
+
SplashPattern *SplashOutputDev::getColor(GfxGray gray) {
SplashColor color;
@@ -1018,6 +1035,7 @@ void SplashOutputDev::getColor(GfxCMYK *cmyk, SplashColorPtr color) {
#endif
+
void SplashOutputDev::setOverprintMask(GfxState *state,
GfxColorSpace *colorSpace,
GBool overprintFlag,
@@ -1054,6 +1072,7 @@ void SplashOutputDev::setOverprintMask(GfxState *state,
}
splash->setOverprintMask(mask);
#endif
+
}
void SplashOutputDev::updateBlendMode(GfxState *state) {
@@ -1474,7 +1493,8 @@ void SplashOutputDev::doUpdateFont(GfxState *state) {
memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
n * sizeof(int));
}
- } else if (globalParams->getMapExtTrueTypeFontsViaUnicode()) {
+ } else if (globalParams->getMapExtTrueTypeFontsViaUnicode() &&
+ !((GfxCIDFont *)gfxFont)->usesIdentityEncoding()) {
// create a CID-to-GID mapping, via Unicode
if ((ctu = ((GfxCIDFont *)gfxFont)->getToUnicode())) {
#if LOAD_FONTS_FROM_MEM
@@ -1572,7 +1592,7 @@ void SplashOutputDev::doUpdateFont(GfxState *state) {
((name[0] >= 'A' && name[0] <= 'Z') ||
(name[0] >= 'a' && name[0] <= 'z') ||
(name[0] >= '0' && name[0] <= '9'))) {
- w = ((Gfx8BitFont *)gfxFont)->getWidth(code);
+ w = ((Gfx8BitFont *)gfxFont)->getWidth((Guchar)code);
builtinFontSubst[substIdx]->widths->getWidth(name, &ww);
if (w > 0.01 && ww > 10) {
w /= ww * 0.001;
@@ -1685,7 +1705,7 @@ void SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx,
double xStepX, xStepY, yStepX, yStepY;
double adjXMin, adjYMin;
double sx, sy;
- double clipXMin, clipYMin, clipXMax, clipYMax;
+ double clipXMin, clipYMin, clipXMax, clipYMax, clipXC, clipYC;
double tx, ty, idet, txMin, tyMin, txMax, tyMax;
int tileW, tileH, tileSize;
int ixMin, ixMax, iyMin, iyMax, ix, iy, x, y;
@@ -1781,15 +1801,27 @@ void SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx,
state->transformDelta(xStep * mat[0], xStep * mat[1], &xStepX, &xStepY);
state->transformDelta(yStep * mat[2], yStep * mat[3], &yStepX, &yStepY);
+ // get the clipping bbox (in device space)
+ state->getClipBBox(&clipXMin, &clipYMin, &clipXMax, &clipYMax);
+
// compute tiling parameters
- if (tilingType == 2) {
+ idet = xStepX * yStepY - yStepX * xStepY;
+ if (tilingType == 2 || idet == 0) {
adjXMin = tileXMin;
adjYMin = tileYMin;
sx = 1;
sy = 1;
} else {
- adjXMin = (int)floor(tileXMin + 0.5);
- adjYMin = (int)floor(tileYMin + 0.5);
+ // reposition the pattern origin to the center of the clipping bbox
+ idet = 1 / idet;
+ clipXC = 0.5 * (clipXMin + clipXMax);
+ clipYC = 0.5 * (clipYMin + clipYMax);
+ ix = (int)((yStepX * (tileYMin - clipYC) - (tileXMin - clipXC) * yStepY)
+ * idet + 0.5);
+ iy = (int)((xStepX * (clipYC - tileYMin) - (clipXC - tileXMin) * xStepY)
+ * idet + 0.5);
+ adjXMin = (int)floor(tileXMin + ix * xStepX + iy * yStepX + 0.5);
+ adjYMin = (int)floor(tileYMin + ix * xStepY + iy * yStepY + 0.5);
sx = tileW / (tileXMax - tileXMin);
sy = tileH / (tileYMax - tileYMin);
xStepX = (int)floor(sx * xStepX + 0.5);
@@ -1834,7 +1866,6 @@ void SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx,
// - look at the four corners of the clipping bbox
// - solve for the (ix,iy) tile position at each corner
// - take the min and max values for ix, iy
- state->getClipBBox(&clipXMin, &clipYMin, &clipXMax, &clipYMax);
idet = xStepX * yStepY - xStepY * yStepX;
if (idet == 0) {
return;
@@ -1903,19 +1934,20 @@ void SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx,
bitmap = tileBitmap = new SplashBitmap(tileW, tileH, bitmapRowPad,
colorMode, gTrue, bitmapTopDown);
splash = new Splash(bitmap, vectorAntialias, origSplash->getScreen());
+ for (i = 0; i < splashMaxColorComps; ++i) {
+ color[i] = 0;
+ }
+ splash->clear(color);
splash->setMinLineWidth(globalParams->getMinLineWidth());
splash->setStrokeAdjust(
mapStrokeAdjustMode[globalParams->getStrokeAdjust()]);
splash->setEnablePathSimplification(
globalParams->getEnablePathSimplification());
- for (i = 0; i < splashMaxColorComps; ++i) {
- color[i] = 0;
- }
- splash->clear(color);
++nestCount;
// copy the fill color (for uncolored tiling patterns)
// (and stroke color, to handle buggy PDF files)
+ // -- Acrobat apparently doesn't copy the full state here
splash->setFillPattern(origSplash->getFillPattern()->copy());
splash->setStrokePattern(origSplash->getStrokePattern()->copy());
@@ -1967,6 +1999,7 @@ GBool SplashOutputDev::axialShadedFill(GfxState *state,
SplashColorPtr sColors, sColor;
SplashColor sColor0;
+
// get the shading parameters
shading->getCoords(&x0, &y0, &x1, &y1);
t0 = shading->getDomain0();
@@ -1986,7 +2019,7 @@ GBool SplashOutputDev::axialShadedFill(GfxState *state,
// get clip region (in user space)
state->getUserClipBBox(&uxMin, &uyMin, &uxMax, &uyMax);
- if (uxMin >= uxMax || uyMin >= uyMax) {
+ if (uxMin > uxMax || uyMin > uyMax) {
return gTrue;
}
@@ -2053,7 +2086,7 @@ GBool SplashOutputDev::axialShadedFill(GfxState *state,
bitmapHeight = iyMax - iyMin;
tBitmap = new SplashBitmap(bitmapWidth, bitmapHeight, 1,
srcMode, gTrue, gTrue);
- memset(tBitmap->getAlphaPtr(), 0, bitmapWidth * bitmapHeight);
+ memset(tBitmap->getAlphaPtr(), 0, (size_t)bitmapWidth * bitmapHeight);
nComps = splashColorModeNComps[srcMode];
// compute the inverse CTM
@@ -2266,6 +2299,7 @@ GBool SplashOutputDev::radialShadedFill(GfxState *state,
GfxColor color;
SplashColorPtr sColors, sColor;
+
// get the shading parameters
shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1);
t0 = shading->getDomain0();
@@ -2277,7 +2311,7 @@ GBool SplashOutputDev::radialShadedFill(GfxState *state,
// get clip region (in user space)
state->getUserClipBBox(&uxMin, &uyMin, &uxMax, &uyMax);
- if (uxMin >= uxMax || uyMin >= uyMax) {
+ if (uxMin > uxMax || uyMin > uyMax) {
return gTrue;
}
@@ -2370,7 +2404,7 @@ GBool SplashOutputDev::radialShadedFill(GfxState *state,
bitmapHeight = iyMax - iyMin;
tBitmap = new SplashBitmap(bitmapWidth, bitmapHeight, 1,
srcMode, gTrue, gTrue);
- memset(tBitmap->getAlphaPtr(), 0, bitmapWidth * bitmapHeight);
+ memset(tBitmap->getAlphaPtr(), 0, tBitmap->getAlphaRowSize() * bitmapHeight);
nComps = splashColorModeNComps[srcMode];
// compute the inverse CTM
@@ -2518,7 +2552,7 @@ GBool SplashOutputDev::radialShadedFill(GfxState *state,
for (y = byMin; y < byMax; ++y) {
dataPtr = tBitmap->getDataPtr()
+ y * tBitmap->getRowSize() + bxMin * nComps;
- alphaPtr = tBitmap->getAlphaPtr() + y * bitmapWidth + bxMin;
+ alphaPtr = tBitmap->getAlphaPtr() + y * tBitmap->getAlphaRowSize() + bxMin;
for (x = bxMin; x < bxMax; ++x) {
// convert coords to user space
@@ -2646,6 +2680,7 @@ void SplashOutputDev::computeShadingColor(GfxState *state,
}
}
+
void SplashOutputDev::clip(GfxState *state) {
SplashPath *path;
@@ -2954,7 +2989,7 @@ GBool SplashOutputDev::beginType3Char(GfxState *state, double x, double y,
t3gs = new T3GlyphStack();
t3gs->next = t3GlyphStack;
t3GlyphStack = t3gs;
- t3GlyphStack->code = code;
+ t3GlyphStack->code = (Gushort)code;
t3GlyphStack->cache = t3Font;
t3GlyphStack->cacheTag = NULL;
t3GlyphStack->cacheData = NULL;
@@ -2975,6 +3010,7 @@ void SplashOutputDev::endType3Char(GfxState *state) {
delete bitmap;
delete splash;
bitmap = t3GlyphStack->origBitmap;
+ colorMode = bitmap->getMode();
splash = t3GlyphStack->origSplash;
ctm = state->getCTM();
state->setCTM(ctm[0], ctm[1], ctm[2], ctm[3],
@@ -3093,6 +3129,7 @@ void SplashOutputDev::type3D1(GfxState *state, double wx, double wy,
// create the temporary bitmap
if (colorMode == splashModeMono1) {
+ colorMode = splashModeMono1;
bitmap = new SplashBitmap(t3Font->glyphW, t3Font->glyphH, 1,
splashModeMono1, gFalse);
splash = new Splash(bitmap, gFalse, t3GlyphStack->origSplash->getScreen());
@@ -3100,6 +3137,7 @@ void SplashOutputDev::type3D1(GfxState *state, double wx, double wy,
splash->clear(color);
color[0] = 0xff;
} else {
+ colorMode = splashModeMono8;
bitmap = new SplashBitmap(t3Font->glyphW, t3Font->glyphH, 1,
splashModeMono8, gFalse);
splash = new Splash(bitmap, vectorAntialias,
@@ -3112,10 +3150,9 @@ void SplashOutputDev::type3D1(GfxState *state, double wx, double wy,
splash->setStrokeAdjust(t3GlyphStack->origSplash->getStrokeAdjust());
splash->setEnablePathSimplification(
globalParams->getEnablePathSimplification());
+ copyState(t3GlyphStack->origSplash, gFalse);
splash->setFillPattern(new SplashSolidColor(color));
splash->setStrokePattern(new SplashSolidColor(color));
- //~ this should copy other state from t3GlyphStack->origSplash?
- //~ [this is likely the same situation as in beginTransparencyGroup()]
state->setCTM(ctm[0], ctm[1], ctm[2], ctm[3],
-t3Font->glyphX, -t3Font->glyphY);
updateCTM(state, 0, 0, 0, 0, 0, 0);
@@ -3149,11 +3186,11 @@ void SplashOutputDev::endTextObject(GfxState *state) {
struct SplashOutImageMaskData {
ImageStream *imgStr;
- GBool invert;
+ Guchar invert;
int width, height, y;
};
-GBool SplashOutputDev::imageMaskSrc(void *data, SplashColorPtr line) {
+GBool SplashOutputDev::imageMaskSrc(void *data, Guchar *line) {
SplashOutImageMaskData *imgMaskData = (SplashOutImageMaskData *)data;
Guchar *p;
SplashColorPtr q;
@@ -3341,18 +3378,13 @@ GBool SplashOutputDev::imageSrc(void *data, SplashColorPtr colorLine,
GBool SplashOutputDev::alphaImageSrc(void *data, SplashColorPtr colorLine,
Guchar *alphaLine) {
SplashOutImageData *imgData = (SplashOutImageData *)data;
- Guchar *p, *aq;
+ Guchar *p0, *p, *aq;
SplashColorPtr q, col;
- GfxRGB rgb;
- GfxGray gray;
-#if SPLASH_CMYK
- GfxCMYK cmyk;
-#endif
Guchar alpha;
int nComps, x, i;
if (imgData->y == imgData->height ||
- !(p = imgData->imgStr->getLine())) {
+ !(p0 = imgData->imgStr->getLine())) {
memset(colorLine, 0,
imgData->width * splashColorModeNComps[imgData->colorMode]);
memset(alphaLine, 0, imgData->width);
@@ -3361,73 +3393,73 @@ GBool SplashOutputDev::alphaImageSrc(void *data, SplashColorPtr colorLine,
nComps = imgData->colorMap->getNumPixelComps();
- for (x = 0, q = colorLine, aq = alphaLine;
- x < imgData->width;
- ++x, p += nComps) {
- alpha = 0;
- for (i = 0; i < nComps; ++i) {
- if (p[i] < imgData->maskColors[2*i] ||
- p[i] > imgData->maskColors[2*i+1]) {
- alpha = 0xff;
- break;
- }
- }
- if (imgData->lookup) {
- switch (imgData->colorMode) {
- case splashModeMono1:
- case splashModeMono8:
+ if (imgData->lookup) {
+ switch (imgData->colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ for (x = 0, p = p0, q = colorLine; x < imgData->width; ++x, ++p) {
*q++ = imgData->lookup[*p];
- break;
- case splashModeRGB8:
- case splashModeBGR8:
+ }
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ for (x = 0, p = p0, q = colorLine; x < imgData->width; ++x, ++p) {
col = &imgData->lookup[3 * *p];
*q++ = col[0];
*q++ = col[1];
*q++ = col[2];
- break;
+ }
+ break;
#if SPLASH_CMYK
- case splashModeCMYK8:
+ case splashModeCMYK8:
+ for (x = 0, p = p0, q = colorLine; x < imgData->width; ++x, ++p) {
col = &imgData->lookup[4 * *p];
*q++ = col[0];
*q++ = col[1];
*q++ = col[2];
*q++ = col[3];
- break;
-#endif
}
- *aq++ = alpha;
- } else {
- switch (imgData->colorMode) {
- case splashModeMono1:
- case splashModeMono8:
- imgData->colorMap->getGray(p, &gray, imgData->ri);
- *q++ = colToByte(gray);
- break;
- case splashModeRGB8:
- case splashModeBGR8:
- imgData->colorMap->getRGB(p, &rgb, imgData->ri);
- *q++ = colToByte(rgb.r);
- *q++ = colToByte(rgb.g);
- *q++ = colToByte(rgb.b);
- break;
+ break;
+#endif
+ }
+ } else {
+ switch (imgData->colorMode) {
+ case splashModeMono1:
+ case splashModeMono8:
+ imgData->colorMap->getGrayByteLine(p0, colorLine, imgData->width,
+ imgData->ri);
+ break;
+ case splashModeRGB8:
+ case splashModeBGR8:
+ imgData->colorMap->getRGBByteLine(p0, colorLine, imgData->width,
+ imgData->ri);
+ break;
#if SPLASH_CMYK
- case splashModeCMYK8:
- imgData->colorMap->getCMYK(p, &cmyk, imgData->ri);
- *q++ = colToByte(cmyk.c);
- *q++ = colToByte(cmyk.m);
- *q++ = colToByte(cmyk.y);
- *q++ = colToByte(cmyk.k);
- break;
+ case splashModeCMYK8:
+ imgData->colorMap->getCMYKByteLine(p0, colorLine, imgData->width,
+ imgData->ri);
+ break;
#endif
+ }
+ }
+
+ for (x = 0, p = p0, aq = alphaLine; x < imgData->width; ++x, p += nComps) {
+ alpha = 0;
+ for (i = 0; i < nComps; ++i) {
+ if (p[i] < imgData->maskColors[2*i] ||
+ p[i] > imgData->maskColors[2*i+1]) {
+ alpha = 0xff;
+ break;
}
- *aq++ = alpha;
}
+ *aq++ = alpha;
}
++imgData->y;
return gTrue;
}
+
void SplashOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
int width, int height,
GfxImageColorMap *colorMap,
@@ -3476,7 +3508,12 @@ void SplashOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
// build a lookup table here
imgData.lookup = NULL;
if (colorMap->getNumPixelComps() == 1) {
- n = 1 << colorMap->getBits();
+ if (colorMap->getBits() <= 8) {
+ n = 1 << colorMap->getBits();
+ } else {
+ // GfxImageColorMap and ImageStream compress 16-bit samples to 8-bit
+ n = 1 << 8;
+ }
switch (colorMode) {
case splashModeMono1:
case splashModeMono8:
@@ -3639,6 +3676,7 @@ GBool SplashOutputDev::maskedImageSrc(void *data, SplashColorPtr colorLine,
return gTrue;
}
+
void SplashOutputDev::drawMaskedImage(GfxState *state, Object *ref,
Stream *str, int width, int height,
GfxImageColorMap *colorMap,
@@ -3745,7 +3783,12 @@ void SplashOutputDev::drawMaskedImage(GfxState *state, Object *ref,
// build a lookup table here
imgData.lookup = NULL;
if (colorMap->getNumPixelComps() == 1) {
- n = 1 << colorMap->getBits();
+ if (colorMap->getBits() <= 8) {
+ n = 1 << colorMap->getBits();
+ } else {
+ // GfxImageColorMap and ImageStream compress 16-bit samples to 8-bit
+ n = 1 << 8;
+ }
switch (colorMode) {
case splashModeMono1:
case splashModeMono8:
@@ -3806,7 +3849,6 @@ struct SplashOutSoftMaskMatteImageData {
GfxImageColorMap *colorMap;
GfxRenderingIntent ri;
Guchar matte[gfxColorMaxComps];
- SplashColorPtr maskLookup;
SplashColorMode colorMode;
int width, height, y;
};
@@ -3846,8 +3888,8 @@ GBool SplashOutputDev::softMaskMatteImageSrc(void *data,
case splashModeMono8:
if (alpha) {
imgData->colorMap->getGray(p, &gray, imgData->ri);
- *q++ = imgData->matte[0] + (255 * (colToByte(gray) -
- imgData->matte[0])) / alpha;
+ *q++ = clip255(imgData->matte[0] +
+ (255 * (colToByte(gray) - imgData->matte[0])) / alpha);
} else {
*q++ = 0;
}
@@ -3856,12 +3898,12 @@ GBool SplashOutputDev::softMaskMatteImageSrc(void *data,
case splashModeBGR8:
if (alpha) {
imgData->colorMap->getRGB(p, &rgb, imgData->ri);
- *q++ = imgData->matte[0] + (255 * (colToByte(rgb.r) -
- imgData->matte[0])) / alpha;
- *q++ = imgData->matte[1] + (255 * (colToByte(rgb.g) -
- imgData->matte[1])) / alpha;
- *q++ = imgData->matte[2] + (255 * (colToByte(rgb.b) -
- imgData->matte[2])) / alpha;
+ *q++ = clip255(imgData->matte[0] +
+ (255 * (colToByte(rgb.r) - imgData->matte[0])) / alpha);
+ *q++ = clip255(imgData->matte[1] +
+ (255 * (colToByte(rgb.g) - imgData->matte[1])) / alpha);
+ *q++ = clip255(imgData->matte[2] +
+ (255 * (colToByte(rgb.b) - imgData->matte[2])) / alpha);
} else {
*q++ = 0;
*q++ = 0;
@@ -3872,14 +3914,18 @@ GBool SplashOutputDev::softMaskMatteImageSrc(void *data,
case splashModeCMYK8:
if (alpha) {
imgData->colorMap->getCMYK(p, &cmyk, imgData->ri);
- *q++ = imgData->matte[0] + (255 * (colToByte(cmyk.c) -
- imgData->matte[0])) / alpha;
- *q++ = imgData->matte[1] + (255 * (colToByte(cmyk.m) -
- imgData->matte[1])) / alpha;
- *q++ = imgData->matte[2] + (255 * (colToByte(cmyk.y) -
- imgData->matte[2])) / alpha;
- *q++ = imgData->matte[3] + (255 * (colToByte(cmyk.k) -
- imgData->matte[3])) / alpha;
+ *q++ = clip255(imgData->matte[0] +
+ (255 * (colToByte(cmyk.c) - imgData->matte[0]))
+ / alpha);
+ *q++ = clip255(imgData->matte[1] +
+ (255 * (colToByte(cmyk.m) - imgData->matte[1]))
+ / alpha);
+ *q++ = clip255(imgData->matte[2] +
+ (255 * (colToByte(cmyk.y) - imgData->matte[2]))
+ / alpha);
+ *q++ = clip255(imgData->matte[3] +
+ (255 * (colToByte(cmyk.k) - imgData->matte[3]))
+ / alpha);
} else {
*q++ = 0;
*q++ = 0;
@@ -3896,6 +3942,7 @@ GBool SplashOutputDev::softMaskMatteImageSrc(void *data,
return gTrue;
}
+
void SplashOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref,
Stream *str, int width, int height,
GfxImageColorMap *colorMap,
@@ -3990,13 +4037,11 @@ void SplashOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref,
#endif
}
//~ could add the matteImgData.lookup special case
- n = 1 << maskColorMap->getBits();
- matteImgData.maskLookup = (SplashColorPtr)gmalloc(n);
- for (i = 0; i < n; ++i) {
- pix = (Guchar)i;
- maskColorMap->getGray(&pix, &gray,
- state->getRenderingIntent());
- matteImgData.maskLookup[i] = colToByte(gray);
+ if (colorMap->getBits() <= 8) {
+ n = 1 << maskColorMap->getBits();
+ } else {
+ // GfxImageColorMap and ImageStream compress 16-bit samples to 8-bit
+ n = 1 << 8;
}
matteImgData.colorMode = colorMode;
matteImgData.width = width;
@@ -4004,7 +4049,6 @@ void SplashOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref,
matteImgData.y = 0;
splash->drawImage(&softMaskMatteImageSrc, &matteImgData,
srcMode, gTrue, width, height, mat, interpolate);
- gfree(matteImgData.maskLookup);
delete matteImgData.maskStr;
delete matteImgData.imgStr;
maskStr->close();
@@ -4069,7 +4113,12 @@ void SplashOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref,
// build a lookup table here
imgData.lookup = NULL;
if (colorMap->getNumPixelComps() == 1) {
- n = 1 << colorMap->getBits();
+ if (colorMap->getBits() <= 8) {
+ n = 1 << colorMap->getBits();
+ } else {
+ // GfxImageColorMap and ImageStream compress 16-bit samples to 8-bit
+ n = 1 << 8;
+ }
switch (colorMode) {
case splashModeMono1:
case splashModeMono8:
@@ -4113,6 +4162,8 @@ void SplashOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref,
splash->setSoftMask(NULL);
gfree(imgData.lookup);
delete imgData.imgStr;
+
+
str->close();
}
}
@@ -4217,7 +4268,7 @@ void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
SplashBitmap *backdropBitmap;
SplashColor color;
double xMin, yMin, xMax, yMax, x, y;
- int tx, ty, w, h, i;
+ int bw, bh, tx, ty, w, h, i;
// transform the bbox
state->transform(bbox[0], bbox[1], &x, &y);
@@ -4276,28 +4327,30 @@ void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
}
// convert box coords to integers
+ bw = bitmap->getWidth();
+ bh = bitmap->getHeight();
tx = (int)floor(xMin);
if (tx < 0) {
tx = 0;
- } else if (tx >= bitmap->getWidth()) {
- tx = bitmap->getWidth() - 1;
+ } else if (tx >= bw) {
+ tx = bw - 1;
}
ty = (int)floor(yMin);
if (ty < 0) {
ty = 0;
- } else if (ty >= bitmap->getHeight()) {
- ty = bitmap->getHeight() - 1;
+ } else if (ty >= bh) {
+ ty = bh - 1;
}
w = (int)ceil(xMax) - tx + 1;
- if (tx + w > bitmap->getWidth()) {
- w = bitmap->getWidth() - tx;
+ if (tx + w > bw) {
+ w = bw - tx;
}
if (w < 1) {
w = 1;
}
h = (int)ceil(yMax) - ty + 1;
- if (ty + h > bitmap->getHeight()) {
- h = bitmap->getHeight() - ty;
+ if (ty + h > bh) {
+ h = bh - ty;
}
if (h < 1) {
h = 1;
@@ -4351,16 +4404,7 @@ void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
mapStrokeAdjustMode[globalParams->getStrokeAdjust()]);
splash->setEnablePathSimplification(
globalParams->getEnablePathSimplification());
- //~ Acrobat apparently copies at least the fill and stroke colors, and
- //~ maybe other state(?) -- but not the clipping path (and not sure
- //~ what else)
- //~ [this is likely the same situation as in type3D1()]
- splash->setFillPattern(transpGroup->origSplash->getFillPattern()->copy());
- splash->setStrokePattern(
- transpGroup->origSplash->getStrokePattern()->copy());
- splash->setLineDash(transpGroup->origSplash->getLineDash(),
- transpGroup->origSplash->getLineDashLength(),
- transpGroup->origSplash->getLineDashPhase());
+ copyState(transpGroup->origSplash, gTrue);
if (isolated) {
for (i = 0; i < splashMaxColorComps; ++i) {
color[i] = 0;
@@ -4387,13 +4431,22 @@ void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
splash->setInTransparencyGroup(backdropBitmap, tx, ty,
!isolated, knockout);
}
+ splash->clearModRegion();
transpGroup->tBitmap = bitmap;
+#if 1 //~tmp
+ if (knockout) {
+ splash->setInShading(gTrue);
+ }
+#endif
state->shiftCTM(-tx, -ty);
updateCTM(state, 0, 0, 0, 0, 0, 0);
++nestCount;
}
void SplashOutputDev::endTransparencyGroup(GfxState *state) {
+ splash->getModRegion(&transpGroupStack->modXMin, &transpGroupStack->modYMin,
+ &transpGroupStack->modXMax, &transpGroupStack->modYMax);
+
// restore state
--nestCount;
delete splash;
@@ -4408,19 +4461,23 @@ void SplashOutputDev::paintTransparencyGroup(GfxState *state, double *bbox) {
SplashBitmap *tBitmap;
SplashTransparencyGroup *transpGroup;
GBool isolated;
- int tx, ty;
-
- tx = transpGroupStack->tx;
- ty = transpGroupStack->ty;
+ int xSrc, ySrc, xDest, yDest, w, h;
+
+ xSrc = transpGroupStack->modXMin;
+ ySrc = transpGroupStack->modYMin;
+ xDest = transpGroupStack->tx + transpGroupStack->modXMin;
+ yDest = transpGroupStack->ty + transpGroupStack->modYMin;
+ w = transpGroupStack->modXMax - transpGroupStack->modXMin + 1;
+ h = transpGroupStack->modYMax - transpGroupStack->modYMin + 1;
tBitmap = transpGroupStack->tBitmap;
isolated = transpGroupStack->isolated;
// paint the transparency group onto the parent bitmap
// - the clip path was set in the parent's state)
- if (tx < bitmap->getWidth() && ty < bitmap->getHeight()) {
+ if (xDest < bitmap->getWidth() && yDest < bitmap->getHeight() &&
+ w > 0 && h > 0) {
splash->setOverprintMask(0xffffffff);
- splash->composite(tBitmap, 0, 0, tx, ty,
- tBitmap->getWidth(), tBitmap->getHeight(),
+ splash->composite(tBitmap, xSrc, ySrc, xDest, yDest, w, h,
gFalse, !isolated);
}
@@ -4462,13 +4519,13 @@ void SplashOutputDev::setSoftMask(GfxState *state, double *bbox,
if (!alpha && tBitmap->getMode() != splashModeMono1) {
//~ need to correctly handle the case where no blending color
//~ space is given
- tSplash = new Splash(tBitmap, vectorAntialias,
- transpGroupStack->origSplash->getScreen());
- tSplash->setStrokeAdjust(
- mapStrokeAdjustMode[globalParams->getStrokeAdjust()]);
- tSplash->setEnablePathSimplification(
- globalParams->getEnablePathSimplification());
if (transpGroupStack->blendingColorSpace) {
+ tSplash = new Splash(tBitmap, vectorAntialias,
+ transpGroupStack->origSplash->getScreen());
+ tSplash->setStrokeAdjust(
+ mapStrokeAdjustMode[globalParams->getStrokeAdjust()]);
+ tSplash->setEnablePathSimplification(
+ globalParams->getEnablePathSimplification());
switch (tBitmap->getMode()) {
case splashModeMono1:
// transparency is not supported in mono1 mode
@@ -4562,7 +4619,7 @@ void SplashOutputDev::setSoftMask(GfxState *state, double *bbox,
} else {
lum2 = lum;
}
- p[x] = (int)(lum2 * 255.0 + 0.5);
+ p[x] = (Guchar)(lum2 * 255.0 + 0.5);
}
p += softMask->getRowSize();
}
@@ -4623,9 +4680,9 @@ void SplashOutputDev::setFillColor(int r, int g, int b) {
GfxCMYK cmyk;
#endif
- rgb.r = byteToCol(r);
- rgb.g = byteToCol(g);
- rgb.b = byteToCol(b);
+ rgb.r = byteToCol((Guchar)r);
+ rgb.g = byteToCol((Guchar)g);
+ rgb.b = byteToCol((Guchar)b);
switch (colorMode) {
case splashModeMono1:
case splashModeMono8:
@@ -4784,6 +4841,25 @@ SplashFont *SplashOutputDev::getFont(GString *name, SplashCoord *textMatA) {
return fontObj;
}
+// This is called when initializing a temporary Splash object for Type
+// 3 characters and transparency groups. Acrobat apparently copies at
+// least the fill and stroke colors, and the line parameters.
+//~ not sure what else should be copied -- the PDF spec is unclear
+//~ - fill and stroke alpha?
+void SplashOutputDev::copyState(Splash *oldSplash, GBool copyColors) {
+ // cached Type 3 chars set a color, so no need to copy the color here
+ if (copyColors) {
+ splash->setFillPattern(oldSplash->getFillPattern()->copy());
+ splash->setStrokePattern(oldSplash->getStrokePattern()->copy());
+ }
+ splash->setLineDash(oldSplash->getLineDash(),
+ oldSplash->getLineDashLength(),
+ oldSplash->getLineDashPhase());
+ splash->setLineCap(oldSplash->getLineCap());
+ splash->setLineJoin(oldSplash->getLineJoin());
+ splash->setLineWidth(oldSplash->getLineWidth());
+}
+
#if 1 //~tmp: turn off anti-aliasing temporarily
void SplashOutputDev::setInShading(GBool sh) {
splash->setInShading(sh);
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/SplashOutputDev.h b/Build/source/libs/xpdf/xpdf-src/xpdf/SplashOutputDev.h
index 6f26c7eeb2b..12e8831a905 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/SplashOutputDev.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/SplashOutputDev.h
@@ -51,6 +51,7 @@ public:
GBool bitmapTopDownA = gTrue,
GBool allowAntialiasA = gTrue);
+
// Destructor.
virtual ~SplashOutputDev();
@@ -78,6 +79,7 @@ public:
virtual GBool interpretType3Chars() { return gTrue; }
+
//----- initialization and control
// Start a page.
@@ -267,7 +269,7 @@ private:
void doUpdateFont(GfxState *state);
void drawType3Glyph(GfxState *state, T3FontCache *t3Font,
T3FontCacheTag *tag, Guchar *data);
- static GBool imageMaskSrc(void *data, SplashColorPtr line);
+ static GBool imageMaskSrc(void *data, Guchar *line);
static GBool imageSrc(void *data, SplashColorPtr colorLine,
Guchar *alphaLine);
static GBool alphaImageSrc(void *data, SplashColorPtr line,
@@ -283,6 +285,7 @@ private:
Splash *maskSplash,
double xMin, double yMin,
double xMax, double yMax);
+ void copyState(Splash *oldSplash, GBool copyColors);
SplashColorMode colorMode;
int bitmapRowPad;
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Stream.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/Stream.cc
index a4a626f9798..4e9a2dc2ff4 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Stream.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Stream.cc
@@ -97,7 +97,7 @@ char *Stream::getLine(char *buf, int size) {
getChar();
break;
}
- buf[i] = c;
+ buf[i] = (char)c;
}
buf[i] = '\0';
return buf;
@@ -146,9 +146,9 @@ Stream *Stream::addFilters(Object *dict, int recursion) {
str = makeFilter(obj.getName(), str, &params, recursion);
} else if (obj.isArray()) {
for (i = 0; i < obj.arrayGetLength(); ++i) {
- obj.arrayGet(i, &obj2);
+ obj.arrayGet(i, &obj2, recursion);
if (params.isArray())
- params.arrayGet(i, &params2);
+ params.arrayGet(i, &params2, recursion);
else
params2.initNull();
if (obj2.isName()) {
@@ -356,7 +356,8 @@ ImageStream::ImageStream(Stream *strA, int widthA, int nCompsA, int nBitsA) {
nVals = width * nComps;
inputLineSize = (nVals * nBits + 7) >> 3;
- if (nVals > INT_MAX / nBits - 7) {
+ if (width > INT_MAX / nComps ||
+ nVals > (INT_MAX - 7) / nBits) {
// force a call to gmallocn(-1,...), which will throw an exception
inputLineSize = -1;
}
@@ -369,10 +370,6 @@ ImageStream::ImageStream(Stream *strA, int widthA, int nCompsA, int nBitsA) {
} else {
imgLineSize = nVals;
}
- if (width > INT_MAX / nComps) {
- // force a call to gmallocn(-1,...), which will throw an exception
- imgLineSize = -1;
- }
imgLine = (Guchar *)gmallocn(imgLineSize, sizeof(Guchar));
}
imgIdx = nVals;
@@ -458,6 +455,7 @@ void ImageStream::skipLine() {
str->getBlock(inputLine, inputLineSize);
}
+
//------------------------------------------------------------------------
// StreamPredictor
//------------------------------------------------------------------------
@@ -574,14 +572,13 @@ GBool StreamPredictor::getNextLine() {
}
switch (curPred) {
case 11: // PNG sub
- predLine[i] = predLine[i - pixBytes] + (Guchar)c;
+ predLine[i] = (Guchar)(predLine[i - pixBytes] + c);
break;
case 12: // PNG up
- predLine[i] = predLine[i] + (Guchar)c;
+ predLine[i] = (Guchar)(predLine[i] + c);
break;
case 13: // PNG average
- predLine[i] = ((predLine[i - pixBytes] + predLine[i]) >> 1) +
- (Guchar)c;
+ predLine[i] = (Guchar)(((predLine[i - pixBytes] + predLine[i]) >> 1) + c);
break;
case 14: // PNG Paeth
left = predLine[i - pixBytes];
@@ -595,11 +592,11 @@ GBool StreamPredictor::getNextLine() {
if ((pc = p - upLeft) < 0)
pc = -pc;
if (pa <= pb && pa <= pc)
- predLine[i] = left + (Guchar)c;
+ predLine[i] = (Guchar)(left + c);
else if (pb <= pc)
- predLine[i] = up + (Guchar)c;
+ predLine[i] = (Guchar)(up + c);
else
- predLine[i] = upLeft + (Guchar)c;
+ predLine[i] = (Guchar)(upLeft + c);
break;
case 10: // PNG none
default: // no predictor or TIFF predictor
@@ -612,7 +609,7 @@ GBool StreamPredictor::getNextLine() {
if (predictor == 2) {
if (nBits == 8) {
for (i = pixBytes; i < rowBytes; ++i) {
- predLine[i] += predLine[i - nComps];
+ predLine[i] = (Guchar)(predLine[i] + predLine[i - nComps]);
}
} else if (nBits == 16) {
for (i = pixBytes; i < rowBytes; i += 2) {
@@ -1349,7 +1346,7 @@ GBool LZWStream::processNextCode() {
// process the next code
nextLength = seqLength + 1;
if (code < 256) {
- seqBuf[0] = code;
+ seqBuf[0] = (Guchar)code;
seqLength = 1;
} else if (code < nextCode) {
seqLength = table[code].length;
@@ -1357,9 +1354,9 @@ GBool LZWStream::processNextCode() {
seqBuf[i] = table[j].tail;
j = table[j].head;
}
- seqBuf[0] = j;
+ seqBuf[0] = (Guchar)j;
} else if (code == nextCode) {
- seqBuf[seqLength] = newChar;
+ seqBuf[seqLength] = (Guchar)newChar;
++seqLength;
} else {
error(errSyntaxError, getPos(), "Bad LZW stream - unexpected code");
@@ -1372,7 +1369,7 @@ GBool LZWStream::processNextCode() {
} else {
table[nextCode].length = nextLength;
table[nextCode].head = prevCode;
- table[nextCode].tail = newChar;
+ table[nextCode].tail = (Guchar)newChar;
++nextCode;
if (nextCode + early == 512)
nextBits = 10;
@@ -1534,8 +1531,8 @@ CCITTFaxStream::CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA,
columns = columnsA;
if (columns < 1) {
columns = 1;
- } else if (columns > INT_MAX - 2) {
- columns = INT_MAX - 2;
+ } else if (columns > INT_MAX - 3) {
+ columns = INT_MAX - 3;
}
rows = rowsA;
endOfBlock = endOfBlockA;
@@ -1543,10 +1540,10 @@ CCITTFaxStream::CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA,
blackXOR = black ? 0xff : 0x00;
// 0 <= codingLine[0] < codingLine[1] < ... < codingLine[n] = columns
// ---> max codingLine size = columns + 1
- // refLine has one extra guard entry at the end
- // ---> max refLine size = columns + 2
+ // refLine has two extra guard entries at the end
+ // ---> max refLine size = columns + 3
codingLine = (int *)gmallocn(columns + 1, sizeof(int));
- refLine = (int *)gmallocn(columns + 2, sizeof(int));
+ refLine = (int *)gmallocn(columns + 3, sizeof(int));
eof = gFalse;
row = 0;
@@ -1555,6 +1552,8 @@ CCITTFaxStream::CCITTFaxStream(Stream *strA, int encodingA, GBool endOfLineA,
codingLine[0] = columns;
nextCol = columns;
a0i = 0;
+ err = gFalse;
+ nErrors = 0;
}
CCITTFaxStream::~CCITTFaxStream() {
@@ -1714,7 +1713,7 @@ int CCITTFaxStream::getBlock(char *blk, int size) {
} while (bitsNeeded > 0);
}
nextCol += 8;
- blk[bytesRead++] = c ^ blackXOR;
+ blk[bytesRead++] = (char)(c ^ blackXOR);
}
return bytesRead;
}
@@ -1725,6 +1724,7 @@ inline void CCITTFaxStream::addPixels(int a1, int blackPixels) {
error(errSyntaxError, getPos(),
"CCITTFax row is wrong length ({0:d})", a1);
err = gTrue;
+ ++nErrors;
a1 = columns;
}
if ((a0i & 1) ^ blackPixels) {
@@ -1740,6 +1740,7 @@ inline void CCITTFaxStream::addPixelsNeg(int a1, int blackPixels) {
error(errSyntaxError, getPos(),
"CCITTFax row is wrong length ({0:d})", a1);
err = gTrue;
+ ++nErrors;
a1 = columns;
}
if ((a0i & 1) ^ blackPixels) {
@@ -1750,6 +1751,7 @@ inline void CCITTFaxStream::addPixelsNeg(int a1, int blackPixels) {
if (a1 < 0) {
error(errSyntaxError, getPos(), "Invalid CCITTFax code");
err = gTrue;
+ ++nErrors;
a1 = 0;
}
while (a0i > 0 && a1 <= codingLine[a0i - 1]) {
@@ -1777,6 +1779,7 @@ GBool CCITTFaxStream::readRow() {
refLine[i] = codingLine[i];
}
refLine[i++] = columns;
+ refLine[i++] = columns;
refLine[i] = columns;
codingLine[0] = 0;
a0i = 0;
@@ -1914,6 +1917,7 @@ GBool CCITTFaxStream::readRow() {
"Bad 2D code {0:04x} in CCITTFax stream", code1);
addPixels(columns, 0);
err = gTrue;
+ ++nErrors;
break;
}
}
@@ -2014,6 +2018,7 @@ GBool CCITTFaxStream::readRow() {
if (code1 != 0x001) {
error(errSyntaxError, getPos(),
"Bad RTC code in CCITTFax stream");
+ ++nErrors;
}
eatBits(12);
if (encoding > 0) {
@@ -2047,6 +2052,14 @@ GBool CCITTFaxStream::readRow() {
}
}
+ // corrupt CCITTFax streams can generate huge data expansion -- we
+ // avoid that case by aborting decode after 1000 errors
+ if (nErrors > 1000) {
+ error(errSyntaxError, getPos(), "Too many errors in CCITTFaxStream - aborting decode");
+ eof = gTrue;
+ return gFalse;
+ }
+
// set up for output
nextCol = 0;
a0i = (codingLine[0] > 0) ? 0 : 1;
@@ -2087,6 +2100,7 @@ short CCITTFaxStream::getTwoDimCode() {
}
error(errSyntaxError, getPos(),
"Bad two dim code ({0:04x}) in CCITTFax stream", code);
+ ++nErrors;
return EOF;
}
@@ -2117,7 +2131,7 @@ short CCITTFaxStream::getWhiteCode() {
return 1;
}
if (n < 9) {
- code <<= 9 - n;
+ code = (short)(code << (9 - n));
}
p = &whiteTab2[code];
if (p->bits == n) {
@@ -2131,7 +2145,7 @@ short CCITTFaxStream::getWhiteCode() {
return 1;
}
if (n < 12) {
- code <<= 12 - n;
+ code = (short)(code << (12 - n));
}
p = &whiteTab1[code];
if (p->bits == n) {
@@ -2142,6 +2156,7 @@ short CCITTFaxStream::getWhiteCode() {
}
error(errSyntaxError, getPos(),
"Bad white code ({0:04x}) in CCITTFax stream", code);
+ ++nErrors;
// eat a bit and return a positive number so that the caller doesn't
// go into an infinite loop
eatBits(1);
@@ -2177,7 +2192,7 @@ short CCITTFaxStream::getBlackCode() {
return 1;
}
if (n < 6) {
- code <<= 6 - n;
+ code = (short)(code << (6 - n));
}
p = &blackTab3[code];
if (p->bits == n) {
@@ -2191,7 +2206,7 @@ short CCITTFaxStream::getBlackCode() {
return 1;
}
if (n < 12) {
- code <<= 12 - n;
+ code = (short)(code << (12 - n));
}
if (code >= 64) {
p = &blackTab2[code - 64];
@@ -2207,7 +2222,7 @@ short CCITTFaxStream::getBlackCode() {
return 1;
}
if (n < 13) {
- code <<= 13 - n;
+ code = (short)(code << (13 - n));
}
p = &blackTab1[code];
if (p->bits == n) {
@@ -2218,6 +2233,7 @@ short CCITTFaxStream::getBlackCode() {
}
error(errSyntaxError, getPos(),
"Bad black code ({0:04x}) in CCITTFax stream", code);
+ ++nErrors;
// eat a bit and return a positive number so that the caller doesn't
// go into an infinite loop
eatBits(1);
@@ -2236,12 +2252,12 @@ short CCITTFaxStream::lookBits(int n) {
// than are available, but there may still be a valid code in
// however many bits are available -- we need to return correct
// data in this case
- return (inputBuf << (n - inputBits)) & (0xffffffff >> (32 - n));
+ return (short)((inputBuf << (n - inputBits)) & (0xffffffff >> (32 - n)));
}
inputBuf = (inputBuf << 8) + c;
inputBits += 8;
}
- return (inputBuf >> (inputBits - n)) & (0xffffffff >> (32 - n));
+ return (short)((inputBuf >> (inputBits - n)) & (0xffffffff >> (32 - n)));
}
GString *CCITTFaxStream::getPSFilter(int psLevel, const char *indent) {
@@ -2569,7 +2585,7 @@ static inline void dctClipInit() {
dctClipData[dctClipOffset + i] = 0;
}
for (i = 0; i < 256; ++i) {
- dctClipData[dctClipOffset + i] = i;
+ dctClipData[dctClipOffset + i] = (Guchar)i;
}
for (i = 256; i < 639; ++i) {
dctClipData[dctClipOffset + i] = 255;
@@ -2578,7 +2594,7 @@ static inline void dctClipInit() {
}
}
-static inline int dctClip(int x) {
+static inline Guchar dctClip(int x) {
return dctClipData[(dctClipOffset + x) & dctClipMask];
}
@@ -2646,7 +2662,7 @@ void DCTStream::reset() {
gotAdobeMarker = gFalse;
restartInterval = 0;
- if (!readHeader()) {
+ if (!readHeader(gTrue)) {
// force an EOF condition
progressive = gTrue;
y = height;
@@ -2707,7 +2723,7 @@ void DCTStream::reset() {
restartMarker = 0xd0;
restart();
readScan();
- } while (readHeader());
+ } while (readHeader(gFalse));
// decode
decodeImage();
@@ -2866,6 +2882,20 @@ GBool DCTStream::readMCURow() {
int x1, x2, y2, x3, y3, x4, y4, x5, y5, cc, i;
int c;
+ for (cc = 0; cc < numComps; ++cc) {
+ if (scanInfo.dcHuffTable[cc] >= numDCHuffTables ||
+ scanInfo.acHuffTable[cc] >= numACHuffTables) {
+ error(errSyntaxError, getPos(),
+ "Bad DCT data: invalid Huffman table index");
+ return gFalse;
+ }
+ if (compInfo[cc].quantTable > numQuantTables) {
+ error(errSyntaxError, getPos(),
+ "Bad DCT data: invalid quant table index");
+ return gFalse;
+ }
+ }
+
for (x1 = 0; x1 < width; x1 += mcuWidth) {
// deal with restart marker
@@ -2974,11 +3004,11 @@ GBool DCTStream::readMCURow() {
pCb = p1[1] - 128;
pCr = p1[2] - 128;
pR = ((pY << 16) + dctCrToR * pCr + 32768) >> 16;
- p1[0] = 255 - dctClip(pR);
+ p1[0] = (Guchar)(255 - dctClip(pR));
pG = ((pY << 16) + dctCbToG * pCb + dctCrToG * pCr + 32768) >> 16;
- p1[1] = 255 - dctClip(pG);
+ p1[1] = (Guchar)(255 - dctClip(pG));
pB = ((pY << 16) + dctCbToB * pCb + 32768) >> 16;
- p1[2] = 255 - dctClip(pB);
+ p1[2] = (Guchar)(255 - dctClip(pB));
}
}
}
@@ -3001,6 +3031,22 @@ void DCTStream::readScan() {
int *p1;
int c;
+ for (cc = 0; cc < numComps; ++cc) {
+ if (scanInfo.comp[cc] &&
+ (scanInfo.dcHuffTable[cc] >= numDCHuffTables ||
+ ((!progressive || scanInfo.lastCoeff > 0) &&
+ scanInfo.acHuffTable[cc] >= numACHuffTables))) {
+ error(errSyntaxError, getPos(),
+ "Bad DCT data: invalid Huffman table index");
+ return;
+ }
+ if (compInfo[cc].quantTable > numQuantTables) {
+ error(errSyntaxError, getPos(),
+ "Bad DCT data: invalid quant table index");
+ return;
+ }
+ }
+
if (scanInfo.numComps == 1) {
for (cc = 0; cc < numComps; ++cc) {
if (scanInfo.comp[cc]) {
@@ -3175,11 +3221,7 @@ GBool DCTStream::readProgressiveDataUnit(DCTHuffTable *dcHuffTable,
return gFalse;
}
if (bit) {
- if (data[0] >= 0) {
- data[0] += 1 << scanInfo.al;
- } else {
- data[0] -= 1 << scanInfo.al;
- }
+ data[0] += 1 << scanInfo.al;
}
}
++i;
@@ -3655,7 +3697,7 @@ int DCTStream::readHuffSym(DCTHuffTable *table) {
if ((bit = readBit()) == EOF) {
return 9999;
}
- code = (code << 1) + bit;
+ code = (Gushort)((code << 1) + bit);
++codeBits;
// look up code
@@ -3663,7 +3705,7 @@ int DCTStream::readHuffSym(DCTHuffTable *table) {
break;
}
if (code - table->firstCode[codeBits] < table->numCodes[codeBits]) {
- code -= table->firstCode[codeBits];
+ code = (Gushort)(code - table->firstCode[codeBits]);
return table->sym[table->firstSym[codeBits] + code];
}
} while (codeBits < 16);
@@ -3711,7 +3753,7 @@ int DCTStream::readBit() {
return bit;
}
-GBool DCTStream::readHeader() {
+GBool DCTStream::readHeader(GBool frame) {
GBool doScan;
int n;
int c = 0;
@@ -3723,11 +3765,21 @@ GBool DCTStream::readHeader() {
switch (c) {
case 0xc0: // SOF0 (sequential)
case 0xc1: // SOF1 (extended sequential)
+ if (!frame) {
+ error(errSyntaxError, getPos(),
+ "Invalid DCT marker in scan <{0:02x}>", c);
+ return gFalse;
+ }
if (!readBaselineSOF()) {
return gFalse;
}
break;
case 0xc2: // SOF2 (progressive)
+ if (!frame) {
+ error(errSyntaxError, getPos(),
+ "Invalid DCT marker in scan <{0:02x}>", c);
+ return gFalse;
+ }
if (!readProgressiveSOF()) {
return gFalse;
}
@@ -3738,6 +3790,11 @@ GBool DCTStream::readHeader() {
}
break;
case 0xd8: // SOI
+ if (!frame) {
+ error(errSyntaxError, getPos(),
+ "Invalid DCT marker in scan <{0:02x}>", c);
+ return gFalse;
+ }
break;
case 0xd9: // EOI
return gFalse;
@@ -3758,11 +3815,21 @@ GBool DCTStream::readHeader() {
}
break;
case 0xe0: // APP0
+ if (!frame) {
+ error(errSyntaxError, getPos(),
+ "Invalid DCT marker in scan <{0:02x}>", c);
+ return gFalse;
+ }
if (!readJFIFMarker()) {
return gFalse;
}
break;
case 0xee: // APP14
+ if (!frame) {
+ error(errSyntaxError, getPos(),
+ "Invalid DCT marker in scan <{0:02x}>", c);
+ return gFalse;
+ }
if (!readAdobeMarker()) {
return gFalse;
}
@@ -3945,9 +4012,9 @@ GBool DCTStream::readQuantTables() {
}
for (i = 0; i < 64; ++i) {
if (prec) {
- quantTables[index][dctZigZag[i]] = read16();
+ quantTables[index][dctZigZag[i]] = (Gushort)read16();
} else {
- quantTables[index][dctZigZag[i]] = str->getChar();
+ quantTables[index][dctZigZag[i]] = (Gushort)str->getChar();
}
}
if (prec) {
@@ -3993,13 +4060,13 @@ GBool DCTStream::readHuffmanTables() {
c = str->getChar();
tbl->firstSym[i] = sym;
tbl->firstCode[i] = code;
- tbl->numCodes[i] = c;
- sym += c;
- code = (code + c) << 1;
+ tbl->numCodes[i] = (Gushort)c;
+ sym = (Guchar)(sym + c);
+ code = (Gushort)((code + c) << 1);
}
length -= 16;
for (i = 0; i < sym; ++i)
- tbl->sym[i] = str->getChar();
+ tbl->sym[i] = (Guchar)str->getChar();
length -= sym;
}
return gTrue;
@@ -4030,7 +4097,7 @@ GBool DCTStream::readJFIFMarker() {
error(errSyntaxError, getPos(), "Bad DCT APP0 marker");
return gFalse;
}
- buf[i] = c;
+ buf[i] = (char)c;
}
length -= 5;
if (!memcmp(buf, "JFIF\0", 5)) {
@@ -4060,7 +4127,7 @@ GBool DCTStream::readAdobeMarker() {
if ((c = str->getChar()) == EOF) {
goto err;
}
- buf[i] = c;
+ buf[i] = (char)c;
}
if (!strncmp(buf, "Adobe", 5)) {
colorXform = buf[11];
@@ -4947,7 +5014,7 @@ void FlateStream::readSome() {
if ((code1 = getHuffmanCodeWord(&litCodeTab)) == EOF)
goto err;
if (code1 < 256) {
- buf[index] = code1;
+ buf[index] = (Guchar)code1;
remain = 1;
} else if (code1 == 256) {
endOfBlock = gTrue;
@@ -4981,7 +5048,7 @@ void FlateStream::readSome() {
endOfBlock = eof = gTrue;
break;
}
- buf[j] = c & 0xff;
+ buf[j] = (Guchar)c;
}
remain = i;
blockLen -= len;
@@ -5569,7 +5636,7 @@ GBool RunLengthEncoder::fillBuf() {
if ((c2 = str->getChar()) == EOF) {
eof = gTrue;
buf[0] = 0;
- buf[1] = c1;
+ buf[1] = (char)c1;
bufPtr = buf;
bufEnd = &buf[2];
return gTrue;
@@ -5585,12 +5652,12 @@ GBool RunLengthEncoder::fillBuf() {
while (n < 128 && (c = str->getChar()) == c1)
++n;
buf[0] = (char)(257 - n);
- buf[1] = c1;
+ buf[1] = (char)c1;
bufEnd = &buf[2];
if (c == EOF) {
eof = gTrue;
} else if (n < 128) {
- buf[2] = c;
+ buf[2] = (char)c;
nextEnd = &buf[3];
} else {
nextEnd = bufEnd;
@@ -5598,8 +5665,8 @@ GBool RunLengthEncoder::fillBuf() {
// get up to 128 chars
} else {
- buf[1] = c1;
- buf[2] = c2;
+ buf[1] = (char)c1;
+ buf[2] = (char)c2;
n = 2;
while (n < 128) {
if ((c = str->getChar()) == EOF) {
@@ -5607,7 +5674,7 @@ GBool RunLengthEncoder::fillBuf() {
break;
}
++n;
- buf[n] = c;
+ buf[n] = (char)c;
if (buf[n] == buf[n-1])
break;
}
@@ -5757,7 +5824,7 @@ void LZWEncoder::fillBuf() {
memcpy(inBuf, inBuf + inBufStart, inBufLen);
inBufStart = 0;
inBufLen += str->getBlock((char *)inBuf + inBufLen,
- sizeof(inBuf) - inBufLen);
+ (int)sizeof(inBuf) - inBufLen);
}
// increment codeLen; generate clear-table code
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/Stream.h b/Build/source/libs/xpdf/xpdf-src/xpdf/Stream.h
index 2515c15ea39..c25d46b2cd7 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/Stream.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/Stream.h
@@ -248,6 +248,7 @@ private:
int imgIdx; // current index in imgLine
};
+
//------------------------------------------------------------------------
// StreamPredictor
//------------------------------------------------------------------------
@@ -574,6 +575,7 @@ private:
int nextCol; // next column to read
int a0i; // index into codingLine
GBool err; // error on current line
+ int nErrors; // number of errors so far in this stream
void addPixels(int a1, int blackPixels);
void addPixelsNeg(int a1, int blackPixels);
@@ -726,7 +728,7 @@ private:
int readHuffSym(DCTHuffTable *table);
int readAmp(int size);
int readBit();
- GBool readHeader();
+ GBool readHeader(GBool frame);
GBool readBaselineSOF();
GBool readProgressiveSOF();
GBool readScanInfo();
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.cc
index 025c34c16c0..9c226af3f31 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.cc
@@ -29,6 +29,7 @@
#include "Error.h"
#include "GlobalParams.h"
#include "UnicodeMap.h"
+#include "UnicodeRemapping.h"
#include "UnicodeTypeTable.h"
#include "GfxState.h"
#include "Link.h"
@@ -155,6 +156,8 @@
// rectangles, in order to work around flakey ascent values in fonts.
#define selectionAscent 0.8
+#define maxUnicodeLen 16
+
//------------------------------------------------------------------------
// TextChar
//------------------------------------------------------------------------
@@ -243,7 +246,7 @@ int TextChar::cmpX(const void *p1, const void *p2) {
} else if (ch1->xMin > ch2->xMin) {
return 1;
} else {
- return 0;
+ return ch1->charPos - ch2->charPos;
}
}
@@ -256,7 +259,7 @@ int TextChar::cmpY(const void *p1, const void *p2) {
} else if (ch1->yMin > ch2->yMin) {
return 1;
} else {
- return 0;
+ return ch1->charPos - ch2->charPos;
}
}
@@ -547,7 +550,7 @@ TextFontInfo::TextFontInfo(GfxState *state) {
for (code = 0; code < 256; ++code) {
if ((name = ((Gfx8BitFont *)gfxFont)->getCharName(code)) &&
name[0] == 'm' && name[1] == '\0') {
- mWidth = ((Gfx8BitFont *)gfxFont)->getWidth(code);
+ mWidth = ((Gfx8BitFont *)gfxFont)->getWidth((Guchar)code);
break;
}
}
@@ -811,7 +814,20 @@ TextLine::~TextLine() {
}
double TextLine::getBaseline() {
- return ((TextWord *)words->get(0))->getBaseline();
+ TextWord *word0;
+
+ word0 = (TextWord *)words->get(0);
+ switch (rot) {
+ case 0:
+ default:
+ return yMax + fontSize * word0->font->descent;
+ case 1:
+ return xMin - fontSize * word0->font->descent;
+ case 2:
+ return yMin - fontSize * word0->font->descent;
+ case 3:
+ return xMax + fontSize * word0->font->descent;
+ }
}
int TextLine::cmpX(const void *p1, const void *p2) {
@@ -994,6 +1010,9 @@ int TextPosition::operator>(TextPosition pos) {
TextPage::TextPage(TextOutputControl *controlA) {
control = *controlA;
+ remapping = globalParams->getUnicodeRemapping();
+ uBufSize = 16;
+ uBuf = (Unicode *)gmallocn(uBufSize, sizeof(Unicode));
pageWidth = pageHeight = 0;
charPos = 0;
curFont = NULL;
@@ -1031,6 +1050,7 @@ TextPage::~TextPage() {
if (findCols) {
deleteGList(findCols, TextColumn);
}
+ gfree(uBuf);
}
void TextPage::startPage(GfxState *state) {
@@ -1122,20 +1142,21 @@ void TextPage::updateFont(GfxState *state) {
letterCode = code;
}
if (anyCode < 0 && name &&
- ((Gfx8BitFont *)gfxFont)->getWidth(code) > 0) {
+ ((Gfx8BitFont *)gfxFont)->getWidth((Guchar)code) > 0) {
anyCode = code;
}
}
if (mCode >= 0 &&
- (w = ((Gfx8BitFont *)gfxFont)->getWidth(mCode)) > 0) {
+ (w = ((Gfx8BitFont *)gfxFont)->getWidth((Guchar)mCode)) > 0) {
// 0.6 is a generic average 'm' width -- yes, this is a hack
curFontSize *= w / 0.6;
} else if (letterCode >= 0 &&
- (w = ((Gfx8BitFont *)gfxFont)->getWidth(letterCode)) > 0) {
+ (w = ((Gfx8BitFont *)gfxFont)->getWidth((Guchar)letterCode))
+ > 0) {
// even more of a hack: 0.5 is a generic letter width
curFontSize *= w / 0.5;
} else if (anyCode >= 0 &&
- (w = ((Gfx8BitFont *)gfxFont)->getWidth(anyCode)) > 0) {
+ (w = ((Gfx8BitFont *)gfxFont)->getWidth((Guchar)anyCode)) > 0) {
// better than nothing: 0.5 is a generic character width
curFontSize *= w / 0.5;
}
@@ -1184,7 +1205,7 @@ void TextPage::addChar(GfxState *state, double x, double y,
GfxRGB rgb;
double alpha;
GBool clipped, rtl;
- int i, j;
+ int uBufLen, i, j;
// if we're in an ActualText span, save the position info (the
// ActualText chars will be added by TextPage::endActualText()).
@@ -1246,16 +1267,26 @@ void TextPage::addChar(GfxState *state, double x, double y,
return;
}
+ // remap Unicode
+ uBufLen = 0;
+ for (i = 0; i < uLen; ++i) {
+ if (uBufSize - uBufLen < 8 && uBufSize < 20000) {
+ uBufSize *= 2;
+ uBuf = (Unicode *)greallocn(uBuf, uBufSize, sizeof(Unicode));
+ }
+ uBufLen += remapping->map(u[i], uBuf + uBufLen, uBufSize - uBufLen);
+ }
+
// add the characters
- if (uLen > 0) {
+ if (uBufLen > 0) {
// handle right-to-left ligatures: if there are multiple Unicode
// characters, and they're all right-to-left, insert them in
// right-to-left order
- if (uLen > 1) {
+ if (uBufLen > 1) {
rtl = gTrue;
- for (i = 0; i < uLen; ++i) {
- if (!unicodeTypeR(u[i])) {
+ for (i = 0; i < uBufLen; ++i) {
+ if (!unicodeTypeR(uBuf[i])) {
rtl = gFalse;
break;
}
@@ -1265,11 +1296,11 @@ void TextPage::addChar(GfxState *state, double x, double y,
}
// compute the bounding box
- w1 /= uLen;
- h1 /= uLen;
+ w1 /= uBufLen;
+ h1 /= uBufLen;
ascent = curFont->ascent * curFontSize;
descent = curFont->descent * curFontSize;
- for (i = 0; i < uLen; ++i) {
+ for (i = 0; i < uBufLen; ++i) {
x2 = x1 + i * w1;
y2 = y1 + i * h1;
switch (curRot) {
@@ -1320,11 +1351,12 @@ void TextPage::addChar(GfxState *state, double x, double y,
alpha = state->getFillOpacity();
}
if (rtl) {
- j = uLen - 1 - i;
+ j = uBufLen - 1 - i;
} else {
j = i;
}
- chars->append(new TextChar(u[j], charPos, nBytes, xMin, yMin, xMax, yMax,
+ chars->append(new TextChar(uBuf[j], charPos, nBytes,
+ xMin, yMin, xMax, yMax,
curRot, clipped,
state->getRender() == 3 || alpha < 0.001,
curFont, curFontSize,
@@ -1405,7 +1437,7 @@ void TextPage::write(void *outputStream, TextOutputFunc outputFunc) {
break;
case eolDOS:
eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol));
- eolLen += uMap->mapUnicode(0x0a, eol + eolLen, sizeof(eol) - eolLen);
+ eolLen += uMap->mapUnicode(0x0a, eol + eolLen, (int)sizeof(eol) - eolLen);
break;
case eolMac:
eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol));
@@ -4358,7 +4390,7 @@ GString *TextPage::getText(double xMin, double yMin,
break;
case eolDOS:
eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol));
- eolLen += uMap->mapUnicode(0x0a, eol + eolLen, sizeof(eol) - eolLen);
+ eolLen += uMap->mapUnicode(0x0a, eol + eolLen, (int)sizeof(eol) - eolLen);
break;
case eolMac:
eolLen = uMap->mapUnicode(0x0d, eol, sizeof(eol));
@@ -4497,6 +4529,28 @@ GBool TextPage::findCharRange(int pos, int length,
return gTrue;
}
+GBool TextPage::checkPointInside(double x, double y) {
+ TextColumn *col;
+ int colIdx;
+
+ buildFindCols();
+
+ //~ this doesn't handle RtL, vertical, or rotated text
+ //~ this doesn't handle drop caps
+
+ for (colIdx = 0; colIdx < findCols->getLength(); ++colIdx) {
+ col = (TextColumn *)findCols->get(colIdx);
+ if (col->getRotation() != 0) {
+ continue;
+ }
+ if (x >= col->getXMin() && x <= col->getXMax() &&
+ y >= col->getYMin() && y <= col->getYMax()) {
+ return gTrue;
+ }
+ }
+ return gFalse;
+}
+
GBool TextPage::findPointInside(double x, double y, TextPosition *pos) {
TextColumn *col;
int colIdx;
@@ -4708,6 +4762,37 @@ void TextPage::buildFindCols() {
}
TextWordList *TextPage::makeWordList() {
+ return makeWordListForChars(chars);
+}
+
+TextWordList *TextPage::makeWordListForRect(double xMin, double yMin,
+ double xMax, double yMax) {
+ TextWordList *words;
+ GList *chars2;
+ TextChar *ch;
+ double xx, yy;
+ int i;
+
+ // get all chars in the rectangle
+ // (i.e., all chars whose center lies inside the rectangle)
+ chars2 = new GList();
+ for (i = 0; i < chars->getLength(); ++i) {
+ ch = (TextChar *)chars->get(i);
+ xx = 0.5 * (ch->xMin + ch->xMax);
+ yy = 0.5 * (ch->yMin + ch->yMax);
+ if (xx > xMin && xx < xMax && yy > yMin && yy < yMax) {
+ chars2->append(ch);
+ }
+ }
+
+ words = makeWordListForChars(chars2);
+
+ delete chars2;
+
+ return words;
+}
+
+TextWordList *TextPage::makeWordListForChars(GList *charList) {
TextBlock *tree;
GList *columns;
TextColumn *col;
@@ -4718,12 +4803,18 @@ TextWordList *TextPage::makeWordList() {
GBool primaryLR;
int rot, colIdx, parIdx, lineIdx, wordIdx;
- rot = rotateChars(chars);
- primaryLR = checkPrimaryLR(chars);
- tree = splitChars(chars);
+#if 0 //~debug
+ dumpCharList(charList);
+#endif
+ rot = rotateChars(charList);
+ primaryLR = checkPrimaryLR(charList);
+ tree = splitChars(charList);
+#if 0 //~debug
+ dumpTree(tree);
+#endif
if (!tree) {
// no text
- unrotateChars(chars, rot);
+ unrotateChars(charList, rot);
return new TextWordList(new GList(), gTrue);
}
columns = buildColumns(tree, primaryLR);
@@ -4731,7 +4822,7 @@ TextWordList *TextPage::makeWordList() {
dumpColumns(columns, gTrue);
#endif
delete tree;
- unrotateChars(chars, rot);
+ unrotateChars(charList, rot);
if (control.html) {
rotateUnderlinesAndLinks(rot);
generateUnderlinesAndLinks(columns);
@@ -4791,9 +4882,9 @@ void TextPage::dumpChars(GList *charsA) {
for (i = 0; i < charsA->getLength(); ++i) {
ch = (TextChar *)charsA->get(i);
- printf("char: U+%04x '%c' xMin=%g yMin=%g xMax=%g yMax=%g fontSize=%g rot=%d charPos=%d charLen=%d\n",
+ printf("char: U+%04x '%c' xMin=%g yMin=%g xMax=%g yMax=%g fontSize=%g rot=%d charPos=%d charLen=%d spaceAfter=%d\n",
ch->c, ch->c & 0xff, ch->xMin, ch->yMin, ch->xMax, ch->yMax,
- ch->fontSize, ch->rot, ch->charPos, ch->charLen);
+ ch->fontSize, ch->rot, ch->charPos, ch->charLen, ch->spaceAfter);
}
}
@@ -5180,6 +5271,11 @@ TextWordList *TextOutputDev::makeWordList() {
return text->makeWordList();
}
+TextWordList *TextOutputDev::makeWordListForRect(double xMin, double yMin,
+ double xMax, double yMax) {
+ return text->makeWordListForRect(xMin, yMin, xMax, yMax);
+}
+
TextPage *TextOutputDev::takeText() {
TextPage *ret;
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h b/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h
index ca39e1ed4fa..0884ace6b6b 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/TextOutputDev.h
@@ -22,6 +22,7 @@
class GList;
class UnicodeMap;
+class UnicodeRemapping;
class TextBlock;
class TextChar;
@@ -390,6 +391,9 @@ public:
double *xMin, double *yMin,
double *xMax, double *yMax);
+ // Returns true if x,y falls inside a column.
+ GBool checkPointInside(double x, double y);
+
// Find a point inside a column. Returns false if x,y fall outside
// all columns.
GBool findPointInside(double x, double y, TextPosition *pos);
@@ -425,6 +429,11 @@ public:
// Build a flat word list, in the specified ordering.
TextWordList *makeWordList();
+ // Build a word list containing only words inside the specified
+ // rectangle.
+ TextWordList *makeWordListForRect(double xMin, double yMin,
+ double xMax, double yMax);
+
// Returns true if the primary character direction is left-to-right,
// false if it is right-to-left.
GBool primaryDirectionIsLR();
@@ -532,8 +541,15 @@ private:
void dumpUnderlines();
#endif
+ // word list
+ TextWordList *makeWordListForChars(GList *charList);
+
TextOutputControl control; // formatting parameters
+ UnicodeRemapping *remapping;
+ Unicode *uBuf;
+ int uBufSize;
+
double pageWidth, pageHeight; // width and height of current page
int charPos; // next character position (within content
// stream)
@@ -686,6 +702,11 @@ public:
// order (if both flags are false).
TextWordList *makeWordList();
+ // Build a word list containing only words inside the specified
+ // rectangle.
+ TextWordList *makeWordListForRect(double xMin, double yMin,
+ double xMax, double yMax);
+
// Returns the TextPage object for the last rasterized page,
// transferring ownership to the caller.
TextPage *takeText();
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/TileCompositor.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/TileCompositor.cc
index d0f5f1ea401..431c639a020 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/TileCompositor.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/TileCompositor.cc
@@ -231,7 +231,8 @@ void TileCompositor::forceRedraw() {
// BGR8 color modes.
void TileCompositor::clearBitmap() {
SplashColorPtr data, row, p;
- int rowSize, w, h, x, y;
+ SplashBitmapRowSize rowSize;
+ int w, h, x, y;
w = bitmap->getWidth();
h = bitmap->getHeight();
@@ -299,7 +300,9 @@ void TileCompositor::blit(SplashBitmap *srcBitmap, int xSrc, int ySrc,
SplashColorPtr paperColor;
Guchar *alphaData, *alphaP;
Guchar alpha, alpha1;
- int srcRowSize, destRowSize, alphaRowSize, x, y;
+ SplashBitmapRowSize srcRowSize, destRowSize;
+ size_t alphaRowSize;
+ int x, y;
srcData = srcBitmap->getDataPtr();
srcRowSize = srcBitmap->getRowSize();
@@ -307,7 +310,7 @@ void TileCompositor::blit(SplashBitmap *srcBitmap, int xSrc, int ySrc,
destRowSize = destBitmap->getRowSize();
if (compositeWithPaper && (alphaData = srcBitmap->getAlphaPtr())) {
- alphaRowSize = srcBitmap->getWidth();
+ alphaRowSize = srcBitmap->getAlphaRowSize();
paperColor = state->getPaperColor();
for (y = 0; y < h; ++y) {
destP = &destData[(yDest + y) * destRowSize + 3 * xDest];
@@ -325,7 +328,7 @@ void TileCompositor::blit(SplashBitmap *srcBitmap, int xSrc, int ySrc,
destP[1] = paperColor[1];
destP[2] = paperColor[2];
} else {
- alpha1 = 255 - alpha;
+ alpha1 = (Guchar)(255 - alpha);
destP[0] = div255(alpha1 * paperColor[0] + alpha * srcP[0]);
destP[1] = div255(alpha1 * paperColor[1] + alpha * srcP[1]);
destP[2] = div255(alpha1 * paperColor[2] + alpha * srcP[2]);
@@ -349,7 +352,8 @@ void TileCompositor::fill(int xDest, int yDest, int w, int h,
SplashColorPtr color) {
SplashColorPtr data, p;
Guchar c0, c1, c2;
- int rowSize, x, y;
+ SplashBitmapRowSize rowSize;
+ int x, y;
if (xDest < 0) {
w += xDest;
@@ -399,7 +403,8 @@ void TileCompositor::applySelection(int xDest, int yDest, int w, int h,
SplashColorPtr color) {
SplashColorPtr data, p;
Guchar c0, c1, c2;
- int rowSize, x, y;
+ SplashBitmapRowSize rowSize;
+ int x, y;
if (xDest < 0) {
w += xDest;
@@ -435,9 +440,9 @@ void TileCompositor::applySelection(int xDest, int yDest, int w, int h,
for (y = 0; y < h; ++y) {
p = &data[(yDest + y) * rowSize + 3 * xDest];
for (x = 0; x < w; ++x) {
- p[0] = (3 * p[0] + c0) / 4;
- p[1] = (3 * p[1] + c1) / 4;
- p[2] = (3 * p[2] + c2) / 4;
+ p[0] = (Guchar)((3 * p[0] + c0) / 4);
+ p[1] = (Guchar)((3 * p[1] + c1) / 4);
+ p[2] = (Guchar)((3 * p[2] + c2) / 4);
p += 3;
}
}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/TileMap.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/TileMap.cc
index 7e042cbb307..6db67738d70 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/TileMap.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/TileMap.cc
@@ -989,7 +989,6 @@ int TileMap::getPageLeftX(int page) {
}
offsetX2 = offsetX + pageW1 + sideBySidePageSpacing;
return (page == leftPage) ? offsetX : offsetX2;
- return 0;
case displaySideBySideContinuous:
leftPage = ((page - 1) & ~1) + 1;
rightPage = leftPage + 1;
@@ -1008,6 +1007,68 @@ int TileMap::getPageLeftX(int page) {
}
}
+int TileMap::getPageRightX(int page) {
+ int leftPage, rightPage, pageW1, pageW2, offsetX, offsetX2;
+
+ if (!state->getDoc() || !state->getDoc()->getNumPages()) {
+ return 0;
+ }
+
+ updatePageParams();
+ updateContinuousModeParams();
+
+ switch (state->getDisplayMode()) {
+ case displaySingle:
+ default:
+ return pageW[page - 1] - state->getWinW();
+ case displayContinuous:
+ return (maxW + pageW[page - 1]) / 2 - state->getWinW();
+ case displaySideBySideSingle:
+ leftPage = ((page - 1) & ~1) + 1;
+ rightPage = leftPage + 1;
+ pageW1 = pageW[leftPage - 1];
+ if (rightPage <= state->getDoc()->getNumPages()) {
+ pageW2 = pageW[rightPage - 1];
+ } else {
+ // display a single page as though there were a blank facing
+ // page of the same size
+ pageW2 = pageW1;
+ }
+ if (pageW1 + sideBySidePageSpacing + pageW2 < state->getWinW()) {
+ offsetX = (state->getWinW() -
+ (pageW1 + sideBySidePageSpacing + pageW2)) / 2;
+ } else {
+ offsetX = 0;
+ }
+ offsetX2 = offsetX + pageW1 + sideBySidePageSpacing;
+ return (page == leftPage) ? offsetX + pageW1 - state->getWinW()
+ : offsetX2 + pageW2 - state->getWinW();
+ case displaySideBySideContinuous:
+ leftPage = ((page - 1) & ~1) + 1;
+ rightPage = leftPage + 1;
+ pageW1 = pageW[leftPage - 1];
+ if (rightPage <= state->getDoc()->getNumPages()) {
+ pageW2 = pageW[rightPage - 1];
+ } else {
+ // display a single page as though there were a blank facing
+ // page of the same size
+ pageW2 = pageW1;
+ }
+ if (maxW + sideBySidePageSpacing + maxW2 < state->getWinW()) {
+ offsetX = (state->getWinW() -
+ (maxW + sideBySidePageSpacing + maxW2)) / 2;
+ } else {
+ offsetX = 0;
+ }
+ offsetX += maxW - pageW1;
+ offsetX2 = offsetX + pageW1 + sideBySidePageSpacing;
+ return (page == leftPage) ? offsetX + pageW1 - state->getWinW()
+ : offsetX2 + pageW2 - state->getWinW();
+ case displayHorizontalContinuous:
+ return pageX[page - 1] + pageW[page - 1] - state->getWinW();
+ }
+}
+
int TileMap::getFirstPage() {
updateContinuousModeParams();
switch (state->getDisplayMode()) {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/TileMap.h b/Build/source/libs/xpdf/xpdf-src/xpdf/TileMap.h
index f8cb2525e9f..222877c5050 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/TileMap.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/TileMap.h
@@ -122,6 +122,10 @@ public:
// this just returns zero.)
int getPageLeftX(int page);
+ // Return the scrollX setting that would place the right side of
+ // <page> at the right side of the window.
+ int getPageRightX(int page);
+
// In continuous modes: return the lowest page number visible
// anywhere in the window; in non-continuous modes: return the
// current page.
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/UTF8.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/UTF8.cc
index b2dc329f2f6..637d36b6d58 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/UTF8.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/UTF8.cc
@@ -151,7 +151,7 @@ GBool getUTF16BE(GString *s, int *i, Unicode *u) {
if (*i < s->getLength() - 1) {
w1 = ((s->getChar(*i) & 0xff) << 8) | (s->getChar(*i + 1) & 0xff);
*i += 2;
- *u = 0x10000 + ((w0 - 0xd8000) << 10) + (w1 - 0xdc00);
+ *u = 0x10000 + ((w0 - 0xd800) << 10) + (w1 - 0xdc00);
} else {
*u = (Unicode)w0;
}
@@ -173,7 +173,7 @@ GBool getUTF16LE(GString *s, int *i, Unicode *u) {
if (*i < s->getLength() - 1) {
w1 = (s->getChar(*i) & 0xff) | ((s->getChar(*i + 1) & 0xff) << 8);
*i += 2;
- *u = 0x10000 + ((w0 - 0xd8000) << 10) + (w1 - 0xdc00);
+ *u = 0x10000 + ((w0 - 0xd800) << 10) + (w1 - 0xdc00);
} else {
*u = (Unicode)w0;
}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.cc
new file mode 100644
index 00000000000..e4f09e19ae3
--- /dev/null
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.cc
@@ -0,0 +1,178 @@
+//========================================================================
+//
+// UnicodeRemapping.cc
+//
+// Copyright 2018 Glyph & Cog, LLC
+//
+//========================================================================
+
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma implementation
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include "gmem.h"
+#include "gmempp.h"
+#include "gfile.h"
+#include "GString.h"
+#include "Error.h"
+#include "UnicodeRemapping.h"
+
+//------------------------------------------------------------------------
+
+#define maxUnicodeString 8
+
+struct UnicodeRemappingString {
+ Unicode in;
+ Unicode out[maxUnicodeString];
+ int len;
+};
+
+//------------------------------------------------------------------------
+
+static int hexCharVals[256] = {
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0x
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 1x
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 2x
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, // 3x
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 4x
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 5x
+ -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 6x
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 7x
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 8x
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 9x
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Ax
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Bx
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Cx
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Dx
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Ex
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // Fx
+};
+
+// Parse a <len>-byte hex string <s> into *<val>. Returns false on
+// error.
+static GBool parseHex(char *s, int len, Guint *val) {
+ int i, x;
+
+ *val = 0;
+ for (i = 0; i < len; ++i) {
+ x = hexCharVals[s[i] & 0xff];
+ if (x < 0) {
+ return gFalse;
+ }
+ *val = (*val << 4) + x;
+ }
+ return gTrue;
+}
+
+//------------------------------------------------------------------------
+
+UnicodeRemapping::UnicodeRemapping() {
+ for (int i = 0; i < 256; ++i) {
+ page0[i] = (Unicode)i;
+ }
+ sMap = NULL;
+ sMapLen = sMapSize = 0;
+}
+
+UnicodeRemapping::~UnicodeRemapping() {
+ gfree(sMap);
+}
+
+void UnicodeRemapping::addRemapping(Unicode in, Unicode *out, int len) {
+ int i;
+
+ if (in < 256 && len == 1) {
+ page0[in] = out[0];
+ } else {
+ if (in < 256) {
+ page0[in] = 0xffffffff;
+ }
+ if (sMapLen == sMapSize) {
+ sMapSize += 16;
+ sMap = (UnicodeRemappingString *)
+ greallocn(sMap, sMapSize, sizeof(UnicodeRemappingString));
+ }
+ sMap[sMapLen].in = in;
+ for (i = 0; i < len && i < maxUnicodeString; ++i) {
+ sMap[sMapLen].out[i] = out[i];
+ }
+ sMap[sMapLen].len = i;
+ ++sMapLen;
+ }
+}
+
+void UnicodeRemapping::parseFile(GString *fileName) {
+ FILE *f;
+ char buf[256];
+ Unicode in;
+ Unicode out[maxUnicodeString];
+ char *tok;
+ int line, n;
+
+ if (!(f = openFile(fileName->getCString(), "r"))) {
+ error(errSyntaxError, -1, "Couldn't open unicodeRemapping file '{0:t}'",
+ fileName);
+ return;
+ }
+
+ line = 0;
+ while (getLine(buf, sizeof(buf), f)) {
+ ++line;
+ if (!(tok = strtok(buf, " \t\r\n")) ||
+ !parseHex(tok, (int)strlen(tok), &in)) {
+ error(errSyntaxWarning, -1,
+ "Bad line ({0:d}) in unicodeRemapping file '{1:t}'",
+ line, fileName);
+ continue;
+ }
+ n = 0;
+ while (n < maxUnicodeString) {
+ if (!(tok = strtok(NULL, " \t\r\n"))) {
+ break;
+ }
+ if (!parseHex(tok, (int)strlen(tok), &out[n])) {
+ error(errSyntaxWarning, -1,
+ "Bad line ({0:d}) in unicodeRemapping file '{1:t}'",
+ line, fileName);
+ break;
+ }
+ ++n;
+ }
+ addRemapping(in, out, n);
+ }
+
+ fclose(f);
+}
+
+int UnicodeRemapping::map(Unicode in, Unicode *out, int size) {
+ int a, b, m, i;
+
+ if (in < 256 && page0[in] != 0xffffffff) {
+ out[0] = page0[in];
+ return 1;
+ }
+
+ a = -1;
+ b = sMapLen;
+ // invariant: sMap[a].in < in < sMap[b].in
+ while (b - a > 1) {
+ m = (a + b) / 2;
+ if (sMap[m].in < in) {
+ a = m;
+ } else if (in < sMap[m].in) {
+ b = m;
+ } else {
+ for (i = 0; i < sMap[m].len && i < size; ++i) {
+ out[i] = sMap[m].out[i];
+ }
+ return i;
+ }
+ }
+
+ out[0] = in;
+ return 1;
+}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.h b/Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.h
new file mode 100644
index 00000000000..950c93afc8e
--- /dev/null
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/UnicodeRemapping.h
@@ -0,0 +1,51 @@
+//========================================================================
+//
+// UnicodeRemapping.h
+//
+// Sparse remapping of Unicode characters.
+//
+// Copyright 2018 Glyph & Cog, LLC
+//
+//========================================================================
+
+#ifndef UNICODEREMAPPING_H
+#define UNICODEREMAPPING_H
+
+#include <aconf.h>
+
+#ifdef USE_GCC_PRAGMAS
+#pragma interface
+#endif
+
+#include "CharTypes.h"
+
+struct UnicodeRemappingString;
+
+//------------------------------------------------------------------------
+
+class UnicodeRemapping {
+public:
+
+ // Create an empty (i.e., identity) remapping.
+ UnicodeRemapping();
+
+ ~UnicodeRemapping();
+
+ // Add a remapping for <in>.
+ void addRemapping(Unicode in, Unicode *out, int len);
+
+ // Add entries from the specified file to this UnicodeRemapping.
+ void parseFile(GString *fileName);
+
+ // Map <in> to zero or more (up to <size>) output characters in
+ // <out>. Returns the number of output characters.
+ int map(Unicode in, Unicode *out, int size);
+
+private:
+
+ Unicode page0[256];
+ UnicodeRemappingString *sMap;
+ int sMapLen, sMapSize;
+};
+
+#endif
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/XFAForm.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/XFAForm.cc
index 1ee893b10a0..18534401946 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/XFAForm.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/XFAForm.cc
@@ -24,6 +24,7 @@
#include "Gfx.h"
#include "GfxFont.h"
#include "Zoox.h"
+#include "PDF417Barcode.h"
#include "XFAForm.h"
#ifdef _WIN32
@@ -377,9 +378,14 @@ XFAForm *XFAForm::load(PDFDoc *docA, Catalog *catalog,
GString *data;
GBool fullXFAA;
GString *name, *fullName;
+ GHash *nameCount, *nameIdx, *fullNameCount, *fullNameIdx;
char buf[4096];
int n, i;
+ if (catalog->getNumPages() == 0) {
+ return NULL;
+ }
+
docA->getXRef()->getCatalog(&catDict);
catDict.dictLookup("NeedsRendering", &obj1);
fullXFAA = obj1.isBool() && obj1.getBool();
@@ -430,11 +436,21 @@ XFAForm *XFAForm::load(PDFDoc *docA, Catalog *catalog,
if (xfaForm->xml->getRoot()) {
if ((tmpl = xfaForm->xml->getRoot()->findFirstChildElement("template"))) {
- name = new GString("form");
- fullName = new GString("form");
xfaForm->curPageNum = 0;
xfaForm->curXOffset = xfaForm->curYOffset = 0;
- xfaForm->scanNamedNode(tmpl, name, fullName, gFalse, NULL);
+ name = new GString();
+ fullName = new GString();
+ nameCount = new GHash();
+ nameIdx = new GHash();
+ fullNameCount = new GHash();
+ fullNameIdx = new GHash();
+ xfaForm->scanNode(tmpl, name, fullName, gFalse, NULL,
+ nameCount, nameIdx, fullNameCount, fullNameIdx,
+ catalog);
+ delete nameCount;
+ delete nameIdx;
+ delete fullNameCount;
+ delete fullNameIdx;
delete name;
delete fullName;
@@ -488,228 +504,301 @@ XFAForm::~XFAForm() {
gfree(pageOffsetY);
}
-// Scan all children of <elem>, which is a named internal (non-field)
-// node, with the specified name.
-void XFAForm::scanNamedNode(ZxElement *elem, GString *name, GString *fullName,
- GBool inPageSet, XFATableInfo *tableInfo) {
- GHash *childNameCount, *childNameIdx;
- ZxNode *child;
+//~ need to handle exclGroup
+//~ - fields in an exclGroup may/must(?) not have names
+//~ - each field has an items element with the the value when that
+//~ field is selected
+
+// Scan <elem>. Constructs the node's name and full name. If <elem>
+// is a field, creates an XFAFormField; else scans <elem>'s children.
+void XFAForm::scanNode(ZxElement *elem,
+ GString *parentName, GString *parentFullName,
+ GBool inPageSet, XFATableInfo *tableInfo,
+ GHash *nameCount, GHash *nameIdx,
+ GHash *fullNameCount, GHash *fullNameIdx,
+ Catalog *catalog) {
+ ZxAttr *attr;
+ GString *name, *fullName, *namePart, *fullNamePart;
+ GHash *childNameCount, *childNameIdx, *childFullNameCount, *childFullNameIdx;
+ int colSpan, i;
- childNameCount = new GHash();
- for (child = elem->getFirstChild(); child; child = child->getNextChild()) {
- if (child->isElement()) {
- scanNames((ZxElement *)child, childNameCount);
+ if (elem->isElement("template")) {
+ name = new GString("form");
+ fullName = new GString("form");
+ childNameCount = new GHash();
+ scanNames(elem, childNameCount);
+ childNameIdx = new GHash();
+ childFullNameCount = new GHash();
+ scanFullNames(elem, childFullNameCount);
+ childFullNameIdx = new GHash();
+ } else {
+ if ((namePart = getNodeName(elem))) {
+ name = GString::format("{0:t}.{1:t}", parentName, namePart);
+ if (nameCount->lookupInt(namePart) > 1) {
+ i = nameIdx->lookupInt(namePart);
+ name->appendf("[{0:d}]", i);
+ nameIdx->replace(namePart, i + 1);
+ }
+ childNameCount = new GHash();
+ scanNames(elem, childNameCount);
+ childNameIdx = new GHash();
+ } else {
+ name = parentName->copy();
+ childNameCount = nameCount;
+ childNameIdx = nameIdx;
+ }
+ if ((fullNamePart = getNodeFullName(elem))) {
+ fullName = GString::format("{0:t}.{1:t}", parentFullName, fullNamePart);
+ if (fullNameCount->lookupInt(fullNamePart) > 1) {
+ i = fullNameIdx->lookupInt(fullNamePart);
+ fullName->appendf("[{0:d}]", i);
+ fullNameIdx->replace(fullNamePart, i + 1);
+ }
+ childFullNameCount = new GHash();
+ scanFullNames(elem, childFullNameCount);
+ childFullNameIdx = new GHash();
+ } else {
+ fullName = parentFullName->copy();
+ childFullNameCount = fullNameCount;
+ childFullNameIdx = fullNameIdx;
}
}
- childNameIdx = new GHash();
- for (child = elem->getFirstChild(); child; child = child->getNextChild()) {
- if (child->isElement()) {
- scanFields((ZxElement *)child, name, fullName, inPageSet,
- tableInfo, childNameCount, childNameIdx);
+
+ if (tableInfo && (elem->isElement("field") || elem->isElement("draw"))) {
+ if ((attr = elem->findAttr("colSpan"))) {
+ colSpan = atoi(attr->getValue()->getCString());
+ } else {
+ colSpan = 1;
}
+ } else {
+ colSpan = 0;
+ }
+
+ if (elem->isElement("field")) {
+ scanField(elem, name, fullName, inPageSet, tableInfo, colSpan, catalog);
+ } else {
+ scanNonField(elem, name, fullName, inPageSet, tableInfo, colSpan,
+ childNameCount, childNameIdx,
+ childFullNameCount, childFullNameIdx,
+ catalog);
+ }
+
+ if (tableInfo) {
+ tableInfo->columnIdx += colSpan;
+ }
+
+ delete name;
+ delete fullName;
+ if (childNameCount != nameCount) {
+ delete childNameCount;
+ }
+ if (childNameIdx != nameIdx) {
+ delete childNameIdx;
+ }
+ if (childFullNameCount != fullNameCount) {
+ delete childFullNameCount;
+ }
+ if (childFullNameIdx != fullNameIdx) {
+ delete childFullNameIdx;
}
- delete childNameIdx;
- delete childNameCount;
}
// Traverse all children of <elem>, incrementing nameCount[name] for
// each named child. Traversal stops at each named child.
void XFAForm::scanNames(ZxElement *elem, GHash *nameCount) {
- ZxNode *child;
- GString *childName;
+ ZxNode *node;
+ ZxElement *child;
+ GString *namePart;
- if ((childName = getNodeName(elem))) {
- if (nodeIsBindGlobal(elem)) {
- nameCount->replace(childName, 1);
- } else {
- nameCount->replace(childName, nameCount->lookupInt(childName) + 1);
+ for (node = elem->getFirstChild(); node; node = node->getNextChild()) {
+ if (node->isElement()) {
+ child = (ZxElement *)node;
+ if ((namePart = getNodeName(child))) {
+ if (nodeIsBindGlobal(child)) {
+ nameCount->replace(namePart, 1);
+ } else {
+ nameCount->replace(namePart, nameCount->lookupInt(namePart) + 1);
+ }
+ } else {
+ scanNames(child, nameCount);
+ }
}
- } else {
- for (child = elem->getFirstChild(); child; child = child->getNextChild()) {
- if (child->isElement()) {
- scanNames((ZxElement *)child, nameCount);
+ }
+}
+
+// Traverse all children of <elem>, incrementing fullNameCount[name]
+// for each full-named child. Traversal stops at each full-named
+// child.
+void XFAForm::scanFullNames(ZxElement *elem, GHash *fullNameCount) {
+ ZxNode *node;
+ ZxElement *child;
+ GString *fullNamePart;
+
+ for (node = elem->getFirstChild(); node; node = node->getNextChild()) {
+ if (node->isElement()) {
+ child = (ZxElement *)node;
+ if ((fullNamePart = getNodeFullName(child))) {
+ if (nodeIsBindGlobal(child)) {
+ fullNameCount->replace(fullNamePart, 1);
+ } else {
+ fullNameCount->replace(fullNamePart,
+ fullNameCount->lookupInt(fullNamePart) + 1);
+ }
+ } else {
+ scanFullNames(child, fullNameCount);
}
}
}
}
-// Create fields for <elem> and its children. <parentName> is the
-// name of <elem>'s parent. <siblingNameCount> contains the number of
-// occurrences of the siblings' (parent's childrens') names.
-// <siblingNameIdx> contains the number of occurrences of each name
-// used so far.
-void XFAForm::scanFields(ZxElement *elem, GString *parentName,
- GString *parentFullName, GBool inPageSet,
- XFATableInfo *tableInfo,
- GHash *siblingNameCount, GHash *siblingNameIdx) {
+void XFAForm::scanField(ZxElement *elem, GString *name, GString *fullName,
+ GBool inPageSet,
+ XFATableInfo *tableInfo, int colSpan,
+ Catalog *catalog) {
+ double xSubOffset, ySubOffset, columnWidth, rowHeight;
+
+ if (curPageNum == 0) {
+ curPageNum = 1;
+ }
+
+ xSubOffset = ySubOffset = 0;
+ columnWidth = rowHeight = 0;
+ if (tableInfo) {
+ if (tableInfo->columnIdx > 0 &&
+ tableInfo->columnIdx <= tableInfo->nColumns) {
+ xSubOffset = tableInfo->columnRight[tableInfo->columnIdx - 1];
+ }
+ if (tableInfo->columnIdx + colSpan <= tableInfo->nColumns) {
+ columnWidth = tableInfo->columnRight[tableInfo->columnIdx + colSpan - 1]
+ - xSubOffset;
+ }
+ ySubOffset = tableInfo->rowTop;
+ rowHeight = tableInfo->rowHeight;
+ curXOffset += xSubOffset;
+ curYOffset += ySubOffset;
+ }
+
+ fields->append(new XFAFormField(this, elem, name->copy(), fullName->copy(),
+ curPageNum, curXOffset, curYOffset,
+ columnWidth, rowHeight));
+
+ if (tableInfo) {
+ curXOffset -= xSubOffset;
+ curYOffset -= ySubOffset;
+ }
+}
+
+void XFAForm::scanNonField(ZxElement *elem, GString *name, GString *fullName,
+ GBool inPageSet,
+ XFATableInfo *tableInfo, int colSpan,
+ GHash *nameCount, GHash *nameIdx,
+ GHash *fullNameCount, GHash *fullNameIdx,
+ Catalog *catalog) {
XFATableInfo *newTableInfo;
ZxElement *brk, *contentArea;
ZxNode *child;
ZxAttr *attr;
- GString *elemName, *elemFullName, *name, *fullName;
- double xSubOffset, ySubOffset, columnWidth, rowHeight;
+ PDFRectangle *box;
+ double xSubOffset, ySubOffset;
int savedPageNum;
- int colSpan, i;
- //~ need to handle exclGroup
- //~ - fields in an exclGroup may/must(?) not have names
- //~ - each field has an items element with the the value when that
- //~ field is selected
+ newTableInfo = tableInfo;
+
+ if (elem->isElement("subform")) {
+
+ // update page number
+ if (((brk = elem->findFirstChildElement("breakBefore")) &&
+ (attr = brk->findAttr("targetType")) &&
+ !attr->getValue()->cmp("pageArea")) ||
+ ((brk = elem->findFirstChildElement("break")) &&
+ (attr = brk->findAttr("before")) &&
+ !attr->getValue()->cmp("pageArea")) ||
+ (curPageNum < nPages &&
+ (attr = elem->findAttr("w")) &&
+ (box = catalog->getPage(curPageNum + 1)->getMediaBox()) &&
+ XFAFormField::getMeasurement(attr, 0) == box->x2 - box->x1 &&
+ (attr = elem->findAttr("h")) &&
+ XFAFormField::getMeasurement(attr, 0) == box->y2 - box->y1)) {
+ if (curPageNum < nPages) {
+ ++curPageNum;
+ }
+ }
+
+ // update tableInfo
+ if ((attr = elem->findAttr("layout"))) {
+ if (!attr->getValue()->cmp("table")) {
+ newTableInfo = new XFATableInfo(elem->findAttr("columnWidths"));
+ newTableInfo->rowIdx = -1;
+ newTableInfo->columnIdx = 0;
+ } else if (tableInfo && !attr->getValue()->cmp("row")) {
+ ++tableInfo->rowIdx;
+ tableInfo->columnIdx = 0;
+ tableInfo->rowTop += tableInfo->rowHeight;
+ tableInfo->computeRowHeight(elem);
+ }
+ }
+
+ // update position
+ xSubOffset = XFAFormField::getMeasurement(elem->findAttr("x"), 0);
+ ySubOffset = XFAFormField::getMeasurement(elem->findAttr("y"), 0);
+ curXOffset += xSubOffset;
+ curYOffset += ySubOffset;
+
+ } else if (elem->isElement("area")) {
+ xSubOffset = XFAFormField::getMeasurement(elem->findAttr("x"), 0);
+ ySubOffset = XFAFormField::getMeasurement(elem->findAttr("y"), 0);
+ curXOffset += xSubOffset;
+ curYOffset += ySubOffset;
- if ((elemName = getNodeName(elem))) {
- name = GString::format("{0:t}.{1:t}", parentName, elemName);
} else {
- name = parentName;
+ xSubOffset = ySubOffset = 0;
}
- if ((elemFullName = getNodeFullName(elem))) {
- fullName = GString::format("{0:t}.{1:t}", parentFullName, elemFullName);
- } else {
- fullName = parentFullName;
- }
+ savedPageNum = curPageNum;
+ if (elem->isElement("pageSet")) {
+ inPageSet = gTrue;
+ curPageNum = 0;
- //~ do we need a separate siblingNameCount/siblingNameIndex for
- //~ elemName and elemFullName?
- if (elemFullName && siblingNameCount->lookupInt(elemFullName) > 1) {
- i = siblingNameIdx->lookupInt(elemFullName);
- fullName->appendf("[{0:d}]", i);
- if (elemName) {
- name->appendf("[{0:d}]", i);
+ } else if (elem->isElement("pageArea")) {
+ if (inPageSet) {
+ if (curPageNum < nPages) {
+ ++curPageNum;
+ }
+ if ((contentArea = elem->findFirstChildElement("contentArea"))) {
+ pageOffsetX[curPageNum - 1] =
+ XFAFormField::getMeasurement(contentArea->findAttr("x"), 0);
+ pageOffsetY[curPageNum - 1] =
+ XFAFormField::getMeasurement(contentArea->findAttr("y"), 0);
+ // looks like the contentArea offset (pageOffsetX/Y) should
+ // not be added to fields defined inside the pageArea
+ // element (?)
+ xSubOffset -= pageOffsetX[curPageNum - 1];
+ ySubOffset -= pageOffsetY[curPageNum - 1];
+ curXOffset -= pageOffsetX[curPageNum - 1];
+ curYOffset -= pageOffsetY[curPageNum - 1];
+ }
}
- siblingNameIdx->replace(elemFullName, i + 1);
}
- if (tableInfo && (elem->isElement("field") || elem->isElement("draw"))) {
- if ((attr = elem->findAttr("colSpan"))) {
- colSpan = atoi(attr->getValue()->getCString());
- } else {
- colSpan = 1;
+ for (child = elem->getFirstChild(); child; child = child->getNextChild()) {
+ if (child->isElement()) {
+ scanNode((ZxElement *)child, name, fullName, inPageSet,
+ newTableInfo, nameCount, nameIdx, fullNameCount, fullNameIdx,
+ catalog);
}
- } else {
- colSpan = 0;
}
- if (elem->isElement("field")) {
- if (curPageNum == 0) {
- curPageNum = 1;
- }
- xSubOffset = ySubOffset = 0;
- columnWidth = rowHeight = 0;
- if (tableInfo) {
- if (tableInfo->columnIdx > 0 &&
- tableInfo->columnIdx <= tableInfo->nColumns) {
- xSubOffset = tableInfo->columnRight[tableInfo->columnIdx - 1];
- }
- if (tableInfo->columnIdx + colSpan <= tableInfo->nColumns) {
- columnWidth = tableInfo->columnRight[tableInfo->columnIdx + colSpan - 1]
- - xSubOffset;
- }
- ySubOffset = tableInfo->rowTop;
- rowHeight = tableInfo->rowHeight;
- curXOffset += xSubOffset;
- curYOffset += ySubOffset;
- }
- fields->append(new XFAFormField(this, elem, name->copy(), fullName->copy(),
- curPageNum, curXOffset, curYOffset,
- columnWidth, rowHeight));
- if (tableInfo) {
- curXOffset -= xSubOffset;
- curYOffset -= ySubOffset;
- }
- } else {
- newTableInfo = tableInfo;
- if (elem->isElement("subform")) {
- if (((brk = elem->findFirstChildElement("breakBefore")) &&
- (attr = brk->findAttr("targetType")) &&
- !attr->getValue()->cmp("pageArea")) ||
- ((brk = elem->findFirstChildElement("break")) &&
- (attr = brk->findAttr("before")) &&
- !attr->getValue()->cmp("pageArea"))) {
- if (curPageNum < nPages) {
- ++curPageNum;
- }
- }
- if ((attr = elem->findAttr("layout"))) {
- if (!attr->getValue()->cmp("table")) {
- newTableInfo = new XFATableInfo(elem->findAttr("columnWidths"));
- newTableInfo->rowIdx = -1;
- newTableInfo->columnIdx = 0;
- } else if (tableInfo && !attr->getValue()->cmp("row")) {
- ++tableInfo->rowIdx;
- tableInfo->columnIdx = 0;
- tableInfo->rowTop += tableInfo->rowHeight;
- tableInfo->computeRowHeight(elem);
- }
- }
- xSubOffset = XFAFormField::getMeasurement(elem->findAttr("x"), 0);
- ySubOffset = XFAFormField::getMeasurement(elem->findAttr("y"), 0);
- curXOffset += xSubOffset;
- curYOffset += ySubOffset;
- } else if (elem->isElement("area")) {
- xSubOffset = XFAFormField::getMeasurement(elem->findAttr("x"), 0);
- ySubOffset = XFAFormField::getMeasurement(elem->findAttr("y"), 0);
- curXOffset += xSubOffset;
- curYOffset += ySubOffset;
- } else {
- xSubOffset = ySubOffset = 0;
- }
- savedPageNum = curPageNum;
- if (elem->isElement("pageSet")) {
- inPageSet = gTrue;
- curPageNum = 0;
- } else if (elem->isElement("pageArea")) {
- if (inPageSet) {
- if (curPageNum < nPages) {
- ++curPageNum;
- }
- if ((contentArea = elem->findFirstChildElement("contentArea"))) {
- pageOffsetX[curPageNum - 1] =
- XFAFormField::getMeasurement(contentArea->findAttr("x"), 0);
- pageOffsetY[curPageNum - 1] =
- XFAFormField::getMeasurement(contentArea->findAttr("y"), 0);
- // looks like the contentArea offset (pageOffsetX/Y) should
- // not be added to fields defined inside the pageArea
- // element (?)
- xSubOffset -= pageOffsetX[curPageNum - 1];
- ySubOffset -= pageOffsetY[curPageNum - 1];
- curXOffset -= pageOffsetX[curPageNum - 1];
- curYOffset -= pageOffsetY[curPageNum - 1];
- }
- }
- }
- if (elemName) {
- scanNamedNode(elem, name, fullName, inPageSet, newTableInfo);
- } else {
- for (child = elem->getFirstChild();
- child;
- child = child->getNextChild()) {
- if (child->isElement()) {
- scanFields((ZxElement *)child, name, fullName, inPageSet,
- newTableInfo, siblingNameCount, siblingNameIdx);
- }
- }
- }
- curXOffset -= xSubOffset;
- curYOffset -= ySubOffset;
- if (newTableInfo != tableInfo) {
- delete newTableInfo;
- }
- if (elem->isElement("pageSet")) {
- pageSetNPages = curPageNum;
- curPageNum = savedPageNum;
- inPageSet = gFalse;
- }
- }
+ curXOffset -= xSubOffset;
+ curYOffset -= ySubOffset;
- if (tableInfo) {
- tableInfo->columnIdx += colSpan;
+ if (newTableInfo != tableInfo) {
+ delete newTableInfo;
}
- if (name != parentName) {
- delete name;
- }
- if (fullName != parentFullName) {
- delete fullName;
+ if (elem->isElement("pageSet")) {
+ pageSetNPages = curPageNum;
+ curPageNum = savedPageNum;
+ inPageSet = gFalse;
}
}
@@ -987,6 +1076,7 @@ void XFAFormField::draw(int pageNumA, Gfx *gfx, GBool printing,
GfxFontDict *fontDict) {
ZxElement *uiElem;
ZxNode *node;
+ ZxAttr *attr;
GString *appearBuf;
MemStream *appearStream;
Object appearDict, appearance, resourceDict, resourceSubdict;
@@ -1001,6 +1091,14 @@ void XFAFormField::draw(int pageNumA, Gfx *gfx, GBool printing,
return;
}
+ // check the 'presence' attribute
+ if ((attr = xml->findAttr("presence"))) {
+ if (!attr->getValue()->cmp("hidden") ||
+ !attr->getValue()->cmp("invisible")) {
+ return;
+ }
+ }
+
getRectangle(&xfaX, &xfaY, &xfaW, &xfaH, &pdfX, &pdfY, &pdfW, &pdfH, &rot3);
// generate transform matrix
@@ -1239,7 +1337,7 @@ void XFAFormField::getRectangle(double *xfaX, double *xfaY,
}
}
- // look for <para> -- add the margin
+ // look for <para> -- add the margins
if ((paraElem = xml->findFirstChildElement("para"))) {
if ((attr = paraElem->findAttr("marginLeft"))) {
t = getMeasurement(attr, 0);
@@ -1250,6 +1348,15 @@ void XFAFormField::getRectangle(double *xfaX, double *xfaY,
t = getMeasurement(attr, 0);
*xfaW -= t;
}
+ if ((attr = paraElem->findAttr("spaceAbove"))) {
+ t = getMeasurement(attr, 0);
+ *xfaY += t;
+ *xfaH -= t;
+ }
+ if ((attr = paraElem->findAttr("spaceBelow"))) {
+ t = getMeasurement(attr, 0);
+ *xfaH -= t;
+ }
}
// get annot rect (UL corner, width, height) in XFA coords
@@ -1507,10 +1614,10 @@ void XFAFormField::drawBarCode(GfxFontDict *fontDict,
ZxAttr *attr;
GString *value, *value2, *barcodeType, *textLocation, *fontName, *s1, *s2;
XFAVertAlign textAlign;
- double wideNarrowRatio, fontSize;
+ double wideNarrowRatio, moduleWidth, moduleHeight, fontSize;
double yText, wText, yBarcode, hBarcode, wNarrow, xx;
GBool doText;
- int dataLength, checksum;
+ int dataLength, errorCorrectionLevel, checksum;
GBool bold, italic;
char *p;
int i, j, c;
@@ -1520,10 +1627,40 @@ void XFAFormField::drawBarCode(GfxFontDict *fontDict,
return;
}
+ //--- get font
+ fontName = NULL;
+ fontSize = 0.2 * h;
+ bold = gFalse;
+ italic = gFalse;
+ if ((fontElem = xml->findFirstChildElement("font"))) {
+ if ((attr = fontElem->findAttr("typeface"))) {
+ fontName = attr->getValue()->copy();
+ }
+ if ((attr = fontElem->findAttr("weight"))) {
+ if (!attr->getValue()->cmp("bold")) {
+ bold = gTrue;
+ }
+ }
+ if ((attr = fontElem->findAttr("posture"))) {
+ if (!attr->getValue()->cmp("italic")) {
+ italic = gTrue;
+ }
+ }
+ if ((attr = fontElem->findAttr("size"))) {
+ fontSize = getMeasurement(attr, fontSize);
+ }
+ }
+ if (!fontName) {
+ fontName = new GString("Courier");
+ }
+
//--- get field attributes
barcodeType = NULL;
wideNarrowRatio = 3;
+ moduleWidth = 0;
+ moduleHeight = 0;
dataLength = 0;
+ errorCorrectionLevel = 0;
textLocation = NULL;
if ((uiElem = xml->findFirstChildElement("ui")) &&
(barcodeElem = uiElem->findFirstChildElement("barcode"))) {
@@ -1544,50 +1681,28 @@ void XFAFormField::drawBarCode(GfxFontDict *fontDict,
wideNarrowRatio = atof(s1->getCString());
}
}
+ if ((attr = barcodeElem->findAttr("moduleWidth"))) {
+ moduleWidth = getMeasurement(attr, (0.25 / 25.4) * 72.0); // 0.25mm
+ }
+ if ((attr = barcodeElem->findAttr("moduleHeight"))) {
+ moduleHeight = getMeasurement(attr, (0.5 / 25.4) * 72.0); // 0.5mm
+ }
if ((attr = barcodeElem->findAttr("dataLength"))) {
dataLength = atoi(attr->getValue()->getCString());
}
+ if ((attr = barcodeElem->findAttr("errorCorrectionLevel"))) {
+ errorCorrectionLevel = atoi(attr->getValue()->getCString());
+ }
if ((attr = barcodeElem->findAttr("textLocation"))) {
textLocation = attr->getValue();
}
}
if (!barcodeType) {
error(errSyntaxError, -1, "Missing 'type' attribute in XFA barcode field");
- return;
- }
- if (!dataLength) {
- error(errSyntaxError, -1,
- "Missing 'dataLength' attribute in XFA barcode field");
+ delete fontName;
return;
}
- //--- get font
- fontName = NULL;
- fontSize = 0.2 * h;
- bold = gFalse;
- italic = gFalse;
- if ((fontElem = xml->findFirstChildElement("font"))) {
- if ((attr = fontElem->findAttr("typeface"))) {
- fontName = attr->getValue()->copy();
- }
- if ((attr = fontElem->findAttr("weight"))) {
- if (!attr->getValue()->cmp("bold")) {
- bold = gTrue;
- }
- }
- if ((attr = fontElem->findAttr("posture"))) {
- if (!attr->getValue()->cmp("italic")) {
- italic = gTrue;
- }
- }
- if ((attr = fontElem->findAttr("size"))) {
- fontSize = getMeasurement(attr, fontSize);
- }
- }
- if (!fontName) {
- fontName = new GString("Courier");
- }
-
//--- compute the embedded text type position
doText = gTrue;
yText = yBarcode = hBarcode = 0;
@@ -1631,6 +1746,11 @@ void XFAFormField::drawBarCode(GfxFontDict *fontDict,
//--- draw the bar code
if (!barcodeType->cmp("code3Of9")) {
+ if (!dataLength) {
+ error(errSyntaxError, -1,
+ "Missing 'dataLength' attribute in XFA barcode field");
+ goto err;
+ }
appearBuf->append("0 g\n");
wNarrow = w / ((7 + 3 * wideNarrowRatio) * (dataLength + 2));
xx = 0;
@@ -1652,6 +1772,11 @@ void XFAFormField::drawBarCode(GfxFontDict *fontDict,
// center the text on the drawn barcode (not the max length barcode)
wText = (value2->getLength() + 2) * (7 + 3 * wideNarrowRatio) * wNarrow;
} else if (!barcodeType->cmp("code128B")) {
+ if (!dataLength) {
+ error(errSyntaxError, -1,
+ "Missing 'dataLength' attribute in XFA barcode field");
+ goto err;
+ }
appearBuf->append("0 g\n");
wNarrow = w / (11 * (dataLength + 3) + 2);
xx = 0;
@@ -1688,9 +1813,14 @@ void XFAFormField::drawBarCode(GfxFontDict *fontDict,
xx, yBarcode, 2 * wNarrow, hBarcode);
// center the text on the drawn barcode (not the max length barcode)
wText = (11 * (value2->getLength() + 3) + 2) * wNarrow;
+ } else if (!barcodeType->cmp("pdf417")) {
+ drawPDF417Barcode(w, h, moduleWidth, moduleHeight, errorCorrectionLevel,
+ value2, appearBuf);
+ doText = gFalse;
} else {
error(errSyntaxError, -1,
- "Unimplemented barcode type in XFA barcode field");
+ "Unimplemented barcode type '{0:t}' in XFA barcode field",
+ barcodeType);
}
//~ add other barcode types here
@@ -1702,6 +1832,8 @@ void XFAFormField::drawBarCode(GfxFontDict *fontDict,
xfaHAlignCenter, textAlign, 0, yText, wText, h, gTrue,
fontDict, appearBuf);
}
+
+ err:
delete fontName;
delete value2;
}
@@ -2011,11 +2143,11 @@ void XFAFormField::drawText(GString *text, GBool multiLine, int combCells,
c = text->getChar(i) & 0xff;
if (c == '(' || c == ')' || c == '\\') {
appearBuf->append('\\');
- appearBuf->append(c);
+ appearBuf->append((char)c);
} else if (c < 0x20 || c >= 0x80) {
appearBuf->appendf("\\{0:03o}", c);
} else {
- appearBuf->append(c);
+ appearBuf->append((char)c);
}
}
appearBuf->append(") Tj\n");
@@ -2066,7 +2198,7 @@ void XFAFormField::drawText(GString *text, GBool multiLine, int combCells,
for (i = 0; i < text->getLength(); ++i) {
c = text->getChar(i) & 0xff;
if (font && !font->isCIDFont()) {
- charWidth = fontSize * ((Gfx8BitFont *)font)->getWidth(c);
+ charWidth = fontSize * ((Gfx8BitFont *)font)->getWidth((Guchar)c);
appearBuf->appendf("1 0 0 1 {0:.4f} {1:.4f} Tm\n",
xx + i * tw + 0.5 * (tw - charWidth), yy);
} else {
@@ -2076,11 +2208,11 @@ void XFAFormField::drawText(GString *text, GBool multiLine, int combCells,
appearBuf->append('(');
if (c == '(' || c == ')' || c == '\\') {
appearBuf->append('\\');
- appearBuf->append(c);
+ appearBuf->append((char)c);
} else if (c < 0x20 || c >= 0x80) {
appearBuf->appendf("{0:.4f} 0 Td\n", w);
} else {
- appearBuf->append(c);
+ appearBuf->append((char)c);
}
appearBuf->append(") Tj\n");
}
@@ -2136,11 +2268,11 @@ void XFAFormField::drawText(GString *text, GBool multiLine, int combCells,
c = text->getChar(i) & 0xff;
if (c == '(' || c == ')' || c == '\\') {
appearBuf->append('\\');
- appearBuf->append(c);
+ appearBuf->append((char)c);
} else if (c < 0x20 || c >= 0x80) {
appearBuf->appendf("\\{0:03o}", c);
} else {
- appearBuf->append(c);
+ appearBuf->append((char)c);
}
}
appearBuf->append(") Tj\n");
@@ -2322,7 +2454,7 @@ void XFAFormField::getNextLine(GString *text, int start,
break;
}
if (font && !font->isCIDFont()) {
- dw = ((Gfx8BitFont *)font)->getWidth(c) * fontSize;
+ dw = ((Gfx8BitFont *)font)->getWidth((Guchar)c) * fontSize;
} else {
// otherwise, make a crude estimate
dw = 0.5 * fontSize;
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/XFAForm.h b/Build/source/libs/xpdf/xpdf-src/xpdf/XFAForm.h
index 31794730d40..8e0b363386a 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/XFAForm.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/XFAForm.h
@@ -58,13 +58,24 @@ private:
XFAForm(PDFDoc *docA, int nPagesA, ZxDoc *xmlA,
Object *resourceDictA, GBool fullXFAA);
- void scanNamedNode(ZxElement *elem, GString *name, GString *fullName,
- GBool inPageSet, XFATableInfo *tableInfo);
+ void scanNode(ZxElement *elem,
+ GString *parentName, GString *parentFullName,
+ GBool inPageSet, XFATableInfo *tableInfo,
+ GHash *nameCount, GHash *nameIdx,
+ GHash *fullNameCount, GHash *fullNameIdx,
+ Catalog *catalog);
void scanNames(ZxElement *elem, GHash *nameCount);
- void scanFields(ZxElement *elem, GString *parentName,
- GString *parentFullName, GBool inPageSet,
- XFATableInfo *tableInfo,
- GHash *siblingNameCount, GHash *siblingNameIdx);
+ void scanFullNames(ZxElement *elem, GHash *fullNameCount);
+ void scanField(ZxElement *elem, GString *name, GString *fullName,
+ GBool inPageSet,
+ XFATableInfo *tableInfo, int colSpan,
+ Catalog *catalog);
+ void scanNonField(ZxElement *elem, GString *name, GString *fullName,
+ GBool inPageSet,
+ XFATableInfo *tableInfo, int colSpan,
+ GHash *nameCount, GHash *nameIdx,
+ GHash *fullNameCount, GHash *fullNameIdx,
+ Catalog *catalog);
GString *getNodeName(ZxElement *elem);
GString *getNodeFullName(ZxElement *elem);
GBool nodeIsBindGlobal(ZxElement *elem);
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.cc
index 10ea26568b8..d6b43cd3bea 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.cc
@@ -237,8 +237,8 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
// skip to the first object - this shouldn't be necessary because
// the First key is supposed to be equal to offsets[0], but just in
// case...
- if (i < offsets[0]) {
- objStr.getStream()->discardChars(offsets[0] - i);
+ if (first < offsets[0]) {
+ objStr.getStream()->discardChars(offsets[0] - first);
}
// parse the objects
@@ -309,7 +309,10 @@ XRef::XRef(BaseStream *strA, GBool repair) {
streamEndsLen = 0;
for (i = 0; i < objStrCacheSize; ++i) {
objStrs[i] = NULL;
+ objStrLastUse[i] = 0;
}
+ objStrCacheLength = 0;
+ objStrTime = 0;
encrypted = gFalse;
permFlags = defPermFlags;
@@ -443,6 +446,13 @@ GBool XRef::readXRef(GFileOffset *pos, XRefPosSet *posSet) {
char buf[100];
int n, i;
+ // check for a loop in the xref tables
+ if (posSet->check(*pos)) {
+ error(errSyntaxWarning, -1, "Infinite loop in xref table");
+ return gFalse;
+ }
+ posSet->add(*pos);
+
// the xref data should either be "xref ..." (for an xref table) or
// "nn gg obj << ... >> stream ..." (for an xref stream); possibly
// preceded by whitespace
@@ -505,12 +515,6 @@ GBool XRef::readXRefTable(GFileOffset *pos, int offset, XRefPosSet *posSet) {
GBool more;
int first, n, newSize, gen, i, c;
- if (posSet->check(*pos)) {
- error(errSyntaxWarning, -1, "Infinite loop in xref table");
- return gFalse;
- }
- posSet->add(*pos);
-
str->setPos(start + *pos + offset);
while (1) {
@@ -714,9 +718,9 @@ GBool XRef::readXRefStream(Stream *xrefStr, GFileOffset *pos) {
obj2.free();
}
obj.free();
- if (w[0] < 0 || w[0] > 4 ||
- w[1] < 0 || w[1] > (int)sizeof(GFileOffset) ||
- w[2] < 0 || w[2] > 4) {
+ if (w[0] < 0 || w[0] > 8 ||
+ w[1] < 0 || w[1] > 8 ||
+ w[2] < 0 || w[2] > 8) {
goto err0;
}
@@ -773,8 +777,8 @@ GBool XRef::readXRefStream(Stream *xrefStr, GFileOffset *pos) {
}
GBool XRef::readXRefStreamSection(Stream *xrefStr, int *w, int first, int n) {
- GFileOffset offset;
- int type, gen, c, newSize, i, j;
+ long long type, gen, offset;
+ int c, newSize, i, j;
if (first + n < 0) {
return gFalse;
@@ -810,27 +814,33 @@ GBool XRef::readXRefStreamSection(Stream *xrefStr, int *w, int first, int n) {
}
offset = (offset << 8) + c;
}
+ if (offset < 0 || offset > GFILEOFFSET_MAX) {
+ return gFalse;
+ }
for (gen = 0, j = 0; j < w[2]; ++j) {
if ((c = xrefStr->getChar()) == EOF) {
return gFalse;
}
gen = (gen << 8) + c;
}
+ if (gen < 0 || gen > INT_MAX) {
+ return gFalse;
+ }
if (entries[i].offset == (GFileOffset)-1) {
switch (type) {
case 0:
- entries[i].offset = offset;
- entries[i].gen = gen;
+ entries[i].offset = (GFileOffset)offset;
+ entries[i].gen = (int)gen;
entries[i].type = xrefEntryFree;
break;
case 1:
- entries[i].offset = offset;
- entries[i].gen = gen;
+ entries[i].offset = (GFileOffset)offset;
+ entries[i].gen = (int)gen;
entries[i].type = xrefEntryUncompressed;
break;
case 2:
- entries[i].offset = offset;
- entries[i].gen = gen;
+ entries[i].offset = (GFileOffset)offset;
+ entries[i].gen = (int)gen;
entries[i].type = xrefEntryCompressed;
break;
default:
@@ -1136,7 +1146,7 @@ Object *XRef::fetch(int num, int gen, Object *obj, int recursion) {
}
GBool XRef::getObjectStreamObject(int objStrNum, int objIdx,
- int objNum, Object *obj) {
+ int objNum, Object *obj) {
ObjectStream *objStr;
#if MULTITHREADED
@@ -1145,6 +1155,7 @@ GBool XRef::getObjectStreamObject(int objStrNum, int objIdx,
if (!(objStr = getObjectStream(objStrNum))) {
return gFalse;
}
+ cleanObjectStreamCache();
objStr->getObject(objIdx, objNum, obj);
#if MULTITHREADED
gUnlockMutex(&objStrsMutex);
@@ -1160,17 +1171,20 @@ ObjectStream *XRef::getObjectStream(int objStrNum) {
// check the MRU entry in the cache
if (objStrs[0] && objStrs[0]->getObjStrNum() == objStrNum) {
objStr = objStrs[0];
+ objStrLastUse[0] = objStrTime++;
return objStr;
}
// check the rest of the cache
- for (i = 1; i < objStrCacheSize; ++i) {
+ for (i = 1; i < objStrCacheLength; ++i) {
if (objStrs[i] && objStrs[i]->getObjStrNum() == objStrNum) {
objStr = objStrs[i];
for (j = i; j > 0; --j) {
objStrs[j] = objStrs[j - 1];
+ objStrLastUse[j] = objStrLastUse[j - 1];
}
objStrs[0] = objStr;
+ objStrLastUse[0] = objStrTime++;
return objStr;
}
}
@@ -1183,17 +1197,38 @@ ObjectStream *XRef::getObjectStream(int objStrNum) {
}
// add to the cache
- if (objStrs[objStrCacheSize - 1]) {
+ if (objStrCacheLength == objStrCacheSize) {
delete objStrs[objStrCacheSize - 1];
+ --objStrCacheLength;
}
- for (j = objStrCacheSize - 1; j > 0; --j) {
+ for (j = objStrCacheLength; j > 0; --j) {
objStrs[j] = objStrs[j - 1];
+ objStrLastUse[j] = objStrLastUse[j - 1];
}
+ ++objStrCacheLength;
objStrs[0] = objStr;
+ objStrLastUse[0] = objStrTime++;
return objStr;
}
+// If the oldest (least recently used) entry in the object stream
+// cache is more than objStrCacheTimeout accesses old (hasn't been
+// used in the last objStrCacheTimeout accesses), eject it from the
+// cache.
+void XRef::cleanObjectStreamCache() {
+ // NB: objStrTime and objStrLastUse[] are unsigned ints, so the
+ // mod-2^32 arithmetic makes the subtraction work out, even if the
+ // time wraps around.
+ if (objStrCacheLength > 1 &&
+ objStrTime - objStrLastUse[objStrCacheLength - 1]
+ > objStrCacheTimeout) {
+ delete objStrs[objStrCacheLength - 1];
+ objStrs[objStrCacheLength - 1] = NULL;
+ --objStrCacheLength;
+ }
+}
+
Object *XRef::getDocInfo(Object *obj) {
return trailerDict.dictLookup("Info", obj);
}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h b/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h
index ed44eac6e2b..9e63dcf04da 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/XRef.h
@@ -52,7 +52,8 @@ struct XRefCacheEntry {
#define xrefCacheSize 16
-#define objStrCacheSize 4
+#define objStrCacheSize 128
+#define objStrCacheTimeout 1000
class XRef {
public:
@@ -144,6 +145,10 @@ private:
int streamEndsLen; // number of valid entries in streamEnds
ObjectStream * // cached object streams
objStrs[objStrCacheSize];
+ int objStrCacheLength; // number of valid entries in objStrs[]
+ Guint // time of last use for each obj stream
+ objStrLastUse[objStrCacheSize];
+ Guint objStrTime; // current time for the obj stream cache
#if MULTITHREADED
GMutex objStrsMutex;
#endif
@@ -169,6 +174,7 @@ private:
GBool getObjectStreamObject(int objStrNum, int objIdx,
int objNum, Object *obj);
ObjectStream *getObjectStream(int objStrNum);
+ void cleanObjectStreamCache();
GFileOffset strToFileOffset(char *s);
};
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/config.h b/Build/source/libs/xpdf/xpdf-src/xpdf/config.h
index 2ce6362d289..b31590e8937 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/config.h
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/config.h
@@ -2,7 +2,7 @@
//
// config.h
//
-// Copyright 1996-2017 Glyph & Cog, LLC
+// Copyright 1996-2019 Glyph & Cog, LLC
//
//========================================================================
@@ -14,25 +14,25 @@
//------------------------------------------------------------------------
// xpdf version
-#define xpdfVersion "4.00"
-#define xpdfVersionNum 4.00
+#define xpdfVersion "4.01"
+#define xpdfVersionNum 4.01
#define xpdfMajorVersion 4
-#define xpdfMinorVersion 0
+#define xpdfMinorVersion 1
#define xpdfUpdateVersion 0
#define xpdfMajorVersionStr "4"
-#define xpdfMinorVersionStr "0"
+#define xpdfMinorVersionStr "1"
#define xpdfUpdateVersionStr "0"
// supported PDF version
-#define supportedPDFVersionStr "1.7"
-#define supportedPDFVersionNum 1.7
+#define supportedPDFVersionStr "2.0"
+#define supportedPDFVersionNum 2.0
// copyright notice
-#define xpdfCopyright "Copyright 1996-2017 Glyph & Cog, LLC"
+#define xpdfCopyright "Copyright 1996-2019 Glyph & Cog, LLC"
// Windows resource file stuff
-#define winxpdfVersion "WinXpdf 4.00"
-#define xpdfCopyrightAmp "Copyright 1996-2017 Glyph && Cog, LLC"
+#define winxpdfVersion "WinXpdf 4.01"
+#define xpdfCopyrightAmp "Copyright 1996-2019 Glyph && Cog, LLC"
//------------------------------------------------------------------------
// paper size
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc
index b44bedbb1a7..34fd439bd76 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdfdetach.cc
@@ -61,7 +61,7 @@ static ArgDesc argDesc[] = {
};
int main(int argc, char *argv[]) {
- GString *fileName;
+ char *fileName;
UnicodeMap *uMap;
GString *ownerPW, *userPW;
PDFDoc *doc;
@@ -76,6 +76,7 @@ int main(int argc, char *argv[]) {
exitCode = 99;
// parse args
+ fixCommandLine(&argc, &argv);
ok = parseArgs(argDesc, &argc, argv);
if ((doList ? 1 : 0) +
((saveNum != 0) ? 1 : 0) +
@@ -90,7 +91,7 @@ int main(int argc, char *argv[]) {
}
goto err0;
}
- fileName = new GString(argv[1]);
+ fileName = argv[1];
// read config file
globalParams = new GlobalParams(cfgFileName);
@@ -101,7 +102,6 @@ int main(int argc, char *argv[]) {
// get mapping to output encoding
if (!(uMap = globalParams->getTextEncoding())) {
error(errConfig, -1, "Couldn't get text encoding");
- delete fileName;
goto err1;
}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdffonts.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdffonts.cc
index 71a0ee8d4d3..59925094002 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdffonts.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdffonts.cc
@@ -95,7 +95,7 @@ static int seenObjsSize;
int main(int argc, char *argv[]) {
PDFDoc *doc;
- GString *fileName;
+ char *fileName;
GString *ownerPW, *userPW;
GBool ok;
Page *page;
@@ -109,6 +109,7 @@ int main(int argc, char *argv[]) {
exitCode = 99;
// parse args
+ fixCommandLine(&argc, &argv);
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc != 2 || printVersion || printHelp) {
fprintf(stderr, "pdffonts version %s\n", xpdfVersion);
@@ -118,7 +119,7 @@ int main(int argc, char *argv[]) {
}
goto err0;
}
- fileName = new GString(argv[1]);
+ fileName = argv[1];
// read config file
globalParams = new GlobalParams(cfgFileName);
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdfimages.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdfimages.cc
index d5ae9e426b9..24b7c0d448b 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdfimages.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdfimages.cc
@@ -74,7 +74,7 @@ static ArgDesc argDesc[] = {
int main(int argc, char *argv[]) {
PDFDoc *doc;
- GString *fileName;
+ char *fileName;
char *imgRoot;
GString *ownerPW, *userPW;
ImageOutputDev *imgOut;
@@ -84,6 +84,7 @@ int main(int argc, char *argv[]) {
exitCode = 99;
// parse args
+ fixCommandLine(&argc, &argv);
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc != 3 || printVersion || printHelp) {
fprintf(stderr, "pdfimages version %s\n", xpdfVersion);
@@ -93,7 +94,7 @@ int main(int argc, char *argv[]) {
}
goto err0;
}
- fileName = new GString(argv[1]);
+ fileName = argv[1];
imgRoot = argv[2];
// read config file
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdfinfo.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdfinfo.cc
index ef36bcecfc3..f5f593b9f13 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdfinfo.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdfinfo.cc
@@ -13,6 +13,7 @@
#include <string.h>
#include <time.h>
#include <math.h>
+#include <ctype.h>
#include "gmem.h"
#include "gmempp.h"
#include "parseargs.h"
@@ -30,12 +31,18 @@
#include "CharTypes.h"
#include "UnicodeMap.h"
#include "TextString.h"
+#include "UTF8.h"
+#include "Zoox.h"
#include "Error.h"
#include "config.h"
-static void printInfoString(Dict *infoDict, const char *key, const char *text,
+static void printInfoString(Object *infoDict, const char *infoKey,
+ ZxDoc *xmp, const char *xmpKey1,
+ const char *xmpKey2,
+ const char *text, GBool parseDate,
UnicodeMap *uMap);
-static void printInfoDate(Dict *infoDict, const char *key, const char *text);
+static GString *parseInfoDate(GString *s);
+static GString *parseXMPDate(GString *s);
static void printBox(const char *text, PDFRectangle *box);
static int firstPage = 1;
@@ -84,7 +91,7 @@ static ArgDesc argDesc[] = {
int main(int argc, char *argv[]) {
PDFDoc *doc;
- GString *fileName;
+ char *fileName;
GString *ownerPW, *userPW;
UnicodeMap *uMap;
Page *page;
@@ -94,6 +101,7 @@ int main(int argc, char *argv[]) {
double w, h, wISO, hISO;
FILE *f;
GString *metadata;
+ ZxDoc *xmp;
GBool ok;
int exitCode;
int pg, i;
@@ -102,6 +110,7 @@ int main(int argc, char *argv[]) {
exitCode = 99;
// parse args
+ fixCommandLine(&argc, &argv);
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc != 2 || printVersion || printHelp) {
fprintf(stderr, "pdfinfo version %s\n", xpdfVersion);
@@ -111,7 +120,7 @@ int main(int argc, char *argv[]) {
}
goto err0;
}
- fileName = new GString(argv[1]);
+ fileName = argv[1];
// read config file
globalParams = new GlobalParams(cfgFileName);
@@ -122,7 +131,6 @@ int main(int argc, char *argv[]) {
// get mapping to output encoding
if (!(uMap = globalParams->getTextEncoding())) {
error(errConfig, -1, "Couldn't get text encoding");
- delete fileName;
goto err1;
}
@@ -165,24 +173,23 @@ int main(int argc, char *argv[]) {
// print doc info
doc->getDocInfo(&info);
- if (info.isDict()) {
- printInfoString(info.getDict(), "Title", "Title: ", uMap);
- printInfoString(info.getDict(), "Subject", "Subject: ", uMap);
- printInfoString(info.getDict(), "Keywords", "Keywords: ", uMap);
- printInfoString(info.getDict(), "Author", "Author: ", uMap);
- printInfoString(info.getDict(), "Creator", "Creator: ", uMap);
- printInfoString(info.getDict(), "Producer", "Producer: ", uMap);
- if (rawDates) {
- printInfoString(info.getDict(), "CreationDate", "CreationDate: ",
- uMap);
- printInfoString(info.getDict(), "ModDate", "ModDate: ",
- uMap);
- } else {
- printInfoDate(info.getDict(), "CreationDate", "CreationDate: ");
- printInfoDate(info.getDict(), "ModDate", "ModDate: ");
- }
+ if ((metadata = doc->readMetadata())) {
+ xmp = ZxDoc::loadMem(metadata->getCString(), metadata->getLength());
+ } else {
+ xmp = NULL;
}
+ printInfoString(&info, "Title", xmp, "dc:title", NULL, "Title: ", gFalse, uMap);
+ printInfoString(&info, "Subject", xmp, "dc:description", NULL, "Subject: ", gFalse, uMap);
+ printInfoString(&info, "Keywords", xmp, "pdf:Keywords", NULL, "Keywords: ", gFalse, uMap);
+ printInfoString(&info, "Author", xmp, "dc:creator", NULL, "Author: ", gFalse, uMap);
+ printInfoString(&info, "Creator", xmp, "xmp:CreatorTool", NULL, "Creator: ", gFalse, uMap);
+ printInfoString(&info, "Producer", xmp, "pdf:Producer", NULL, "Producer: ", gFalse, uMap);
+ printInfoString(&info, "CreationDate", xmp, "xap:CreateDate", "xmp:CreateDate", "CreationDate: ", !rawDates, uMap);
+ printInfoString(&info, "ModDate", xmp, "xap:ModifyDate", "xmp:ModifyDate", "ModDate: ", !rawDates, uMap);
info.free();
+ if (xmp) {
+ delete xmp;
+ }
// print tagging info
printf("Tagged: %s\n",
@@ -276,11 +283,7 @@ int main(int argc, char *argv[]) {
}
// print file size
-#ifdef VMS
- f = fopen(fileName->getCString(), "rb", "ctx=stm");
-#else
- f = fopen(fileName->getCString(), "rb");
-#endif
+ f = openFile(fileName, "rb");
if (f) {
gfseek(f, 0, SEEK_END);
printf("File size: %u bytes\n", (Guint)gftell(f));
@@ -294,10 +297,13 @@ int main(int argc, char *argv[]) {
printf("PDF version: %.1f\n", doc->getPDFVersion());
// print the metadata
- if (printMetadata && (metadata = doc->readMetadata())) {
+ if (printMetadata && metadata) {
fputs("Metadata:\n", stdout);
fputs(metadata->getCString(), stdout);
fputc('\n', stdout);
+ }
+
+ if (metadata) {
delete metadata;
}
@@ -318,72 +324,218 @@ int main(int argc, char *argv[]) {
return exitCode;
}
-static void printInfoString(Dict *infoDict, const char *key, const char *text,
+static void printInfoString(Object *infoDict, const char *infoKey,
+ ZxDoc *xmp, const char *xmpKey1,
+ const char *xmpKey2,
+ const char *text, GBool parseDate,
UnicodeMap *uMap) {
Object obj;
TextString *s;
Unicode *u;
+ Unicode uu;
char buf[8];
+ GString *value, *tmp;
+ ZxElement *rdf, *elem, *child;
+ ZxNode *node, *node2;
int i, n;
- if (infoDict->lookup(key, &obj)->isString()) {
- fputs(text, stdout);
- s = new TextString(obj.getString());
- u = s->getUnicode();
- for (i = 0; i < s->getLength(); ++i) {
- n = uMap->mapUnicode(u[i], buf, sizeof(buf));
- fwrite(buf, 1, n, stdout);
+ value = NULL;
+
+ //-- check the info dictionary
+ if (infoDict->isDict()) {
+ if (infoDict->dictLookup(infoKey, &obj)->isString()) {
+ if (!parseDate || !(value = parseInfoDate(obj.getString()))) {
+ s = new TextString(obj.getString());
+ u = s->getUnicode();
+ value = new GString();
+ for (i = 0; i < s->getLength(); ++i) {
+ n = uMap->mapUnicode(u[i], buf, sizeof(buf));
+ value->append(buf, n);
+ }
+ delete s;
+ }
}
+ obj.free();
+ }
+
+ //-- check the XMP metadata
+ if (xmp) {
+ rdf = xmp->getRoot();
+ if (rdf->isElement("x:xmpmeta")) {
+ rdf = rdf->findFirstChildElement("rdf:RDF");
+ }
+ if (rdf && rdf->isElement("rdf:RDF")) {
+ for (node = rdf->getFirstChild(); node; node = node->getNextChild()) {
+ if (node->isElement("rdf:Description")) {
+ if (!(elem = node->findFirstChildElement(xmpKey1)) && xmpKey2) {
+ elem = node->findFirstChildElement(xmpKey2);
+ }
+ if (elem) {
+ if ((child = elem->findFirstChildElement("rdf:Alt")) ||
+ (child = elem->findFirstChildElement("rdf:Seq"))) {
+ if ((node2 = child->findFirstChildElement("rdf:li"))) {
+ node2 = node2->getFirstChild();
+ }
+ } else {
+ node2 = elem->getFirstChild();
+ }
+ if (node2 && node2->isCharData()) {
+ if (value) {
+ delete value;
+ }
+ if (!parseDate ||
+ !(value = parseXMPDate(((ZxCharData *)node2)->getData()))) {
+ tmp = ((ZxCharData *)node2)->getData();
+ int i = 0;
+ value = new GString();
+ while (getUTF8(tmp, &i, &uu)) {
+ n = uMap->mapUnicode(uu, buf, sizeof(buf));
+ value->append(buf, n);
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if (value) {
+ fputs(text, stdout);
+ fwrite(value->getCString(), 1, value->getLength(), stdout);
fputc('\n', stdout);
- delete s;
+ delete value;
}
- obj.free();
}
-static void printInfoDate(Dict *infoDict, const char *key, const char *text) {
- Object obj;
- char *s;
+static GString *parseInfoDate(GString *s) {
int year, mon, day, hour, min, sec, n;
struct tm tmStruct;
char buf[256];
+ char *p;
- if (infoDict->lookup(key, &obj)->isString()) {
- fputs(text, stdout);
- s = obj.getString()->getCString();
- if (s[0] == 'D' && s[1] == ':') {
- s += 2;
- }
- if ((n = sscanf(s, "%4d%2d%2d%2d%2d%2d",
- &year, &mon, &day, &hour, &min, &sec)) >= 1) {
- switch (n) {
- case 1: mon = 1;
- case 2: day = 1;
- case 3: hour = 0;
- case 4: min = 0;
- case 5: sec = 0;
- }
- tmStruct.tm_year = year - 1900;
- tmStruct.tm_mon = mon - 1;
- tmStruct.tm_mday = day;
- tmStruct.tm_hour = hour;
- tmStruct.tm_min = min;
- tmStruct.tm_sec = sec;
- tmStruct.tm_wday = -1;
- tmStruct.tm_yday = -1;
- tmStruct.tm_isdst = -1;
- // compute the tm_wday and tm_yday fields
- if (mktime(&tmStruct) != (time_t)-1 &&
- strftime(buf, sizeof(buf), "%c", &tmStruct)) {
- fputs(buf, stdout);
- } else {
- fputs(s, stdout);
+ p = s->getCString();
+ if (p[0] == 'D' && p[1] == ':') {
+ p += 2;
+ }
+ if ((n = sscanf(p, "%4d%2d%2d%2d%2d%2d",
+ &year, &mon, &day, &hour, &min, &sec)) < 1) {
+ return NULL;
+ }
+ switch (n) {
+ case 1: mon = 1;
+ case 2: day = 1;
+ case 3: hour = 0;
+ case 4: min = 0;
+ case 5: sec = 0;
+ }
+ tmStruct.tm_year = year - 1900;
+ tmStruct.tm_mon = mon - 1;
+ tmStruct.tm_mday = day;
+ tmStruct.tm_hour = hour;
+ tmStruct.tm_min = min;
+ tmStruct.tm_sec = sec;
+ tmStruct.tm_wday = -1;
+ tmStruct.tm_yday = -1;
+ tmStruct.tm_isdst = -1;
+ // compute the tm_wday and tm_yday fields
+ if (!(mktime(&tmStruct) != (time_t)-1 &&
+ strftime(buf, sizeof(buf), "%c", &tmStruct))) {
+ return NULL;
+ }
+ return new GString(buf);
+}
+
+static GString *parseXMPDate(GString *s) {
+ int year, mon, day, hour, min, sec, tz;
+ struct tm tmStruct;
+ char buf[256];
+ char *p;
+
+ p = s->getCString();
+ if (isdigit(p[0]) && isdigit(p[1]) && isdigit(p[2]) && isdigit(p[3])) {
+ buf[0] = p[0];
+ buf[1] = p[1];
+ buf[2] = p[2];
+ buf[3] = p[3];
+ buf[4] = '\0';
+ year = atoi(buf);
+ p += 4;
+ } else {
+ return NULL;
+ }
+ mon = day = 1;
+ hour = min = sec = 0;
+ tz = 2000;
+ if (p[0] == '-' && isdigit(p[1]) && isdigit(p[2])) {
+ buf[0] = p[1];
+ buf[1] = p[2];
+ buf[2] = '\0';
+ mon = atoi(buf);
+ p += 3;
+ if (p[0] == '-' && isdigit(p[1]) && isdigit(p[2])) {
+ buf[0] = p[1];
+ buf[1] = p[2];
+ buf[2] = '\0';
+ day = atoi(buf);
+ p += 3;
+ if (p[0] == 'T' && isdigit(p[1]) && isdigit(p[2]) &&
+ p[3] == ':' && isdigit(p[4]) && isdigit(p[5])) {
+ buf[0] = p[1];
+ buf[1] = p[2];
+ buf[2] = '\0';
+ hour = atoi(buf);
+ buf[0] = p[4];
+ buf[1] = p[5];
+ buf[2] = '\0';
+ min = atoi(buf);
+ p += 6;
+ if (p[0] == ':' && isdigit(p[1]) && isdigit(p[2])) {
+ buf[0] = p[1];
+ buf[1] = p[2];
+ buf[2] = '\0';
+ sec = atoi(buf);
+ if (p[0] == '.' && isdigit(p[1])) {
+ p += 2;
+ }
+ }
+ if ((p[0] == '+' || p[0] == '-') &&
+ isdigit(p[1]) && isdigit(p[2]) && p[3] == ':' &&
+ isdigit(p[4]) && isdigit(p[5])) {
+ buf[0] = p[1];
+ buf[1] = p[2];
+ buf[2] = '\0';
+ tz = atoi(buf);
+ buf[0] = p[4];
+ buf[1] = p[5];
+ buf[2] = '\0';
+ tz = tz * 60 + atoi(buf);
+ tz = tz * 60;
+ if (p[0] == '-') {
+ tz = -tz;
+ }
+ }
}
- } else {
- fputs(s, stdout);
}
- fputc('\n', stdout);
}
- obj.free();
+
+ tmStruct.tm_year = year - 1900;
+ tmStruct.tm_mon = mon - 1;
+ tmStruct.tm_mday = day;
+ tmStruct.tm_hour = hour;
+ tmStruct.tm_min = min;
+ tmStruct.tm_sec = sec;
+ tmStruct.tm_wday = -1;
+ tmStruct.tm_yday = -1;
+ tmStruct.tm_isdst = -1;
+ // compute the tm_wday and tm_yday fields
+ //~ this ignores the timezone
+ if (!(mktime(&tmStruct) != (time_t)-1 &&
+ strftime(buf, sizeof(buf), "%c", &tmStruct))) {
+ return NULL;
+ }
+ return new GString(buf);
}
static void printBox(const char *text, PDFRectangle *box) {
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftohtml.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftohtml.cc
index 1f081384e1c..b458202effb 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftohtml.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftohtml.cc
@@ -82,7 +82,7 @@ static int writeToFile(void *file, const char *data, int size) {
int main(int argc, char *argv[]) {
PDFDoc *doc;
- GString *fileName;
+ char *fileName;
char *htmlDir;
GString *ownerPW, *userPW;
HTMLGen *htmlGen;
@@ -94,6 +94,7 @@ int main(int argc, char *argv[]) {
exitCode = 99;
// parse args
+ fixCommandLine(&argc, &argv);
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc != 3 || printVersion || printHelp) {
fprintf(stderr, "pdftohtml version %s\n", xpdfVersion);
@@ -103,7 +104,7 @@ int main(int argc, char *argv[]) {
}
goto err0;
}
- fileName = new GString(argv[1]);
+ fileName = argv[1];
htmlDir = argv[2];
// read config file
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftopng.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftopng.cc
index 223ab665cba..720066d32a8 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftopng.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftopng.cc
@@ -92,7 +92,7 @@ static void finishPNG(png_structp *png, png_infop *pngInfo);
int main(int argc, char *argv[]) {
PDFDoc *doc;
- GString *fileName;
+ char *fileName;
char *pngRoot;
GString *pngFile;
GString *ownerPW, *userPW;
@@ -108,6 +108,7 @@ int main(int argc, char *argv[]) {
exitCode = 99;
// parse args
+ fixCommandLine(&argc, &argv);
ok = parseArgs(argDesc, &argc, argv);
if (mono && gray) {
fprintf(stderr, "Specify one of -mono or -gray\n");
@@ -125,7 +126,7 @@ int main(int argc, char *argv[]) {
}
goto err0;
}
- fileName = new GString(argv[1]);
+ fileName = argv[1];
pngRoot = argv[2];
// read config file
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftoppm.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftoppm.cc
index 886b4433dcd..e01ac5c1304 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftoppm.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftoppm.cc
@@ -92,7 +92,7 @@ static ArgDesc argDesc[] = {
int main(int argc, char *argv[]) {
PDFDoc *doc;
- GString *fileName;
+ char *fileName;
char *ppmRoot;
GString *ppmFile;
GString *ownerPW, *userPW;
@@ -114,13 +114,14 @@ int main(int argc, char *argv[]) {
// more info)
fpu_control_t cw;
_FPU_GETCW(cw);
- cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
+ cw = (fpu_control_t)((cw & ~_FPU_EXTENDED) | _FPU_DOUBLE);
_FPU_SETCW(cw);
#endif
exitCode = 99;
// parse args
+ fixCommandLine(&argc, &argv);
ok = parseArgs(argDesc, &argc, argv);
n = 0;
n += mono ? 1 : 0;
@@ -139,7 +140,7 @@ int main(int argc, char *argv[]) {
}
goto err0;
}
- fileName = new GString(argv[1]);
+ fileName = argv[1];
ppmRoot = argv[2];
// read config file
@@ -218,7 +219,7 @@ int main(int argc, char *argv[]) {
} else if (cmyk) {
paperColor[0] = paperColor[1] = paperColor[2] = paperColor[3] = 0;
splashOut = new SplashOutputDev(splashModeCMYK8, 1, gFalse, paperColor);
-#endif
+#endif // SPLASH_CMYK
} else {
paperColor[0] = paperColor[1] = paperColor[2] = 0xff;
splashOut = new SplashOutputDev(splashModeRGB8, 1, gFalse, paperColor);
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftops.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftops.cc
index 155a4117904..8e75dd83f55 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftops.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftops.cc
@@ -44,7 +44,6 @@ static GBool level3Gray = gFalse;
static GBool level3Sep = gFalse;
static GBool doEPS = gFalse;
static GBool doForm = gFalse;
-static GBool forceMono = gFalse;
#if OPI_SUPPORT
static GBool doOPI = gFalse;
#endif
@@ -95,8 +94,6 @@ static ArgDesc argDesc[] = {
"generate Encapsulated PostScript (EPS)"},
{"-form", argFlag, &doForm, 0,
"generate a PostScript form"},
- {"-mono", argFlag, &forceMono, 0,
- "force monochrome (grayscale) output"},
#if OPI_SUPPORT
{"-opi", argFlag, &doOPI, 0,
"generate OPI comments"},
@@ -154,7 +151,7 @@ static ArgDesc argDesc[] = {
int main(int argc, char *argv[]) {
PDFDoc *doc;
- GString *fileName;
+ char *fileName;
GString *psFileName;
PSLevel level;
PSOutMode mode;
@@ -175,13 +172,14 @@ int main(int argc, char *argv[]) {
// more info)
fpu_control_t cw;
_FPU_GETCW(cw);
- cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
+ cw = (fpu_control_t)((cw & ~_FPU_EXTENDED) | _FPU_DOUBLE);
_FPU_SETCW(cw);
#endif
exitCode = 99;
// parse args
+ fixCommandLine(&argc, &argv);
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc < 2 || argc > 3 || printVersion || printHelp) {
fprintf(stderr, "pdftops version %s\n", xpdfVersion);
@@ -230,7 +228,7 @@ int main(int argc, char *argv[]) {
mode = doEPS ? psModeEPS
: doForm ? psModeForm
: psModePS;
- fileName = new GString(argv[1]);
+ fileName = argv[1];
// read config file
globalParams = new GlobalParams(cfgFileName);
@@ -240,7 +238,6 @@ int main(int argc, char *argv[]) {
if (paperSize[0]) {
if (!globalParams->setPSPaperSize(paperSize)) {
fprintf(stderr, "Invalid paper size\n");
- delete fileName;
goto err0;
}
} else {
@@ -332,12 +329,11 @@ int main(int argc, char *argv[]) {
if (argc == 3) {
psFileName = new GString(argv[2]);
} else {
- p = fileName->getCString() + fileName->getLength() - 4;
- if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")) {
- psFileName = new GString(fileName->getCString(),
- fileName->getLength() - 4);
+ p = fileName + strlen(fileName) - 4;
+ if (strlen(fileName) > 4 && (!strcmp(p, ".pdf") || !strcmp(p, ".PDF"))) {
+ psFileName = new GString(fileName, (int)strlen(fileName) - 4);
} else {
- psFileName = fileName->copy();
+ psFileName = new GString(fileName);
}
psFileName->append(doEPS ? ".eps" : ".ps");
}
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc
index 49513be5f83..0496c6442ff 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc
@@ -111,13 +111,12 @@ static ArgDesc argDesc[] = {
int main(int argc, char *argv[]) {
PDFDoc *doc;
- GString *fileName;
+ char *fileName;
GString *textFileName;
GString *ownerPW, *userPW;
TextOutputControl textOutControl;
TextOutputDev *textOut;
UnicodeMap *uMap;
- Object info;
GBool ok;
char *p;
int exitCode;
@@ -133,13 +132,14 @@ int main(int argc, char *argv[]) {
// more info)
fpu_control_t cw;
_FPU_GETCW(cw);
- cw = (cw & ~_FPU_EXTENDED) | _FPU_DOUBLE;
+ cw = (fpu_control_t)((cw & ~_FPU_EXTENDED) | _FPU_DOUBLE);
_FPU_SETCW(cw);
#endif
exitCode = 99;
// parse args
+ fixCommandLine(&argc, &argv);
ok = parseArgs(argDesc, &argc, argv);
if (!ok || argc < 2 || argc > 3 || printVersion || printHelp) {
fprintf(stderr, "pdftotext version %s\n", xpdfVersion);
@@ -149,7 +149,7 @@ int main(int argc, char *argv[]) {
}
goto err0;
}
- fileName = new GString(argv[1]);
+ fileName = argv[1];
// read config file
globalParams = new GlobalParams(cfgFileName);
@@ -171,7 +171,6 @@ int main(int argc, char *argv[]) {
// get mapping to output encoding
if (!(uMap = globalParams->getTextEncoding())) {
error(errConfig, -1, "Couldn't get text encoding");
- delete fileName;
goto err1;
}
@@ -210,12 +209,11 @@ int main(int argc, char *argv[]) {
if (argc == 3) {
textFileName = new GString(argv[2]);
} else {
- p = fileName->getCString() + fileName->getLength() - 4;
- if (!strcmp(p, ".pdf") || !strcmp(p, ".PDF")) {
- textFileName = new GString(fileName->getCString(),
- fileName->getLength() - 4);
+ p = fileName + strlen(fileName) - 4;
+ if (strlen(fileName) > 4 && (!strcmp(p, ".pdf") || !strcmp(p, ".PDF"))) {
+ textFileName = new GString(fileName, (int)strlen(fileName) - 4);
} else {
- textFileName = fileName->copy();
+ textFileName = new GString(fileName);
}
textFileName->append(".txt");
}