1
/* cairo - a vector graphics library with display and print output
2
 *
3
 * Copyright © 2006 Red Hat, Inc
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it either under the terms of the GNU Lesser General Public
7
 * License version 2.1 as published by the Free Software Foundation
8
 * (the "LGPL") or, at your option, under the terms of the Mozilla
9
 * Public License Version 1.1 (the "MPL"). If you do not alter this
10
 * notice, a recipient may use your version of this file under either
11
 * the MPL or the LGPL.
12
 *
13
 * You should have received a copy of the LGPL along with this library
14
 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
15
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
16
 * You should have received a copy of the MPL along with this library
17
 * in the file COPYING-MPL-1.1
18
 *
19
 * The contents of this file are subject to the Mozilla Public License
20
 * Version 1.1 (the "License"); you may not use this file except in
21
 * compliance with the License. You may obtain a copy of the License at
22
 * http://www.mozilla.org/MPL/
23
 *
24
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
25
 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
26
 * the specific language governing rights and limitations.
27
 *
28
 * The Original Code is the cairo graphics library.
29
 *
30
 * The Initial Developer of the Original Code is Red Hat, Inc.
31
 *
32
 * Contributor(s):
33
 *	Kristian Høgsberg <krh@redhat.com>
34
 */
35

            
36
#include "cairoint.h"
37

            
38
#if CAIRO_HAS_FONT_SUBSET
39

            
40
#include "cairo-type1-private.h"
41
#include "cairo-scaled-font-subsets-private.h"
42

            
43
#if 0
44
/*
45
 * The three tables that follow are generated using this perl code:
46
 */
47

            
48
@ps_standard_encoding = (
49
	#   0
50
	NULL,		NULL,		NULL,		NULL,
51
	NULL,		NULL,		NULL,		NULL,
52
	NULL,		NULL,		NULL,		NULL,
53
	NULL,		NULL,		NULL,		NULL,
54
	#  16
55
	NULL,		NULL,		NULL,		NULL,
56
	NULL,		NULL,		NULL,		NULL,
57
	NULL,		NULL,		NULL,		NULL,
58
	NULL,		NULL,		NULL,		NULL,
59
	#  32
60
	"space",	"exclam",	"quotedbl",	"numbersign",
61
	"dollar",	"percent",	"ampersand",	"quoteright",
62
	"parenleft",	"parenright",	"asterisk",	"plus",
63
	"comma",	"hyphen",	"period",	"slash",
64
	#  48
65
	"zero",		"one",		"two",		"three",
66
	"four",		"five",		"six",		"seven",
67
	"eight",	"nine",		"colon",	"semicolon",
68
	"less",		"equal",	"greater",	"question",
69
	#  64
70
	"at",		"A",		"B",		"C",
71
	"D",		"E",		"F",		"G",
72
	"H",		"I",		"J",		"K",
73
	"L",		"M",		"N",		"O",
74
	#  80
75
	"P",		"Q",		"R",		"S",
76
	"T",		"U",		"V",		"W",
77
	"X",		"Y",		"Z",		"bracketleft",
78
	"backslash",	"bracketright",	"asciicircum",	"underscore",
79
	#  96
80
	"quoteleft",	"a",		"b",		"c",
81
	"d",		"e",		"f",		"g",
82
	"h",		"i",		"j",		"k",
83
	"l",		"m",		"n",		"o",
84
	# 112
85
	"p",		"q",		"r",		"s",
86
	"t",		"u",		"v",		"w",
87
	"x",		"y",		"z",		"braceleft",
88
	"bar",		"braceright",	"asciitilde",	NULL,
89
	# 128
90
	NULL,		NULL,		NULL,		NULL,
91
	NULL,		NULL,		NULL,		NULL,
92
	NULL,		NULL,		NULL,		NULL,
93
	NULL,		NULL,		NULL,		NULL,
94
	# 144
95
	NULL,		NULL,		NULL,		NULL,
96
	NULL,		NULL,		NULL,		NULL,
97
	NULL,		NULL,		NULL,		NULL,
98
	NULL,		NULL,		NULL,		NULL,
99
	# 160
100
	NULL,		"exclamdown",	"cent",		"sterling",
101
	"fraction",	"yen",		"florin",	"section",
102
	"currency",	"quotesingle",	"quotedblleft",	"guillemotleft",
103
	"guilsinglleft","guilsinglright","fi",		"fl",
104
	# 176
105
	NULL,		"endash",	"dagger",	"daggerdbl",
106
	"periodcentered",NULL,		"paragraph",	"bullet",
107
	"quotesinglbase","quotedblbase","quotedblright","guillemotright",
108
	"ellipsis",	"perthousand",	NULL,		"questiondown",
109
	# 192
110
	NULL,		"grave",	"acute",	"circumflex",
111
	"tilde",	"macron",	"breve",	"dotaccent",
112
	"dieresis",	NULL,		"ring",		"cedilla",
113
	NULL,		"hungarumlaut",	"ogonek",	"caron",
114
	# 208
115
	"emdash",	NULL,		NULL,		NULL,
116
	NULL,		NULL,		NULL,		NULL,
117
	NULL,		NULL,		NULL,		NULL,
118
	NULL,		NULL,		NULL,		NULL,
119
	# 224
120
	NULL,		"AE",		NULL,		"ordfeminine",
121
	NULL,		NULL,		NULL,		NULL,
122
	"Lslash",	"Oslash",	"OE",		"ordmasculine",
123
	NULL,		NULL,		NULL,		NULL,
124
	# 240
125
	NULL,		"ae",		NULL,		NULL,
126
	NULL,		"dotlessi",	NULL,		NULL,
127
	"lslash",	"oslash",	"oe",		"germandbls",
128
	NULL,		NULL,		NULL,		NULL
129
	);
130

            
131
@winansi_encoding = (
132
	#   0
133
	NULL,		NULL,		NULL,		NULL,
134
	NULL,		NULL,		NULL,		NULL,
135
	NULL,		NULL,		NULL,		NULL,
136
	NULL,		NULL,		NULL,		NULL,
137
	#  16
138
	NULL,		NULL,		NULL,		NULL,
139
	NULL,		NULL,		NULL,		NULL,
140
	NULL,		NULL,		NULL,		NULL,
141
	NULL,		NULL,		NULL,		NULL,
142
	#  32
143
	"space",	"exclam",	"quotedbl",	"numbersign",
144
	"dollar",	"percent",	"ampersand",	"quotesingle",
145
	"parenleft",	"parenright",	"asterisk",	"plus",
146
	"comma",	"hyphen",	"period",	"slash",
147
	#  48
148
	"zero",		"one",		"two",		"three",
149
	"four",		"five",		"six",		"seven",
150
	"eight",	"nine",		"colon",	"semicolon",
151
	"less",		"equal",	"greater",	"question",
152
	#  64
153
	"at",		"A",		"B",		"C",
154
	"D",		"E",		"F",		"G",
155
	"H",		"I",		"J",		"K",
156
	"L",		"M",		"N",		"O",
157
	#  80
158
	"P",		"Q",		"R",		"S",
159
	"T",		"U",		"V",		"W",
160
	"X",		"Y",		"Z",		"bracketleft",
161
	"backslash",	"bracketright",	"asciicircum",	"underscore",
162
	#  96
163
	"grave",	"a",		"b",		"c",
164
	"d",		"e",		"f",		"g",
165
	"h",		"i",		"j",		"k",
166
	"l",		"m",		"n",		"o",
167
	# 112
168
	"p",		"q",		"r",		"s",
169
	"t",		"u",		"v",		"w",
170
	"x",		"y",		"z",		"braceleft",
171
	"bar",		"braceright",	"asciitilde",	NULL,
172
	# 128
173
	"Euro",		NULL,		"quotesinglbase","florin",
174
	"quotedblbase", "ellipsis",	"dagger",	"daggerdbl",
175
	"circumflex",	"perthousand",	"Scaron",	"guilsinglleft",
176
	"OE",		NULL,		"Zcaron",	NULL,
177
	# 144
178
	NULL,		"quoteleft",	"quoteright",	"quotedblleft",
179
	"quotedblright","bullet",	"endash",	"emdash",
180
	"tilde",	"trademark",	"scaron",	"guilsinglright",
181
	"oe",		NULL,		"zcaron",	"Ydieresis",
182
	# 160
183
	NULL,		"exclamdown",	"cent",		"sterling",
184
	"currency",	"yen",		"brokenbar",	"section",
185
	"dieresis",	"copyright",	"ordfeminine",	"guillemotleft",
186
	# 173 is also "hyphen" but we leave this NULL to avoid duplicate names
187
	"logicalnot",	NULL,		"registered",	"macron",
188
	# 176
189
	"degree",	"plusminus",	"twosuperior",	"threesuperior",
190
	"acute",	"mu",		"paragraph",	"periodcentered",
191
	"cedilla",	"onesuperior",	"ordmasculine",	"guillemotright",
192
	"onequarter",	"onehalf",	"threequarters","questiondown",
193
	# 192
194
	"Agrave",	"Aacute",	"Acircumflex",	"Atilde",
195
	"Adieresis",	"Aring",	"AE",		"Ccedilla",
196
	"Egrave",	"Eacute",	"Ecircumflex",	"Edieresis",
197
	"Igrave",	"Iacute",	"Icircumflex",	"Idieresis",
198
	# 208
199
	"Eth",		"Ntilde",	"Ograve",	"Oacute",
200
	"Ocircumflex",	"Otilde",	"Odieresis",	"multiply",
201
	"Oslash",	"Ugrave",	"Uacute",	"Ucircumflex",
202
	"Udieresis",	"Yacute",	"Thorn",	"germandbls",
203
	# 224
204
	"agrave",	"aacute",	"acircumflex",	"atilde",
205
	"adieresis",	"aring",	"ae",		"ccedilla",
206
	"egrave",	"eacute",	"ecircumflex",	"edieresis",
207
	"igrave",	"iacute",	"icircumflex",	"idieresis",
208
	# 240
209
	"eth",		"ntilde",	"ograve",	"oacute",
210
	"ocircumflex",	"otilde",	"odieresis",	"divide",
211
	"oslash",	"ugrave",	"uacute",	"ucircumflex",
212
	"udieresis",	"yacute",	"thorn",	"ydieresis"
213
);
214

            
215
sub print_offsets {
216
    $s = qq();
217
    for $sym (@_) {
218
        if (! ($sym eq NULL)) {
219
	    $ss = qq( $hash{$sym}/*$sym*/,);
220
	} else {
221
	    $ss = qq( 0,);
222
	}
223
	if (length($s) + length($ss) > 78) {
224
	    print qq( $s\n);
225
	    $s = "";
226
	}
227
	$s .= $ss;
228
    }
229
    print qq( $s\n);
230
}
231

            
232
@combined = (@ps_standard_encoding, @winansi_encoding);
233
print "static const char glyph_name_symbol[] = {\n";
234
%hash = ();
235
$s = qq( "\\0");
236
$offset = 1;
237
for $sym (@combined) {
238
    if (! ($sym eq NULL)) {
239
        if (! exists $hash{$sym}) {
240
	    $hash{$sym} = $offset;
241
	    $offset += length($sym) + 1;
242
	    $ss = qq( "$sym\\0");
243
	    if (length($s) + length($ss) > 78) {
244
	        print qq( $s\n);
245
	        $s = "";
246
	    }
247
	    $s .= $ss;
248
	}
249
    }
250
}
251
print qq( $s\n);
252
print "};\n\n";
253

            
254
print "static const int16_t ps_standard_encoding_offset[256] = {\n";
255
print_offsets(@ps_standard_encoding);
256
print "};\n";
257

            
258
print "static const int16_t winansi_encoding_offset[256] = {\n";
259
print_offsets(@winansi_encoding);
260
print "};\n";
261

            
262
exit;
263
#endif
264

            
265
static const char glyph_name_symbol[] = {
266
  "\0" "space\0" "exclam\0" "quotedbl\0" "numbersign\0" "dollar\0" "percent\0"
267
  "ampersand\0" "quoteright\0" "parenleft\0" "parenright\0" "asterisk\0"
268
  "plus\0" "comma\0" "hyphen\0" "period\0" "slash\0" "zero\0" "one\0" "two\0"
269
  "three\0" "four\0" "five\0" "six\0" "seven\0" "eight\0" "nine\0" "colon\0"
270
  "semicolon\0" "less\0" "equal\0" "greater\0" "question\0" "at\0" "A\0" "B\0"
271
  "C\0" "D\0" "E\0" "F\0" "G\0" "H\0" "I\0" "J\0" "K\0" "L\0" "M\0" "N\0" "O\0"
272
  "P\0" "Q\0" "R\0" "S\0" "T\0" "U\0" "V\0" "W\0" "X\0" "Y\0" "Z\0"
273
  "bracketleft\0" "backslash\0" "bracketright\0" "asciicircum\0" "underscore\0"
274
  "quoteleft\0" "a\0" "b\0" "c\0" "d\0" "e\0" "f\0" "g\0" "h\0" "i\0" "j\0"
275
  "k\0" "l\0" "m\0" "n\0" "o\0" "p\0" "q\0" "r\0" "s\0" "t\0" "u\0" "v\0" "w\0"
276
  "x\0" "y\0" "z\0" "braceleft\0" "bar\0" "braceright\0" "asciitilde\0"
277
  "exclamdown\0" "cent\0" "sterling\0" "fraction\0" "yen\0" "florin\0"
278
  "section\0" "currency\0" "quotesingle\0" "quotedblleft\0" "guillemotleft\0"
279
  "guilsinglleft\0" "guilsinglright\0" "fi\0" "fl\0" "endash\0" "dagger\0"
280
  "daggerdbl\0" "periodcentered\0" "paragraph\0" "bullet\0" "quotesinglbase\0"
281
  "quotedblbase\0" "quotedblright\0" "guillemotright\0" "ellipsis\0"
282
  "perthousand\0" "questiondown\0" "grave\0" "acute\0" "circumflex\0" "tilde\0"
283
  "macron\0" "breve\0" "dotaccent\0" "dieresis\0" "ring\0" "cedilla\0"
284
  "hungarumlaut\0" "ogonek\0" "caron\0" "emdash\0" "AE\0" "ordfeminine\0"
285
  "Lslash\0" "Oslash\0" "OE\0" "ordmasculine\0" "ae\0" "dotlessi\0" "lslash\0"
286
  "oslash\0" "oe\0" "germandbls\0" "Euro\0" "Scaron\0" "Zcaron\0" "trademark\0"
287
  "scaron\0" "zcaron\0" "Ydieresis\0" "brokenbar\0" "copyright\0"
288
  "logicalnot\0" "registered\0" "degree\0" "plusminus\0" "twosuperior\0"
289
  "threesuperior\0" "mu\0" "onesuperior\0" "onequarter\0" "onehalf\0"
290
  "threequarters\0" "Agrave\0" "Aacute\0" "Acircumflex\0" "Atilde\0"
291
  "Adieresis\0" "Aring\0" "Ccedilla\0" "Egrave\0" "Eacute\0" "Ecircumflex\0"
292
  "Edieresis\0" "Igrave\0" "Iacute\0" "Icircumflex\0" "Idieresis\0" "Eth\0"
293
  "Ntilde\0" "Ograve\0" "Oacute\0" "Ocircumflex\0" "Otilde\0" "Odieresis\0"
294
  "multiply\0" "Ugrave\0" "Uacute\0" "Ucircumflex\0" "Udieresis\0" "Yacute\0"
295
  "Thorn\0" "agrave\0" "aacute\0" "acircumflex\0" "atilde\0" "adieresis\0"
296
  "aring\0" "ccedilla\0" "egrave\0" "eacute\0" "ecircumflex\0" "edieresis\0"
297
  "igrave\0" "iacute\0" "icircumflex\0" "idieresis\0" "eth\0" "ntilde\0"
298
  "ograve\0" "oacute\0" "ocircumflex\0" "otilde\0" "odieresis\0" "divide\0"
299
  "ugrave\0" "uacute\0" "ucircumflex\0" "udieresis\0" "yacute\0" "thorn\0"
300
  "ydieresis\0"
301
};
302

            
303
static const int16_t ps_standard_encoding_offset[256] = {
304
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
305
  0, 0, 0, 0, 0, 0, 1/*space*/, 7/*exclam*/, 14/*quotedbl*/, 23/*numbersign*/,
306
  34/*dollar*/, 41/*percent*/, 49/*ampersand*/, 59/*quoteright*/,
307
  70/*parenleft*/, 80/*parenright*/, 91/*asterisk*/, 100/*plus*/, 105/*comma*/,
308
  111/*hyphen*/, 118/*period*/, 125/*slash*/, 131/*zero*/, 136/*one*/,
309
  140/*two*/, 144/*three*/, 150/*four*/, 155/*five*/, 160/*six*/, 164/*seven*/,
310
  170/*eight*/, 176/*nine*/, 181/*colon*/, 187/*semicolon*/, 197/*less*/,
311
  202/*equal*/, 208/*greater*/, 216/*question*/, 225/*at*/, 228/*A*/, 230/*B*/,
312
  232/*C*/, 234/*D*/, 236/*E*/, 238/*F*/, 240/*G*/, 242/*H*/, 244/*I*/,
313
  246/*J*/, 248/*K*/, 250/*L*/, 252/*M*/, 254/*N*/, 256/*O*/, 258/*P*/,
314
  260/*Q*/, 262/*R*/, 264/*S*/, 266/*T*/, 268/*U*/, 270/*V*/, 272/*W*/,
315
  274/*X*/, 276/*Y*/, 278/*Z*/, 280/*bracketleft*/, 292/*backslash*/,
316
  302/*bracketright*/, 315/*asciicircum*/, 327/*underscore*/, 338/*quoteleft*/,
317
  348/*a*/, 350/*b*/, 352/*c*/, 354/*d*/, 356/*e*/, 358/*f*/, 360/*g*/,
318
  362/*h*/, 364/*i*/, 366/*j*/, 368/*k*/, 370/*l*/, 372/*m*/, 374/*n*/,
319
  376/*o*/, 378/*p*/, 380/*q*/, 382/*r*/, 384/*s*/, 386/*t*/, 388/*u*/,
320
  390/*v*/, 392/*w*/, 394/*x*/, 396/*y*/, 398/*z*/, 400/*braceleft*/,
321
  410/*bar*/, 414/*braceright*/, 425/*asciitilde*/, 0, 0, 0, 0, 0, 0, 0, 0, 0,
322
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
323
  436/*exclamdown*/, 447/*cent*/, 452/*sterling*/, 461/*fraction*/, 470/*yen*/,
324
  474/*florin*/, 481/*section*/, 489/*currency*/, 498/*quotesingle*/,
325
  510/*quotedblleft*/, 523/*guillemotleft*/, 537/*guilsinglleft*/,
326
  551/*guilsinglright*/, 566/*fi*/, 569/*fl*/, 0, 572/*endash*/, 579/*dagger*/,
327
  586/*daggerdbl*/, 596/*periodcentered*/, 0, 611/*paragraph*/, 621/*bullet*/,
328
  628/*quotesinglbase*/, 643/*quotedblbase*/, 656/*quotedblright*/,
329
  670/*guillemotright*/, 685/*ellipsis*/, 694/*perthousand*/, 0,
330
  706/*questiondown*/, 0, 719/*grave*/, 725/*acute*/, 731/*circumflex*/,
331
  742/*tilde*/, 748/*macron*/, 755/*breve*/, 761/*dotaccent*/, 771/*dieresis*/,
332
  0, 780/*ring*/, 785/*cedilla*/, 0, 793/*hungarumlaut*/, 806/*ogonek*/,
333
  813/*caron*/, 819/*emdash*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
334
  826/*AE*/, 0, 829/*ordfeminine*/, 0, 0, 0, 0, 841/*Lslash*/, 848/*Oslash*/,
335
  855/*OE*/, 858/*ordmasculine*/, 0, 0, 0, 0, 0, 871/*ae*/, 0, 0, 0,
336
  874/*dotlessi*/, 0, 0, 883/*lslash*/, 890/*oslash*/, 897/*oe*/,
337
  900/*germandbls*/, 0, 0, 0, 0,
338
};
339

            
340
static const int16_t winansi_encoding_offset[256] = {
341
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
342
  0, 0, 0, 0, 0, 0, 1/*space*/, 7/*exclam*/, 14/*quotedbl*/, 23/*numbersign*/,
343
  34/*dollar*/, 41/*percent*/, 49/*ampersand*/, 498/*quotesingle*/,
344
  70/*parenleft*/, 80/*parenright*/, 91/*asterisk*/, 100/*plus*/, 105/*comma*/,
345
  111/*hyphen*/, 118/*period*/, 125/*slash*/, 131/*zero*/, 136/*one*/,
346
  140/*two*/, 144/*three*/, 150/*four*/, 155/*five*/, 160/*six*/, 164/*seven*/,
347
  170/*eight*/, 176/*nine*/, 181/*colon*/, 187/*semicolon*/, 197/*less*/,
348
  202/*equal*/, 208/*greater*/, 216/*question*/, 225/*at*/, 228/*A*/, 230/*B*/,
349
  232/*C*/, 234/*D*/, 236/*E*/, 238/*F*/, 240/*G*/, 242/*H*/, 244/*I*/,
350
  246/*J*/, 248/*K*/, 250/*L*/, 252/*M*/, 254/*N*/, 256/*O*/, 258/*P*/,
351
  260/*Q*/, 262/*R*/, 264/*S*/, 266/*T*/, 268/*U*/, 270/*V*/, 272/*W*/,
352
  274/*X*/, 276/*Y*/, 278/*Z*/, 280/*bracketleft*/, 292/*backslash*/,
353
  302/*bracketright*/, 315/*asciicircum*/, 327/*underscore*/, 719/*grave*/,
354
  348/*a*/, 350/*b*/, 352/*c*/, 354/*d*/, 356/*e*/, 358/*f*/, 360/*g*/,
355
  362/*h*/, 364/*i*/, 366/*j*/, 368/*k*/, 370/*l*/, 372/*m*/, 374/*n*/,
356
  376/*o*/, 378/*p*/, 380/*q*/, 382/*r*/, 384/*s*/, 386/*t*/, 388/*u*/,
357
  390/*v*/, 392/*w*/, 394/*x*/, 396/*y*/, 398/*z*/, 400/*braceleft*/,
358
  410/*bar*/, 414/*braceright*/, 425/*asciitilde*/, 0, 911/*Euro*/, 0,
359
  628/*quotesinglbase*/, 474/*florin*/, 643/*quotedblbase*/, 685/*ellipsis*/,
360
  579/*dagger*/, 586/*daggerdbl*/, 731/*circumflex*/, 694/*perthousand*/,
361
  916/*Scaron*/, 537/*guilsinglleft*/, 855/*OE*/, 0, 923/*Zcaron*/, 0, 0,
362
  338/*quoteleft*/, 59/*quoteright*/, 510/*quotedblleft*/,
363
  656/*quotedblright*/, 621/*bullet*/, 572/*endash*/, 819/*emdash*/,
364
  742/*tilde*/, 930/*trademark*/, 940/*scaron*/, 551/*guilsinglright*/,
365
  897/*oe*/, 0, 947/*zcaron*/, 954/*Ydieresis*/, 0, 436/*exclamdown*/,
366
  447/*cent*/, 452/*sterling*/, 489/*currency*/, 470/*yen*/, 964/*brokenbar*/,
367
  481/*section*/, 771/*dieresis*/, 974/*copyright*/, 829/*ordfeminine*/,
368
  523/*guillemotleft*/, 984/*logicalnot*/, 0, 995/*registered*/, 748/*macron*/,
369
  1006/*degree*/, 1013/*plusminus*/, 1023/*twosuperior*/,
370
  1035/*threesuperior*/, 725/*acute*/, 1049/*mu*/, 611/*paragraph*/,
371
  596/*periodcentered*/, 785/*cedilla*/, 1052/*onesuperior*/,
372
  858/*ordmasculine*/, 670/*guillemotright*/, 1064/*onequarter*/,
373
  1075/*onehalf*/, 1083/*threequarters*/, 706/*questiondown*/, 1097/*Agrave*/,
374
  1104/*Aacute*/, 1111/*Acircumflex*/, 1123/*Atilde*/, 1130/*Adieresis*/,
375
  1140/*Aring*/, 826/*AE*/, 1146/*Ccedilla*/, 1155/*Egrave*/, 1162/*Eacute*/,
376
  1169/*Ecircumflex*/, 1181/*Edieresis*/, 1191/*Igrave*/, 1198/*Iacute*/,
377
  1205/*Icircumflex*/, 1217/*Idieresis*/, 1227/*Eth*/, 1231/*Ntilde*/,
378
  1238/*Ograve*/, 1245/*Oacute*/, 1252/*Ocircumflex*/, 1264/*Otilde*/,
379
  1271/*Odieresis*/, 1281/*multiply*/, 848/*Oslash*/, 1290/*Ugrave*/,
380
  1297/*Uacute*/, 1304/*Ucircumflex*/, 1316/*Udieresis*/, 1326/*Yacute*/,
381
  1333/*Thorn*/, 900/*germandbls*/, 1339/*agrave*/, 1346/*aacute*/,
382
  1353/*acircumflex*/, 1365/*atilde*/, 1372/*adieresis*/, 1382/*aring*/,
383
  871/*ae*/, 1388/*ccedilla*/, 1397/*egrave*/, 1404/*eacute*/,
384
  1411/*ecircumflex*/, 1423/*edieresis*/, 1433/*igrave*/, 1440/*iacute*/,
385
  1447/*icircumflex*/, 1459/*idieresis*/, 1469/*eth*/, 1473/*ntilde*/,
386
  1480/*ograve*/, 1487/*oacute*/, 1494/*ocircumflex*/, 1506/*otilde*/,
387
  1513/*odieresis*/, 1523/*divide*/, 890/*oslash*/, 1530/*ugrave*/,
388
  1537/*uacute*/, 1544/*ucircumflex*/, 1556/*udieresis*/, 1566/*yacute*/,
389
  1573/*thorn*/, 1579/*ydieresis*/,
390
};
391

            
392
const char *
393
_cairo_ps_standard_encoding_to_glyphname (int glyph)
394
{
395
    if (ps_standard_encoding_offset[glyph])
396
	return glyph_name_symbol + ps_standard_encoding_offset[glyph];
397
    else
398
	return NULL;
399
}
400

            
401
const char *
402
_cairo_winansi_to_glyphname (int glyph)
403
{
404
    if (winansi_encoding_offset[glyph])
405
	return glyph_name_symbol + winansi_encoding_offset[glyph];
406
    else
407
	return NULL;
408
}
409

            
410
#endif /* CAIRO_HAS_FONT_SUBSET */