Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: core/fpdfapi/fpdf_font/fpdf_font_charset.cpp

Issue 1824033002: Split core/include/fpdfapi/fpdf_resource.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_font/fpdf_font.cpp ('k') | core/fpdfapi/fpdf_font/fpdf_font_cid.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h"
8 #include "core/include/fpdfapi/fpdf_resource.h"
9 #include "core/include/fxge/fx_freetype.h"
10
11 static const struct _UnicodeAlt {
12 uint16_t m_Unicode;
13 const FX_CHAR* m_Alter;
14 } UnicodeAlts[] = {
15 {0x00a0, " "}, {0x00a1, "!"}, {0x00a2, "c"}, {0x00a3, "P"},
16 {0x00a4, "o"}, {0x00a5, "Y"}, {0x00a6, "|"}, {0x00a7, "S"},
17 {0x00a9, "(C)"}, {0x00aa, "a"}, {0x00ab, "<<"}, {0x00ac, "-|"},
18 {0x00ae, "(R)"}, {0x00af, "-"}, {0x00b0, "o"}, {0x00b1, "+/-"},
19 {0x00b2, "^2"}, {0x00b3, "^3"}, {0x00b4, "'"}, {0x00b5, "u"},
20 {0x00b6, "P"}, {0x00b7, "."}, {0x00b9, "^1"}, {0x00ba, "o"},
21 {0x00bb, ">>"}, {0x00bc, "1/4"}, {0x00bd, "1/2"}, {0x00be, "3/4"},
22 {0x00bf, "?"}, {0x00c0, "A"}, {0x00c1, "A"}, {0x00c2, "A"},
23 {0x00c3, "A"}, {0x00c4, "A"}, {0x00c5, "A"}, {0x00c6, "AE"},
24 {0x00c7, "C"}, {0x00c8, "E"}, {0x00c9, "E"}, {0x00ca, "E"},
25 {0x00cb, "E"}, {0x00cc, "I"}, {0x00cd, "I"}, {0x00ce, "I"},
26 {0x00cf, "I"}, {0x00d1, "N"}, {0x00d2, "O"}, {0x00d3, "O"},
27 {0x00d4, "O"}, {0x00d5, "O"}, {0x00d6, "O"}, {0x00d7, "x"},
28 {0x00d8, "O"}, {0x00d9, "U"}, {0x00da, "U"}, {0x00db, "U"},
29 {0x00dc, "U"}, {0x00dd, "Y"}, {0x00df, "S"}, {0x00e0, "a"},
30 {0x00e1, "a"}, {0x00e2, "a"}, {0x00e3, "a"}, {0x00e4, "a"},
31 {0x00e5, "a"}, {0x00e6, "ae"}, {0x00e7, "c"}, {0x00e8, "e"},
32 {0x00e9, "e"}, {0x00ea, "e"}, {0x00eb, "e"}, {0x00ec, "i"},
33 {0x00ed, "i"}, {0x00ee, "i"}, {0x00ef, "i"}, {0x00f1, "n"},
34 {0x00f2, "o"}, {0x00f3, "o"}, {0x00f4, "o"}, {0x00f5, "o"},
35 {0x00f6, "o"}, {0x00f7, "/"}, {0x00f8, "o"}, {0x00f9, "u"},
36 {0x00fa, "u"}, {0x00fb, "u"}, {0x00fc, "u"}, {0x00fd, "y"},
37 {0x00ff, "y"}, {0x02b0, "h"}, {0x02b2, "j"}, {0x02b3, "r"},
38 {0x02b7, "w"}, {0x02b8, "y"}, {0x02b9, "'"}, {0x02ba, "\""},
39 {0x02bb, "'"}, {0x02bc, "'"}, {0x02bd, "'"}, {0x02be, "'"},
40 {0x02bf, "'"}, {0x02c2, "<"}, {0x02c3, ">"}, {0x02c4, "^"},
41 {0x02c5, "v"}, {0x02c6, "^"}, {0x02c7, "v"}, {0x02c8, "'"},
42 {0x02c9, "-"}, {0x02ca, "'"}, {0x02cb, "'"}, {0x02cc, "."},
43 {0x02cd, "_"}, {0x2010, "-"}, {0x2012, "-"}, {0x2013, "-"},
44 {0x2014, "--"}, {0x2015, "--"}, {0x2016, "|"}, {0x2017, "_"},
45 {0x2018, "'"}, {0x2019, "'"}, {0x201a, ","}, {0x201b, "'"},
46 {0x201c, "\""}, {0x201d, "\""}, {0x201e, ","}, {0x201f, "'"},
47 {0x2020, "+"}, {0x2021, "+"}, {0x2022, "*"}, {0x2023, ">"},
48 {0x2024, "."}, {0x2025, ".."}, {0x2027, "."}, {0x2032, "'"},
49 {0x2033, "\""}, {0x2035, "'"}, {0x2036, "\""}, {0x2038, "^"},
50 {0x2039, "<"}, {0x203a, ">"}, {0x203b, "*"}, {0x203c, "!!"},
51 {0x203d, "?!"}, {0x203e, "-"}, {0x2044, "/"}, {0x2047, "??"},
52 {0x2048, "?!"}, {0x2049, "!?"}, {0x204e, "*"}, {0x2052, "%"},
53 {0x2122, "(TM)"}, {0x2212, "-"}, {0x2215, "/"}, {0x2216, "\\"},
54 {0x2217, "*"}, {0x2218, "*"}, {0x2219, "*"}, {0x2223, "|"},
55 {0x22c5, "."}, {0x266f, "#"}, {0XF6D9, "(C)"}, {0XF6DA, "(C)"},
56 {0XF6DB, "(TM)"}, {0XF8E8, "(C)"}, {0xf8e9, "(C)"}, {0XF8EA, "(TM)"},
57 {0xfb01, "fi"}, {0xfb02, "fl"}};
58 const FX_CHAR* FCS_GetAltStr(FX_WCHAR unicode) {
59 int begin = 0;
60 int end = sizeof UnicodeAlts / sizeof(struct _UnicodeAlt) - 1;
61 while (begin <= end) {
62 int middle = (begin + end) / 2;
63 uint16_t middlecode = UnicodeAlts[middle].m_Unicode;
64 if (middlecode > unicode) {
65 end = middle - 1;
66 } else if (middlecode < unicode) {
67 begin = middle + 1;
68 } else {
69 return UnicodeAlts[middle].m_Alter;
70 }
71 }
72 return NULL;
73 }
74 static const uint16_t StandardEncoding[256] = {
75 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
76 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
77 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
78 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0021, 0x0022, 0x0023,
79 0x0024, 0x0025, 0x0026, 0x2019, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c,
80 0x002d, 0x002e, 0x002f, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035,
81 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e,
82 0x003f, 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
83 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050,
84 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059,
85 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, 0x2018, 0x0061, 0x0062,
86 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b,
87 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074,
88 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d,
89 0x007e, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
90 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
91 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
92 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00a1,
93 0x00a2, 0x00a3, 0x2044, 0x00a5, 0x0192, 0x00a7, 0x00a4, 0x0027, 0x201c,
94 0x00ab, 0x2039, 0x203a, 0xfb01, 0xfb02, 0x0000, 0x2013, 0x2020, 0x2021,
95 0x00b7, 0x0000, 0x00b6, 0x2022, 0x201a, 0x201e, 0x201d, 0x00bb, 0x2026,
96 0x2030, 0x0000, 0x00bf, 0x0000, 0x0060, 0x00b4, 0x02c6, 0x02dc, 0x00af,
97 0x02d8, 0x02d9, 0x00a8, 0x0000, 0x02da, 0x00b8, 0x0000, 0x02dd, 0x02db,
98 0x02c7, 0x2014, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
99 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
100 0x00c6, 0x0000, 0x00aa, 0x0000, 0x0000, 0x0000, 0x0000, 0x0141, 0x00d8,
101 0x0152, 0x00ba, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00e6, 0x0000,
102 0x0000, 0x0000, 0x0131, 0x0000, 0x0000, 0x0142, 0x00f8, 0x0153, 0x00df,
103 0x0000, 0x0000, 0x0000, 0x0000};
104 static const uint16_t MacRomanEncoding[256] = {
105 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
106 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
107 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
108 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0021, 0x0022, 0x0023,
109 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c,
110 0x002d, 0x002e, 0x002f, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035,
111 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e,
112 0x003f, 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
113 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050,
114 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059,
115 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062,
116 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b,
117 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074,
118 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d,
119 0x007e, 0x0000, 0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc,
120 0x00e1, 0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8,
121 0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3, 0x00f2,
122 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc, 0x2020, 0x00b0,
123 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df, 0x00ae, 0x00a9, 0x2122,
124 0x00b4, 0x00a8, 0x0000, 0x00c6, 0x00d8, 0x0000, 0x00b1, 0x0000, 0x0000,
125 0x00a5, 0x00b5, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00aa, 0x00ba,
126 0x0000, 0x00e6, 0x00f8, 0x00bf, 0x00a3, 0x00ac, 0x0000, 0x0192, 0x0000,
127 0x0000, 0x00ab, 0x00bb, 0x2026, 0x0020, 0x00c0, 0x00c3, 0x00d5, 0x0152,
128 0x0153, 0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x0000,
129 0x00ff, 0x0178, 0x2044, 0x00a4, 0x2039, 0x203a, 0xfb01, 0xfb02, 0x2021,
130 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1, 0x00cb, 0x00c8,
131 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0x0000, 0x00d2, 0x00da,
132 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, 0x00af, 0x02d8, 0x02d9, 0x02da,
133 0x00b8, 0x02dd, 0x02db, 0x02c7};
134 static const uint16_t AdobeWinAnsiEncoding[256] = {
135 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
136 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
137 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
138 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0021, 0x0022, 0x0023,
139 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c,
140 0x002d, 0x002e, 0x002f, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035,
141 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e,
142 0x003f, 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
143 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050,
144 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059,
145 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f, 0x0060, 0x0061, 0x0062,
146 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b,
147 0x006c, 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074,
148 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d,
149 0x007e, 0x2022, 0x20ac, 0x2022, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020,
150 0x2021, 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x2022, 0x017d, 0x2022,
151 0x2022, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc,
152 0x2122, 0x0161, 0x203a, 0x0153, 0x2022, 0x017e, 0x0178, 0x0020, 0x00a1,
153 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa,
154 0x00ab, 0x00ac, 0x002d, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3,
155 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc,
156 0x00bd, 0x00be, 0x00bf, 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5,
157 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce,
158 0x00cf, 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
159 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, 0x00e0,
160 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9,
161 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0x00f0, 0x00f1, 0x00f2,
162 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb,
163 0x00fc, 0x00fd, 0x00fe, 0x00ff};
164 static const uint16_t MacExpertEncoding[256] = {
165 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
166 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
167 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
168 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0xf721, 0xf6f8, 0xf7a2,
169 0xf724, 0xf6e4, 0xf726, 0xf7b4, 0x207d, 0x207e, 0x2025, 0x2024, 0x002c,
170 0x002d, 0x002e, 0x2044, 0xf730, 0xf731, 0xf732, 0xf733, 0xf734, 0xf735,
171 0xf736, 0xf737, 0xf738, 0xf739, 0x003a, 0x003b, 0x0000, 0xf6de, 0x0000,
172 0xf73f, 0x0000, 0x0000, 0x0000, 0x0000, 0xf7f0, 0x0000, 0x0000, 0x00bc,
173 0x00bd, 0x00be, 0x215b, 0x215c, 0x215d, 0x215e, 0x2153, 0x2154, 0x0000,
174 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfb00, 0xfb01, 0xfb02, 0xfb03,
175 0xfb04, 0x208d, 0x0000, 0x208e, 0xf6f6, 0xf6e5, 0xf760, 0xf761, 0xf762,
176 0xf763, 0xf764, 0xf765, 0xf766, 0xf767, 0xf768, 0xf769, 0xf76a, 0xf76b,
177 0xf76c, 0xf76d, 0xf76e, 0xf76f, 0xf770, 0xf771, 0xf772, 0xf773, 0xf774,
178 0xf775, 0xf776, 0xf777, 0xf778, 0xf779, 0xf77a, 0x20a1, 0xf6dc, 0xf6dd,
179 0xf6fe, 0x0000, 0x0000, 0xf6e9, 0xf6e0, 0x0000, 0x0000, 0x0000, 0x0000,
180 0xf7e1, 0xf7e0, 0xf7e2, 0xf7e4, 0xf7e3, 0xf7e5, 0xf7e7, 0xf7e9, 0xf7e8,
181 0xf7ea, 0xf7eb, 0xf7ed, 0xf7ec, 0xf7ee, 0xf7ef, 0xf7f1, 0xf7f3, 0xf7f2,
182 0xf7f4, 0xf7f6, 0xf7f5, 0xf7fa, 0xf7f9, 0xf7fb, 0xf7fc, 0x0000, 0x2078,
183 0x2084, 0x2083, 0x2086, 0x2088, 0x2087, 0xf6fd, 0x0000, 0xf6df, 0x2082,
184 0x0000, 0xf7a8, 0x0000, 0xf6f5, 0xf6fd, 0x2085, 0x0000, 0xf6e1, 0xf6e7,
185 0xf7fd, 0x0000, 0xf6e3, 0x0000, 0x0000, 0xf7fe, 0x0000, 0x2089, 0x2080,
186 0xf6ff, 0xf7e6, 0xf7f8, 0xf7bf, 0x2081, 0xf6e9, 0x0000, 0x0000, 0x0000,
187 0x0000, 0x0000, 0x0000, 0xf7b8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
188 0xf6fa, 0x2012, 0xf6e6, 0x0000, 0x0000, 0x0000, 0x0000, 0xf7a1, 0x0000,
189 0xf7ff, 0x0000, 0x00b9, 0x00b2, 0x00b3, 0x2074, 0x2075, 0x2076, 0x2077,
190 0x2079, 0x2070, 0x0000, 0xf6ec, 0xf6f1, 0x0000, 0x0000, 0x0000, 0xf6ed,
191 0xf6f2, 0xf6eb, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf6ee, 0xf6fb,
192 0xf6f4, 0xf7af, 0xf6ea, 0x207f, 0xf6ef, 0xf6e2, 0xf6e8, 0xf6f7, 0xf6fc,
193 0x0000, 0x0000, 0x0000, 0x0000};
194 static const uint16_t AdobeSymbolEncoding[256] = {
195 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
196 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
197 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
198 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0021, 0x2200, 0x0023,
199 0x2203, 0x0025, 0x0026, 0x220B, 0x0028, 0x0029, 0x2217, 0x002B, 0x002C,
200 0x2212, 0x002E, 0x002F, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035,
201 0x0036, 0x0037, 0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E,
202 0x003F, 0x2245, 0x0391, 0x0392, 0x03A7, 0x0394, 0x0395, 0x03A6, 0x0393,
203 0x0397, 0x0399, 0x03D1, 0x039A, 0x039B, 0x039C, 0x039D, 0x039F, 0x03A0,
204 0x0398, 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03C2, 0x03A9, 0x039E, 0x03A8,
205 0x0396, 0x005B, 0x2234, 0x005D, 0x22A5, 0x005F, 0xF8E5, 0x03B1, 0x03B2,
206 0x03C7, 0x03B4, 0x03B5, 0x03C6, 0x03B3, 0x03B7, 0x03B9, 0x03D5, 0x03BA,
207 0x03BB, 0x03BC, 0x03BD, 0x03BF, 0x03C0, 0x03B8, 0x03C1, 0x03C3, 0x03C4,
208 0x03C5, 0x03D6, 0x03C9, 0x03BE, 0x03C8, 0x03B6, 0x007B, 0x007C, 0x007D,
209 0x223C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
210 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
211 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
212 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x20AC, 0x03D2,
213 0x2032, 0x2264, 0x2044, 0x221E, 0x0192, 0x2663, 0x2666, 0x2665, 0x2660,
214 0x2194, 0x2190, 0x2191, 0x2192, 0x2193, 0x00B0, 0x00B1, 0x2033, 0x2265,
215 0x00D7, 0x221D, 0x2202, 0x2022, 0x00F7, 0x2260, 0x2261, 0x2248, 0x2026,
216 0xF8E6, 0xF8E7, 0x21B5, 0x2135, 0x2111, 0x211C, 0x2118, 0x2297, 0x2295,
217 0x2205, 0x2229, 0x222A, 0x2283, 0x2287, 0x2284, 0x2282, 0x2286, 0x2208,
218 0x2209, 0x2220, 0x2207, 0xF6DA, 0xF6D9, 0xF6DB, 0x220F, 0x221A, 0x22C5,
219 0x00AC, 0x2227, 0x2228, 0x21D4, 0x21D0, 0x21D1, 0x21D2, 0x21D3, 0x25CA,
220 0x2329, 0xF8E8, 0xF8E9, 0xF8EA, 0x2211, 0xF8EB, 0xF8EC, 0xF8ED, 0xF8EE,
221 0xF8EF, 0xF8F0, 0xF8F1, 0xF8F2, 0xF8F3, 0xF8F4, 0x0000, 0x232A, 0x222B,
222 0x2320, 0xF8F5, 0x2321, 0xF8F6, 0xF8F7, 0xF8F8, 0xF8F9, 0xF8FA, 0xF8FB,
223 0xF8FC, 0xF8FD, 0xF8FE, 0x0000,
224 };
225 static const uint16_t ZapfEncoding[256] = {
226 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
227 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
228 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
229 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x2701, 0x2702, 0x2703,
230 0x2704, 0x260E, 0x2706, 0x2707, 0x2708, 0x2709, 0x261B, 0x261E, 0x270C,
231 0x270D, 0x270E, 0x270F, 0x2710, 0x2711, 0x2712, 0x2713, 0x2714, 0x2715,
232 0x2716, 0x2717, 0x2718, 0x2719, 0x271A, 0x271B, 0x271C, 0x271D, 0x271E,
233 0x271F, 0x2720, 0x2721, 0x2722, 0x2723, 0x2724, 0x2725, 0x2726, 0x2727,
234 0x2605, 0x2729, 0x272A, 0x272B, 0x272C, 0x272D, 0x272E, 0x272F, 0x2730,
235 0x2731, 0x2732, 0x2733, 0x2734, 0x2735, 0x2736, 0x2737, 0x2738, 0x2739,
236 0x273A, 0x273B, 0x273C, 0x273D, 0x273E, 0x273F, 0x2740, 0x2741, 0x2742,
237 0x2743, 0x2744, 0x2745, 0x2746, 0x2747, 0x2748, 0x2749, 0x274A, 0x274B,
238 0x25CF, 0x274D, 0x25A0, 0x274F, 0x2750, 0x2751, 0x2752, 0x25B2, 0x25BC,
239 0x25C6, 0x2756, 0x25D7, 0x2758, 0x2759, 0x275A, 0x275B, 0x275C, 0x275D,
240 0x275E, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
241 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
242 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
243 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2761,
244 0x2762, 0x2763, 0x2764, 0x2765, 0x2766, 0x2767, 0x2663, 0x2666, 0x2665,
245 0x2660, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467,
246 0x2468, 0x2469, 0x2776, 0x2777, 0x2778, 0x2779, 0x277A, 0x277B, 0x277C,
247 0x277D, 0x277E, 0x277F, 0x2780, 0x2781, 0x2782, 0x2783, 0x2784, 0x2785,
248 0x2786, 0x2787, 0x2788, 0x2789, 0x278A, 0x278B, 0x278C, 0x278D, 0x278E,
249 0x278F, 0x2790, 0x2791, 0x2792, 0x2793, 0x2794, 0x2192, 0x2194, 0x2195,
250 0x2798, 0x2799, 0x279A, 0x279B, 0x279C, 0x279D, 0x279E, 0x279F, 0x27A0,
251 0x27A1, 0x27A2, 0x27A3, 0x27A4, 0x27A5, 0x27A6, 0x27A7, 0x27A8, 0x27A9,
252 0x27AA, 0x27AB, 0x27AC, 0x27AD, 0x27AE, 0x27AF, 0x0000, 0x27B1, 0x27B2,
253 0x27B3, 0x27B4, 0x27B5, 0x27B6, 0x27B7, 0x27B8, 0x27B9, 0x27BA, 0x27BB,
254 0x27BC, 0x27BD, 0x27BE, 0x0000,
255 };
256 static const FX_CHAR* const StandardEncodingNames[224] = {
257 "space",
258 "exclam",
259 "quotedbl",
260 "numbersign",
261 "dollar",
262 "percent",
263 "ampersand",
264 "quoteright",
265 "parenleft",
266 "parenright",
267 "asterisk",
268 "plus",
269 "comma",
270 "hyphen",
271 "period",
272 "slash",
273 "zero",
274 "one",
275 "two",
276 "three",
277 "four",
278 "five",
279 "six",
280 "seven",
281 "eight",
282 "nine",
283 "colon",
284 "semicolon",
285 "less",
286 "equal",
287 "greater",
288 "question",
289 "at",
290 "A",
291 "B",
292 "C",
293 "D",
294 "E",
295 "F",
296 "G",
297 "H",
298 "I",
299 "J",
300 "K",
301 "L",
302 "M",
303 "N",
304 "O",
305 "P",
306 "Q",
307 "R",
308 "S",
309 "T",
310 "U",
311 "V",
312 "W",
313 "X",
314 "Y",
315 "Z",
316 "bracketleft",
317 "backslash",
318 "bracketright",
319 "asciicircum",
320 "underscore",
321 "quoteleft",
322 "a",
323 "b",
324 "c",
325 "d",
326 "e",
327 "f",
328 "g",
329 "h",
330 "i",
331 "j",
332 "k",
333 "l",
334 "m",
335 "n",
336 "o",
337 "p",
338 "q",
339 "r",
340 "s",
341 "t",
342 "u",
343 "v",
344 "w",
345 "x",
346 "y",
347 "z",
348 "braceleft",
349 "bar",
350 "braceright",
351 "asciitilde",
352 NULL,
353 NULL,
354 NULL,
355 NULL,
356 NULL,
357 NULL,
358 NULL,
359 NULL,
360 NULL,
361 NULL,
362 NULL,
363 NULL,
364 NULL,
365 NULL,
366 NULL,
367 NULL,
368 NULL,
369 NULL,
370 NULL,
371 NULL,
372 NULL,
373 NULL,
374 NULL,
375 NULL,
376 NULL,
377 NULL,
378 NULL,
379 NULL,
380 NULL,
381 NULL,
382 NULL,
383 NULL,
384 NULL,
385 NULL,
386 "exclamdown",
387 "cent",
388 "sterling",
389 "fraction",
390 "yen",
391 "florin",
392 "section",
393 "currency",
394 "quotesingle",
395 "quotedblleft",
396 "guillemotleft",
397 "guilsinglleft",
398 "guilsinglright",
399 "fi",
400 "fl",
401 NULL,
402 "endash",
403 "dagger",
404 "daggerdbl",
405 "periodcentered",
406 NULL,
407 "paragraph",
408 "bullet",
409 "quotesinglbase",
410 "quotedblbase",
411 "quotedblright",
412 "guillemotright",
413 "ellipsis",
414 "perthousand",
415 NULL,
416 "questiondown",
417 NULL,
418 "grave",
419 "acute",
420 "circumflex",
421 "tilde",
422 "macron",
423 "breve",
424 "dotaccent",
425 "dieresis",
426 NULL,
427 "ring",
428 "cedilla",
429 NULL,
430 "hungarumlaut",
431 "ogonek",
432 "caron",
433 "emdash",
434 NULL,
435 NULL,
436 NULL,
437 NULL,
438 NULL,
439 NULL,
440 NULL,
441 NULL,
442 NULL,
443 NULL,
444 NULL,
445 NULL,
446 NULL,
447 NULL,
448 NULL,
449 NULL,
450 "AE",
451 NULL,
452 "ordfeminine",
453 NULL,
454 NULL,
455 NULL,
456 NULL,
457 "Lslash",
458 "Oslash",
459 "OE",
460 "ordmasculine",
461 NULL,
462 NULL,
463 NULL,
464 NULL,
465 NULL,
466 "ae",
467 NULL,
468 NULL,
469 NULL,
470 "dotlessi",
471 NULL,
472 NULL,
473 "lslash",
474 "oslash",
475 "oe",
476 "germandbls",
477 NULL,
478 NULL,
479 NULL,
480 NULL,
481 };
482 static const FX_CHAR* const AdobeWinAnsiEncodingNames[224] = {
483 "space",
484 "exclam",
485 "quotedbl",
486 "numbersign",
487 "dollar",
488 "percent",
489 "ampersand",
490 "quotesingle",
491 "parenleft",
492 "parenright",
493 "asterisk",
494 "plus",
495 "comma",
496 "hyphen",
497 "period",
498 "slash",
499 "zero",
500 "one",
501 "two",
502 "three",
503 "four",
504 "five",
505 "six",
506 "seven",
507 "eight",
508 "nine",
509 "colon",
510 "semicolon",
511 "less",
512 "equal",
513 "greater",
514 "question",
515 "at",
516 "A",
517 "B",
518 "C",
519 "D",
520 "E",
521 "F",
522 "G",
523 "H",
524 "I",
525 "J",
526 "K",
527 "L",
528 "M",
529 "N",
530 "O",
531 "P",
532 "Q",
533 "R",
534 "S",
535 "T",
536 "U",
537 "V",
538 "W",
539 "X",
540 "Y",
541 "Z",
542 "bracketleft",
543 "backslash",
544 "bracketright",
545 "asciicircum",
546 "underscore",
547 "grave",
548 "a",
549 "b",
550 "c",
551 "d",
552 "e",
553 "f",
554 "g",
555 "h",
556 "i",
557 "j",
558 "k",
559 "l",
560 "m",
561 "n",
562 "o",
563 "p",
564 "q",
565 "r",
566 "s",
567 "t",
568 "u",
569 "v",
570 "w",
571 "x",
572 "y",
573 "z",
574 "braceleft",
575 "bar",
576 "braceright",
577 "asciitilde",
578 "bullet",
579 "Euro",
580 "bullet",
581 "quotesinglbase",
582 "florin",
583 "quotedblbase",
584 "ellipsis",
585 "dagger",
586 "daggerdbl",
587 "circumflex",
588 "perthousand",
589 "Scaron",
590 "guilsinglleft",
591 "OE",
592 "bullet",
593 "Zcaron",
594 "bullet",
595 "bullet",
596 "quoteleft",
597 "quoteright",
598 "quotedblleft",
599 "quotedblright",
600 "bullet",
601 "endash",
602 "emdash",
603 "tilde",
604 "trademark",
605 "scaron",
606 "guilsinglright",
607 "oe",
608 "bullet",
609 "zcaron",
610 "Ydieresis",
611 "space",
612 "exclamdown",
613 "cent",
614 "sterling",
615 "currency",
616 "yen",
617 "brokenbar",
618 "section",
619 "dieresis",
620 "copyright",
621 "ordfeminine",
622 "guillemotleft",
623 "logicalnot",
624 "hyphen",
625 "registered",
626 "macron",
627 "degree",
628 "plusminus",
629 "twosuperior",
630 "threesuperior",
631 "acute",
632 "mu",
633 "paragraph",
634 "periodcentered",
635 "cedilla",
636 "onesuperior",
637 "ordmasculine",
638 "guillemotright",
639 "onequarter",
640 "onehalf",
641 "threequarters",
642 "questiondown",
643 "Agrave",
644 "Aacute",
645 "Acircumflex",
646 "Atilde",
647 "Adieresis",
648 "Aring",
649 "AE",
650 "Ccedilla",
651 "Egrave",
652 "Eacute",
653 "Ecircumflex",
654 "Edieresis",
655 "Igrave",
656 "Iacute",
657 "Icircumflex",
658 "Idieresis",
659 "Eth",
660 "Ntilde",
661 "Ograve",
662 "Oacute",
663 "Ocircumflex",
664 "Otilde",
665 "Odieresis",
666 "multiply",
667 "Oslash",
668 "Ugrave",
669 "Uacute",
670 "Ucircumflex",
671 "Udieresis",
672 "Yacute",
673 "Thorn",
674 "germandbls",
675 "agrave",
676 "aacute",
677 "acircumflex",
678 "atilde",
679 "adieresis",
680 "aring",
681 "ae",
682 "ccedilla",
683 "egrave",
684 "eacute",
685 "ecircumflex",
686 "edieresis",
687 "igrave",
688 "iacute",
689 "icircumflex",
690 "idieresis",
691 "eth",
692 "ntilde",
693 "ograve",
694 "oacute",
695 "ocircumflex",
696 "otilde",
697 "odieresis",
698 "divide",
699 "oslash",
700 "ugrave",
701 "uacute",
702 "ucircumflex",
703 "udieresis",
704 "yacute",
705 "thorn",
706 "ydieresis",
707 };
708 static const FX_CHAR* const MacRomanEncodingNames[224] = {
709 "space",
710 "exclam",
711 "quotedbl",
712 "numbersign",
713 "dollar",
714 "percent",
715 "ampersand",
716 "quotesingle",
717 "parenleft",
718 "parenright",
719 "asterisk",
720 "plus",
721 "comma",
722 "hyphen",
723 "period",
724 "slash",
725 "zero",
726 "one",
727 "two",
728 "three",
729 "four",
730 "five",
731 "six",
732 "seven",
733 "eight",
734 "nine",
735 "colon",
736 "semicolon",
737 "less",
738 "equal",
739 "greater",
740 "question",
741 "at",
742 "A",
743 "B",
744 "C",
745 "D",
746 "E",
747 "F",
748 "G",
749 "H",
750 "I",
751 "J",
752 "K",
753 "L",
754 "M",
755 "N",
756 "O",
757 "P",
758 "Q",
759 "R",
760 "S",
761 "T",
762 "U",
763 "V",
764 "W",
765 "X",
766 "Y",
767 "Z",
768 "bracketleft",
769 "backslash",
770 "bracketright",
771 "asciicircum",
772 "underscore",
773 "grave",
774 "a",
775 "b",
776 "c",
777 "d",
778 "e",
779 "f",
780 "g",
781 "h",
782 "i",
783 "j",
784 "k",
785 "l",
786 "m",
787 "n",
788 "o",
789 "p",
790 "q",
791 "r",
792 "s",
793 "t",
794 "u",
795 "v",
796 "w",
797 "x",
798 "y",
799 "z",
800 "braceleft",
801 "bar",
802 "braceright",
803 "asciitilde",
804 NULL,
805 "Adieresis",
806 "Aring",
807 "Ccedilla",
808 "Eacute",
809 "Ntilde",
810 "Odieresis",
811 "Udieresis",
812 "aacute",
813 "agrave",
814 "acircumflex",
815 "adieresis",
816 "atilde",
817 "aring",
818 "ccedilla",
819 "eacute",
820 "egrave",
821 "ecircumflex",
822 "edieresis",
823 "iacute",
824 "igrave",
825 "icircumflex",
826 "idieresis",
827 "ntilde",
828 "oacute",
829 "ograve",
830 "ocircumflex",
831 "odieresis",
832 "otilde",
833 "uacute",
834 "ugrave",
835 "ucircumflex",
836 "udieresis",
837 "dagger",
838 "degree",
839 "cent",
840 "sterling",
841 "section",
842 "bullet",
843 "paragraph",
844 "germandbls",
845 "registered",
846 "copyright",
847 "trademark",
848 "acute",
849 "dieresis",
850 "notequal",
851 "AE",
852 "Oslash",
853 "infinity",
854 "plusminus",
855 "lessequal",
856 "greaterequal",
857 "yen",
858 "mu",
859 "partialdiff",
860 "summation",
861 "product",
862 "pi",
863 "integral",
864 "ordfeminine",
865 "ordmasculine",
866 "Omega",
867 "ae",
868 "oslash",
869 "questiondown",
870 "exclamdown",
871 "logicalnot",
872 "radical",
873 "florin",
874 "approxequal",
875 "Delta",
876 "guillemotleft",
877 "guillemotright",
878 "ellipsis",
879 "space",
880 "Agrave",
881 "Atilde",
882 "Otilde",
883 "OE",
884 "oe",
885 "endash",
886 "emdash",
887 "quotedblleft",
888 "quotedblright",
889 "quoteleft",
890 "quoteright",
891 "divide",
892 "lozenge",
893 "ydieresis",
894 "Ydieresis",
895 "fraction",
896 "currency",
897 "guilsinglleft",
898 "guilsinglright",
899 "fi",
900 "fl",
901 "daggerdbl",
902 "periodcentered",
903 "quotesinglbase",
904 "quotedblbase",
905 "perthousand",
906 "Acircumflex",
907 "Ecircumflex",
908 "Aacute",
909 "Edieresis",
910 "Egrave",
911 "Iacute",
912 "Icircumflex",
913 "Idieresis",
914 "Igrave",
915 "Oacute",
916 "Ocircumflex",
917 "apple",
918 "Ograve",
919 "Uacute",
920 "Ucircumflex",
921 "Ugrave",
922 "dotlessi",
923 "circumflex",
924 "tilde",
925 "macron",
926 "breve",
927 "dotaccent",
928 "ring",
929 "cedilla",
930 "hungarumlaut",
931 "ogonek",
932 "caron",
933 };
934 static const FX_CHAR* const MacExpertEncodingNames[224] = {
935 "space",
936 "exclamsmall",
937 "Hungarumlautsmall",
938 "centoldstyle",
939 "dollaroldstyle",
940 "dollarsuperior",
941 "ampersandsmall",
942 "Acutesmall",
943 "parenleftsuperior",
944 "parenrightsuperior",
945 "twodotenleader",
946 "onedotenleader",
947 "comma",
948 "hyphen",
949 "period",
950 "fraction",
951 "zerooldstyle",
952 "oneoldstyle",
953 "twooldstyle",
954 "threeoldstyle",
955 "fouroldstyle",
956 "fiveoldstyle",
957 "sixoldstyle",
958 "sevenoldstyle",
959 "eightoldstyle",
960 "nineoldstyle",
961 "colon",
962 "semicolon",
963 NULL,
964 "threequartersemdash",
965 NULL,
966 "questionsmall",
967 NULL,
968 NULL,
969 NULL,
970 NULL,
971 "Ethsmall",
972 NULL,
973 NULL,
974 "onequarter",
975 "onehalf",
976 "threequarters",
977 "oneeighth",
978 "threeeighths",
979 "fiveeighths",
980 "seveneighths",
981 "onethird",
982 "twothirds",
983 NULL,
984 NULL,
985 NULL,
986 NULL,
987 NULL,
988 NULL,
989 "ff",
990 "fi",
991 "fl",
992 "ffi",
993 "ffl",
994 "parenleftinferior",
995 NULL,
996 "parenrightinferior",
997 "Circumflexsmall",
998 "hypheninferior",
999 "Gravesmall",
1000 "Asmall",
1001 "Bsmall",
1002 "Csmall",
1003 "Dsmall",
1004 "Esmall",
1005 "Fsmall",
1006 "Gsmall",
1007 "Hsmall",
1008 "Ismall",
1009 "Jsmall",
1010 "Ksmall",
1011 "Lsmall",
1012 "Msmall",
1013 "Nsmall",
1014 "Osmall",
1015 "Psmall",
1016 "Qsmall",
1017 "Rsmall",
1018 "Ssmall",
1019 "Tsmall",
1020 "Usmall",
1021 "Vsmall",
1022 "Wsmall",
1023 "Xsmall",
1024 "Ysmall",
1025 "Zsmall",
1026 "colonmonetary",
1027 "onefitted",
1028 "rupiah",
1029 "Tildesmall",
1030 NULL,
1031 NULL,
1032 "asuperior",
1033 "centsuperior",
1034 NULL,
1035 NULL,
1036 NULL,
1037 NULL,
1038 "Aacutesmall",
1039 "Agravesmall",
1040 "Acircumflexsmall",
1041 "Adieresissmall",
1042 "Atildesmall",
1043 "Aringsmall",
1044 "Ccedillasmall",
1045 "Eacutesmall",
1046 "Egravesmall",
1047 "Ecircumflexsmall",
1048 "Edieresissmall",
1049 "Iacutesmall",
1050 "Igravesmall",
1051 "Icircumflexsmall",
1052 "Idieresissmall",
1053 "Ntildesmall",
1054 "Oacutesmall",
1055 "Ogravesmall",
1056 "Ocircumflexsmall",
1057 "Odieresissmall",
1058 "Otildesmall",
1059 "Uacutesmall",
1060 "Ugravesmall",
1061 "Ucircumflexsmall",
1062 "Udieresissmall",
1063 NULL,
1064 "eightsuperior",
1065 "fourinferior",
1066 "threeinferior",
1067 "sixinferior",
1068 "eightinferior",
1069 "seveninferior",
1070 "Scaronsmall",
1071 NULL,
1072 "centinferior",
1073 "twoinferior",
1074 NULL,
1075 "Dieresissmall",
1076 NULL,
1077 "Caronsmall",
1078 "Scaronsmall",
1079 "fiveinferior",
1080 NULL,
1081 "commainferior",
1082 "periodinferior",
1083 "Yacutesmall",
1084 NULL,
1085 "dollarinferior",
1086 NULL,
1087 NULL,
1088 "Thornsmall",
1089 NULL,
1090 "nineinferior",
1091 "zeroinferior",
1092 "Zcaronsmall",
1093 "AEsmall",
1094 "Oslashsmall",
1095 "questiondownsmall",
1096 "oneinferior",
1097 "asuperior",
1098 NULL,
1099 NULL,
1100 NULL,
1101 NULL,
1102 NULL,
1103 NULL,
1104 "Cedillasmall",
1105 NULL,
1106 NULL,
1107 NULL,
1108 NULL,
1109 NULL,
1110 "OEsmall",
1111 "figuredash",
1112 "hyphensuperior",
1113 NULL,
1114 NULL,
1115 NULL,
1116 NULL,
1117 "exclamdownsmall",
1118 NULL,
1119 "Ydieresissmall",
1120 NULL,
1121 "onesuperior",
1122 "twosuperior",
1123 "threesuperior",
1124 "foursuperior",
1125 "fivesuperior",
1126 "sixsuperior",
1127 "sevensuperior",
1128 "ninesuperior",
1129 "zerosuperior",
1130 NULL,
1131 "esuperior",
1132 "rsuperior",
1133 NULL,
1134 NULL,
1135 NULL,
1136 "isuperior",
1137 "ssuperior",
1138 "dsuperior",
1139 NULL,
1140 NULL,
1141 NULL,
1142 NULL,
1143 NULL,
1144 "lsuperior",
1145 "Ogoneksmall",
1146 "Brevesmall",
1147 "Macronsmall",
1148 "bsuperior",
1149 "nsuperior",
1150 "msuperior",
1151 "commasuperior",
1152 "periodsuperior",
1153 "Dotaccentsmall",
1154 "Ringsmall",
1155 NULL,
1156 NULL,
1157 NULL,
1158 NULL,
1159 };
1160 static const FX_CHAR* const PDFDocEncodingNames[232] = {
1161 "breve",
1162 "caron",
1163 "circumflex",
1164 "dotaccent",
1165 "hungarumlaut",
1166 "ogonek",
1167 "ring",
1168 "tilde",
1169 "space",
1170 "exclam",
1171 "quotedbl",
1172 "numbersign",
1173 "dollar",
1174 "percent",
1175 "ampersand",
1176 "quotesingle",
1177 "parenleft",
1178 "parenright",
1179 "asterisk",
1180 "plus",
1181 "comma",
1182 "hyphen",
1183 "period",
1184 "slash",
1185 "zero",
1186 "one",
1187 "two",
1188 "three",
1189 "four",
1190 "five",
1191 "six",
1192 "seven",
1193 "eight",
1194 "nine",
1195 "colon",
1196 "semicolon",
1197 "less",
1198 "equal",
1199 "greater",
1200 "question",
1201 "at",
1202 "A",
1203 "B",
1204 "C",
1205 "D",
1206 "E",
1207 "F",
1208 "G",
1209 "H",
1210 "I",
1211 "J",
1212 "K",
1213 "L",
1214 "M",
1215 "N",
1216 "O",
1217 "P",
1218 "Q",
1219 "R",
1220 "S",
1221 "T",
1222 "U",
1223 "V",
1224 "W",
1225 "X",
1226 "Y",
1227 "Z",
1228 "bracketleft",
1229 "backslash",
1230 "bracketright",
1231 "asciicircum",
1232 "underscore",
1233 "grave",
1234 "a",
1235 "b",
1236 "c",
1237 "d",
1238 "e",
1239 "f",
1240 "g",
1241 "h",
1242 "i",
1243 "j",
1244 "k",
1245 "l",
1246 "m",
1247 "n",
1248 "o",
1249 "p",
1250 "q",
1251 "r",
1252 "s",
1253 "t",
1254 "u",
1255 "v",
1256 "w",
1257 "x",
1258 "y",
1259 "z",
1260 "braceleft",
1261 "bar",
1262 "braceright",
1263 "asciitilde",
1264 NULL,
1265 "bullet3",
1266 "dagger",
1267 "daggerdbl",
1268 "ellipsis",
1269 "emdash",
1270 "endash",
1271 "florin",
1272 "fraction",
1273 "guilsinglleft",
1274 "guilsinglright",
1275 "minus",
1276 "perthousand",
1277 "quotedblbase",
1278 "quotedblleft",
1279 "quotedblright",
1280 "quoteleft",
1281 "quoteright",
1282 "quotesinglbase",
1283 "trademark",
1284 "fi",
1285 "fl",
1286 "Lslash",
1287 "OE",
1288 "Scaron",
1289 "Ydieresis",
1290 "Zcaron2",
1291 "dotlessi",
1292 "lslash",
1293 "oe",
1294 "scaron",
1295 "zcaron2",
1296 NULL,
1297 "Euro",
1298 "exclamdown",
1299 "cent",
1300 "sterling",
1301 "currency",
1302 "yen",
1303 "brokenbar",
1304 "section",
1305 "dieresis",
1306 "copyright",
1307 "ordfeminine",
1308 "guillemotleft4",
1309 "logicalnot",
1310 NULL,
1311 "registered",
1312 "macron",
1313 "degree",
1314 "plusminus",
1315 "twosuperior",
1316 "threesuperior",
1317 "acute",
1318 "mu",
1319 "paragraph",
1320 "periodcentered",
1321 "cedilla",
1322 "onesuperior",
1323 "ordmasculine",
1324 "guillemotright4",
1325 "onequarter",
1326 "onehalf",
1327 "threequarters",
1328 "questiondown",
1329 "Agrave",
1330 "Aacute",
1331 "Acircumflex",
1332 "Atilde",
1333 "Adieresis",
1334 "Aring",
1335 "AE",
1336 "Ccedilla",
1337 "Egrave",
1338 "Eacute",
1339 "Ecircumflex",
1340 "Edieresis",
1341 "Igrave",
1342 "Iacute",
1343 "Icircumflex",
1344 "Idieresis",
1345 "Eth",
1346 "Ntilde",
1347 "Ograve",
1348 "Oacute",
1349 "Ocircumflex",
1350 "Otilde",
1351 "Odieresis",
1352 "multiply",
1353 "Oslash",
1354 "Ugrave",
1355 "Uacute",
1356 "Ucircumflex",
1357 "Udieresis",
1358 "Yacute",
1359 "Thorn",
1360 "germandbls",
1361 "agrave",
1362 "aacute",
1363 "acircumflex",
1364 "atilde",
1365 "adieresis",
1366 "aring",
1367 "ae",
1368 "ccedilla",
1369 "egrave",
1370 "eacute",
1371 "ecircumflex",
1372 "edieresis",
1373 "igrave",
1374 "iacute",
1375 "icircumflex",
1376 "idieresis",
1377 "eth",
1378 "ntilde",
1379 "ograve",
1380 "oacute",
1381 "ocircumflex",
1382 "otilde",
1383 "odieresis",
1384 "divide",
1385 "oslash",
1386 "ugrave",
1387 "uacute",
1388 "ucircumflex",
1389 "udieresis",
1390 "yacute",
1391 "thorn",
1392 "ydieresis",
1393 };
1394 static const FX_CHAR* const AdobeSymbolEncodingNames[224] = {
1395 "space",
1396 "exclam",
1397 "universal",
1398 "numbersign",
1399 "existential",
1400 "percent",
1401 "ampersand",
1402 "suchthat",
1403 "parenleft",
1404 "parenright",
1405 "asteriskmath",
1406 "plus",
1407 "comma",
1408 "minus",
1409 "period",
1410 "slash",
1411 "zero",
1412 "one",
1413 "two",
1414 "three",
1415 "four",
1416 "five",
1417 "six",
1418 "seven",
1419 "eight",
1420 "nine",
1421 "colon",
1422 "semicolon",
1423 "less",
1424 "equal",
1425 "greater",
1426 "question",
1427 "congruent",
1428 "Alpha",
1429 "Beta",
1430 "Chi",
1431 "Delta",
1432 "Epsilon",
1433 "Phi",
1434 "Gamma",
1435 "Eta",
1436 "Iota",
1437 "theta1",
1438 "Kappa",
1439 "Lambda",
1440 "Mu",
1441 "Nu",
1442 "Omicron",
1443 "Pi",
1444 "Theta",
1445 "Rho",
1446 "Sigma",
1447 "Tau",
1448 "Upsilon",
1449 "sigma1",
1450 "Omega",
1451 "Xi",
1452 "Psi",
1453 "Zeta",
1454 "bracketleft",
1455 "therefore",
1456 "bracketright",
1457 "perpendicular",
1458 "underscore",
1459 "radicalex",
1460 "alpha",
1461 "beta",
1462 "chi",
1463 "delta",
1464 "epsilon",
1465 "phi",
1466 "gamma",
1467 "eta",
1468 "iota",
1469 "phi1",
1470 "kappa",
1471 "lambda",
1472 "mu",
1473 "nu",
1474 "omicron",
1475 "pi",
1476 "theta",
1477 "rho",
1478 "sigma",
1479 "tau",
1480 "upsilon",
1481 "omega1",
1482 "omega",
1483 "xi",
1484 "psi",
1485 "zeta",
1486 "braceleft",
1487 "bar",
1488 "braceright",
1489 "similar",
1490 NULL,
1491 NULL,
1492 NULL,
1493 NULL,
1494 NULL,
1495 NULL,
1496 NULL,
1497 NULL,
1498 NULL,
1499 NULL,
1500 NULL,
1501 NULL,
1502 NULL,
1503 NULL,
1504 NULL,
1505 NULL,
1506 NULL,
1507 NULL,
1508 NULL,
1509 NULL,
1510 NULL,
1511 NULL,
1512 NULL,
1513 NULL,
1514 NULL,
1515 NULL,
1516 NULL,
1517 NULL,
1518 NULL,
1519 NULL,
1520 NULL,
1521 NULL,
1522 NULL,
1523 "Euro",
1524 "Upsilon1",
1525 "minute",
1526 "lessequal",
1527 "fraction",
1528 "infinity",
1529 "florin",
1530 "club",
1531 "diamond",
1532 "heart",
1533 "spade",
1534 "arrowboth",
1535 "arrowleft",
1536 "arrowup",
1537 "arrowright",
1538 "arrowdown",
1539 "degree",
1540 "plusminus",
1541 "second",
1542 "greaterequal",
1543 "multiply",
1544 "proportional",
1545 "partialdiff",
1546 "bullet",
1547 "divide",
1548 "notequal",
1549 "equivalence",
1550 "approxequal",
1551 "ellipsis",
1552 "arrowvertex",
1553 "arrowhorizex",
1554 "carriagereturn",
1555 "aleph",
1556 "Ifraktur",
1557 "Rfraktur",
1558 "weierstrass",
1559 "circlemultiply",
1560 "circleplus",
1561 "emptyset",
1562 "intersection",
1563 "union",
1564 "propersuperset",
1565 "reflexsuperset",
1566 "notsubset",
1567 "propersubset",
1568 "reflexsubset",
1569 "element",
1570 "notelement",
1571 "angle",
1572 "gradient",
1573 "registerserif",
1574 "copyrightserif",
1575 "trademarkserif",
1576 "product",
1577 "radical",
1578 "dotmath",
1579 "logicalnot",
1580 "logicaland",
1581 "logicalor",
1582 "arrowdblboth",
1583 "arrowdblleft",
1584 "arrowdblup",
1585 "arrowdblright",
1586 "arrowdbldown",
1587 "lozenge",
1588 "angleleft",
1589 "registersans",
1590 "copyrightsans",
1591 "trademarksans",
1592 "summation",
1593 "parenlefttp",
1594 "parenleftex",
1595 "parenleftbt",
1596 "bracketlefttp",
1597 "bracketleftex",
1598 "bracketleftbt",
1599 "bracelefttp",
1600 "braceleftmid",
1601 "braceleftbt",
1602 "braceex",
1603 NULL,
1604 "angleright",
1605 "integral",
1606 "integraltp",
1607 "integralex",
1608 "integralbt",
1609 "parenrighttp",
1610 "parenrightex",
1611 "parenrightbt",
1612 "bracketrighttp",
1613 "bracketrightex",
1614 "bracketrightbt",
1615 "bracerighttp",
1616 "bracerightmid",
1617 "bracerightbt",
1618 NULL,
1619 };
1620 static const FX_CHAR* const ZapfEncodingNames[224] = {
1621 "space", "a1", "a2", "a202", "a3", "a4", "a5", "a119", "a118",
1622 "a117", "a11", "a12", "a13", "a14", "a15", "a16", "a105", "a17",
1623 "a18", "a19", "a20", "a21", "a22", "a23", "a24", "a25", "a26",
1624 "a27", "a28", "a6", "a7", "a8", "a9", "a10", "a29", "a30",
1625 "a31", "a32", "a33", "a34", "a35", "a36", "a37", "a38", "a39",
1626 "a40", "a41", "a42", "a43", "a44", "a45", "a46", "a47", "a48",
1627 "a49", "a50", "a51", "a52", "a53", "a54", "a55", "a56", "a57",
1628 "a58", "a59", "a60", "a61", "a62", "a63", "a64", "a65", "a66",
1629 "a67", "a68", "a69", "a70", "a71", "a72", "a73", "a74", "a203",
1630 "a75", "a204", "a76", "a77", "a78", "a79", "a81", "a82", "a83",
1631 "a84", "a97", "a98", "a99", "a100", NULL, "a89", "a90", "a93",
1632 "a94", "a91", "a92", "a205", "a85", "a206", "a86", "a87", "a88",
1633 "a95", "a96", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1634 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
1635 NULL, NULL, NULL, "a101", "a102", "a103", "a104", "a106", "a107",
1636 "a108", "a112", "a111", "a110", "a109", "a120", "a121", "a122", "a123",
1637 "a124", "a125", "a126", "a127", "a128", "a129", "a130", "a131", "a132",
1638 "a133", "a134", "a135", "a136", "a137", "a138", "a139", "a140", "a141",
1639 "a142", "a143", "a144", "a145", "a146", "a147", "a148", "a149", "a150",
1640 "a151", "a152", "a153", "a154", "a155", "a156", "a157", "a158", "a159",
1641 "a160", "a161", "a163", "a164", "a196", "a165", "a192", "a166", "a167",
1642 "a168", "a169", "a170", "a171", "a172", "a173", "a162", "a174", "a175",
1643 "a176", "a177", "a178", "a179", "a193", "a180", "a199", "a181", "a200",
1644 "a182", NULL, "a201", "a183", "a184", "a197", "a185", "a194", "a198",
1645 "a186", "a195", "a187", "a188", "a189", "a190", "a191", NULL};
1646 const FX_CHAR* PDF_CharNameFromPredefinedCharSet(int encoding,
1647 uint8_t charcode) {
1648 if (encoding == PDFFONT_ENCODING_PDFDOC) {
1649 if (charcode < 24) {
1650 return NULL;
1651 }
1652 charcode -= 24;
1653 } else {
1654 if (charcode < 32) {
1655 return NULL;
1656 }
1657 charcode -= 32;
1658 }
1659 switch (encoding) {
1660 case PDFFONT_ENCODING_WINANSI:
1661 return AdobeWinAnsiEncodingNames[charcode];
1662 case PDFFONT_ENCODING_MACROMAN:
1663 return MacRomanEncodingNames[charcode];
1664 case PDFFONT_ENCODING_MACEXPERT:
1665 return MacExpertEncodingNames[charcode];
1666 case PDFFONT_ENCODING_STANDARD:
1667 return StandardEncodingNames[charcode];
1668 case PDFFONT_ENCODING_ADOBE_SYMBOL:
1669 return AdobeSymbolEncodingNames[charcode];
1670 case PDFFONT_ENCODING_ZAPFDINGBATS:
1671 return ZapfEncodingNames[charcode];
1672 case PDFFONT_ENCODING_PDFDOC:
1673 return PDFDocEncodingNames[charcode];
1674 }
1675 return NULL;
1676 }
1677 FX_WCHAR FT_UnicodeFromCharCode(int encoding, FX_DWORD charcode) {
1678 switch (encoding) {
1679 case FXFT_ENCODING_UNICODE:
1680 return (uint16_t)charcode;
1681 case FXFT_ENCODING_ADOBE_STANDARD:
1682 return StandardEncoding[(uint8_t)charcode];
1683 case FXFT_ENCODING_ADOBE_EXPERT:
1684 return MacExpertEncoding[(uint8_t)charcode];
1685 case FXFT_ENCODING_ADOBE_LATIN_1:
1686 return AdobeWinAnsiEncoding[(uint8_t)charcode];
1687 case FXFT_ENCODING_APPLE_ROMAN:
1688 return MacRomanEncoding[(uint8_t)charcode];
1689 case PDFFONT_ENCODING_PDFDOC:
1690 return PDFDocEncoding[(uint8_t)charcode];
1691 }
1692 return 0;
1693 }
1694 static FX_DWORD PDF_FindCode(const uint16_t* pCodes, uint16_t unicode) {
1695 for (FX_DWORD i = 0; i < 256; i++)
1696 if (pCodes[i] == unicode) {
1697 return i;
1698 }
1699 return 0;
1700 }
1701 static const uint16_t MSSymbolEncoding[256] = {
1702 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1703 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1704 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1705 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 32, 33, 8704, 35,
1706 8707, 37, 38, 8715, 40, 41, 8727, 43, 44,
1707 8722, 46, 47, 48, 49, 50, 51, 52, 53,
1708 54, 55, 56, 57, 58, 59, 60, 61, 62,
1709 63, 8773, 913, 914, 935, 916, 917, 934, 915,
1710 919, 921, 977, 922, 923, 924, 925, 927, 928,
1711 920, 929, 931, 932, 933, 962, 937, 926, 936,
1712 918, 91, 8756, 93, 8869, 95, 8254, 945, 946,
1713 967, 948, 949, 966, 947, 951, 953, 981, 954,
1714 955, 956, 957, 959, 960, 952, 961, 963, 964,
1715 965, 982, 969, 958, 968, 950, 123, 124, 125,
1716 8764, 0, 0, 0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1717 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1718 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
1719 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 978,
1720 8242, 8804, 8725, 8734, 402, 9827, 9830, 9828, 9824,
1721 8596, 8592, 8593, 8594, 8595, 176, 177, 8243, 8805,
1722 215, 8733, 8706, 8729, 247, 8800, 8801, 8776, 8943,
1723 0, 0, 8629, 0, 8465, 8476, 8472, 8855, 8853,
1724 8709, 8745, 8746, 8835, 8839, 8836, 8834, 8838, 8712,
1725 8713, 8736, 8711, 174, 169, 8482, 8719, 8730, 8901,
1726 172, 8743, 8744, 8660, 8656, 8657, 8658, 8659, 9674,
1727 9001, 0, 0, 0, 8721, 0, 0, 0, 0,
1728 0, 0, 0, 0, 0, 0, 0x0000, 9002, 8747,
1729 8992, 0, 8993, 0, 0, 0, 0, 0, 0,
1730 0x0000, 0x0000, 0x0000, 0x0000};
1731 FX_DWORD FT_CharCodeFromUnicode(int encoding, FX_WCHAR unicode) {
1732 switch (encoding) {
1733 case FXFT_ENCODING_UNICODE:
1734 return unicode;
1735 case FXFT_ENCODING_ADOBE_STANDARD:
1736 return PDF_FindCode(StandardEncoding, unicode);
1737 case FXFT_ENCODING_ADOBE_EXPERT:
1738 return PDF_FindCode(MacExpertEncoding, unicode);
1739 case FXFT_ENCODING_ADOBE_LATIN_1:
1740 return PDF_FindCode(AdobeWinAnsiEncoding, unicode);
1741 case FXFT_ENCODING_APPLE_ROMAN:
1742 return PDF_FindCode(MacRomanEncoding, unicode);
1743 case FXFT_ENCODING_ADOBE_CUSTOM:
1744 return PDF_FindCode(PDFDocEncoding, unicode);
1745 case FXFT_ENCODING_MS_SYMBOL:
1746 return PDF_FindCode(MSSymbolEncoding, unicode);
1747 }
1748 return 0;
1749 }
1750 const uint16_t* PDF_UnicodesForPredefinedCharSet(int encoding) {
1751 switch (encoding) {
1752 case PDFFONT_ENCODING_WINANSI:
1753 return AdobeWinAnsiEncoding;
1754 case PDFFONT_ENCODING_MACROMAN:
1755 return MacRomanEncoding;
1756 case PDFFONT_ENCODING_MACEXPERT:
1757 return MacExpertEncoding;
1758 case PDFFONT_ENCODING_STANDARD:
1759 return StandardEncoding;
1760 case PDFFONT_ENCODING_ADOBE_SYMBOL:
1761 return AdobeSymbolEncoding;
1762 case PDFFONT_ENCODING_ZAPFDINGBATS:
1763 return ZapfEncoding;
1764 case PDFFONT_ENCODING_PDFDOC:
1765 return PDFDocEncoding;
1766 case PDFFONT_ENCODING_MS_SYMBOL:
1767 return MSSymbolEncoding;
1768 }
1769 return NULL;
1770 }
1771 FX_DWORD PDF_PredefinedCharCodeFromUnicode(int encoding, FX_WCHAR unicode) {
1772 return PDF_FindCode(PDF_UnicodesForPredefinedCharSet(encoding), unicode);
1773 }
1774 FX_WCHAR PDF_UnicodeFromAdobeName(const FX_CHAR* name) {
1775 return (FX_WCHAR)(FXFT_unicode_from_adobe_name(name) & 0x7FFFFFFF);
1776 }
1777 CFX_ByteString PDF_AdobeNameFromUnicode(FX_WCHAR unicode) {
1778 char glyph_name[64];
1779 FXFT_adobe_name_from_unicode(glyph_name, unicode);
1780 return CFX_ByteString(glyph_name);
1781 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_font/fpdf_font.cpp ('k') | core/fpdfapi/fpdf_font/fpdf_font_cid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698