33#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
47#define FT_COMPONENT ttpost
53#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
58#define MAC_NAME( x ) (FT_String*)psnames->macintosh_name( (FT_UInt)(x) )
68#define MAC_NAME( x ) (FT_String*)tt_post_default_names[x]
72 static const FT_String*
const tt_post_default_names[258] =
75 ".notdef",
".null",
"nonmarkingreturn",
"space",
"exclam",
76 "quotedbl",
"numbersign",
"dollar",
"percent",
"ampersand",
78 "quotesingle",
"parenleft",
"parenright",
"asterisk",
"plus",
79 "comma",
"hyphen",
"period",
"slash",
"zero",
81 "one",
"two",
"three",
"four",
"five",
82 "six",
"seven",
"eight",
"nine",
"colon",
84 "semicolon",
"less",
"equal",
"greater",
"question",
85 "at",
"A",
"B",
"C",
"D",
87 "E",
"F",
"G",
"H",
"I",
88 "J",
"K",
"L",
"M",
"N",
90 "O",
"P",
"Q",
"R",
"S",
91 "T",
"U",
"V",
"W",
"X",
93 "Y",
"Z",
"bracketleft",
"backslash",
"bracketright",
94 "asciicircum",
"underscore",
"grave",
"a",
"b",
96 "c",
"d",
"e",
"f",
"g",
97 "h",
"i",
"j",
"k",
"l",
99 "m",
"n",
"o",
"p",
"q",
100 "r",
"s",
"t",
"u",
"v",
102 "w",
"x",
"y",
"z",
"braceleft",
103 "bar",
"braceright",
"asciitilde",
"Adieresis",
"Aring",
105 "Ccedilla",
"Eacute",
"Ntilde",
"Odieresis",
"Udieresis",
106 "aacute",
"agrave",
"acircumflex",
"adieresis",
"atilde",
108 "aring",
"ccedilla",
"eacute",
"egrave",
"ecircumflex",
109 "edieresis",
"iacute",
"igrave",
"icircumflex",
"idieresis",
111 "ntilde",
"oacute",
"ograve",
"ocircumflex",
"odieresis",
112 "otilde",
"uacute",
"ugrave",
"ucircumflex",
"udieresis",
114 "dagger",
"degree",
"cent",
"sterling",
"section",
115 "bullet",
"paragraph",
"germandbls",
"registered",
"copyright",
117 "trademark",
"acute",
"dieresis",
"notequal",
"AE",
118 "Oslash",
"infinity",
"plusminus",
"lessequal",
"greaterequal",
120 "yen",
"mu",
"partialdiff",
"summation",
"product",
121 "pi",
"integral",
"ordfeminine",
"ordmasculine",
"Omega",
123 "ae",
"oslash",
"questiondown",
"exclamdown",
"logicalnot",
124 "radical",
"florin",
"approxequal",
"Delta",
"guillemotleft",
126 "guillemotright",
"ellipsis",
"nonbreakingspace",
"Agrave",
"Atilde",
127 "Otilde",
"OE",
"oe",
"endash",
"emdash",
129 "quotedblleft",
"quotedblright",
"quoteleft",
"quoteright",
"divide",
130 "lozenge",
"ydieresis",
"Ydieresis",
"fraction",
"currency",
132 "guilsinglleft",
"guilsinglright",
"fi",
"fl",
"daggerdbl",
133 "periodcentered",
"quotesinglbase",
"quotedblbase",
"perthousand",
"Acircumflex",
135 "Ecircumflex",
"Aacute",
"Edieresis",
"Egrave",
"Iacute",
136 "Icircumflex",
"Idieresis",
"Igrave",
"Oacute",
"Ocircumflex",
138 "apple",
"Ograve",
"Uacute",
"Ucircumflex",
"Ugrave",
139 "dotlessi",
"circumflex",
"tilde",
"macron",
"breve",
141 "dotaccent",
"ring",
"cedilla",
"hungarumlaut",
"ogonek",
142 "caron",
"Lslash",
"lslash",
"Scaron",
"scaron",
144 "Zcaron",
"zcaron",
"brokenbar",
"Eth",
"eth",
145 "Yacute",
"yacute",
"Thorn",
"thorn",
"minus",
147 "multiply",
"onesuperior",
"twosuperior",
"threesuperior",
"onehalf",
148 "onequarter",
"threequarters",
"franc",
"Gbreve",
"gbreve",
150 "Idotaccent",
"Scedilla",
"scedilla",
"Cacute",
"cacute",
151 "Ccaron",
"ccaron",
"dcroat",
182 if ( num_glyphs >
face->max_profile.numGlyphs )
197 for (
n = 0;
n < num_glyphs;
n++ )
210 for (
n = 0;
n < num_glyphs;
n++ )
215 idx = glyph_indices[
n];
219 if (
idx > num_names )
233 for (
n = 0;
n < num_names;
n++ )
242 FT_TRACE6((
"load_format_20: %ld byte left in post table\n",
249 if (
len > post_limit ||
256 " exceeding string length (%d),"
257 " truncating at end of post table (%d byte left)\n",
266 name_strings[
n][
len] =
'\0';
272 " all entries in post table are already parsed,"
273 " using NULL names for gid %d - %d\n",
275 for ( ;
n < num_names;
n++ )
279 name_strings[
n][0] =
'\0';
290 table->glyph_indices = glyph_indices;
291 table->glyph_names = name_strings;
300 for (
n = 0;
n < num_names;
n++ )
331 if ( num_glyphs >
face->max_profile.numGlyphs ||
348 for (
n = 0;
n < num_glyphs;
n++ )
353 if ( idx < 0 || idx > num_glyphs )
407 if (
format == 0x00020000L )
409 else if (
format == 0x00025000L )
414 face->postscript_names.loaded = 1;
433 if (
format == 0x00020000L )
440 table->num_glyphs = 0;
442 for (
n = 0;
n <
table->num_names;
n++ )
446 table->num_names = 0;
448 else if (
format == 0x00025000L )
454 table->num_glyphs = 0;
495#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
496 FT_Service_PsCMaps psnames;
501 return FT_THROW( Invalid_Face_Handle );
504 return FT_THROW( Invalid_Glyph_Index );
506#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
507 psnames = (FT_Service_PsCMaps)
face->psnames;
509 return FT_THROW( Unimplemented_Feature );
515 *PSname = MAC_NAME( 0 );
519 if (
format == 0x00010000L )
522 *PSname = MAC_NAME(
idx );
524 else if (
format == 0x00020000L )
529 if ( !
names->loaded )
541 if ( name_index < 258 )
542 *PSname = MAC_NAME( name_index );
547 else if (
format == 0x00025000L )
552 if ( !
names->loaded )
#define FT_ERROR(varformat)
#define FT_TRACE6(varformat)
#define FT_NEW_ARRAY(ptr, count)
#define FT_FRAME_ENTER(size)
#define FT_READ_USHORT(var)
#define FT_READ_BYTE(var)
#define FT_STREAM_SKIP(distance)
#define FT_STREAM_READ(buffer, count)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
GLenum GLuint GLint GLenum face
static char memory[1024 *256]
tt_face_free_ps_names(TT_Face face)
FT_BEGIN_HEADER tt_face_get_ps_name(TT_Face face, FT_UInt idx, FT_String **PSname)