29#include FT_INTERNAL_DEBUG_H
30#include FT_INTERNAL_STREAM_H
31#include FT_TRUETYPE_TAGS_H
34#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
48#define FT_COMPONENT trace_ttpost
54#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
57#include FT_SERVICE_POSTSCRIPT_CMAPS_H
59#define MAC_NAME( x ) (FT_String*)psnames->macintosh_name( (FT_UInt)(x) )
69#define MAC_NAME( x ) (FT_String*)tt_post_default_names[x]
73 static const FT_String*
const tt_post_default_names[258] =
76 ".notdef",
".null",
"nonmarkingreturn",
"space",
"exclam",
77 "quotedbl",
"numbersign",
"dollar",
"percent",
"ampersand",
79 "quotesingle",
"parenleft",
"parenright",
"asterisk",
"plus",
80 "comma",
"hyphen",
"period",
"slash",
"zero",
82 "one",
"two",
"three",
"four",
"five",
83 "six",
"seven",
"eight",
"nine",
"colon",
85 "semicolon",
"less",
"equal",
"greater",
"question",
86 "at",
"A",
"B",
"C",
"D",
88 "E",
"F",
"G",
"H",
"I",
89 "J",
"K",
"L",
"M",
"N",
91 "O",
"P",
"Q",
"R",
"S",
92 "T",
"U",
"V",
"W",
"X",
94 "Y",
"Z",
"bracketleft",
"backslash",
"bracketright",
95 "asciicircum",
"underscore",
"grave",
"a",
"b",
97 "c",
"d",
"e",
"f",
"g",
98 "h",
"i",
"j",
"k",
"l",
100 "m",
"n",
"o",
"p",
"q",
101 "r",
"s",
"t",
"u",
"v",
103 "w",
"x",
"y",
"z",
"braceleft",
104 "bar",
"braceright",
"asciitilde",
"Adieresis",
"Aring",
106 "Ccedilla",
"Eacute",
"Ntilde",
"Odieresis",
"Udieresis",
107 "aacute",
"agrave",
"acircumflex",
"adieresis",
"atilde",
109 "aring",
"ccedilla",
"eacute",
"egrave",
"ecircumflex",
110 "edieresis",
"iacute",
"igrave",
"icircumflex",
"idieresis",
112 "ntilde",
"oacute",
"ograve",
"ocircumflex",
"odieresis",
113 "otilde",
"uacute",
"ugrave",
"ucircumflex",
"udieresis",
115 "dagger",
"degree",
"cent",
"sterling",
"section",
116 "bullet",
"paragraph",
"germandbls",
"registered",
"copyright",
118 "trademark",
"acute",
"dieresis",
"notequal",
"AE",
119 "Oslash",
"infinity",
"plusminus",
"lessequal",
"greaterequal",
121 "yen",
"mu",
"partialdiff",
"summation",
"product",
122 "pi",
"integral",
"ordfeminine",
"ordmasculine",
"Omega",
124 "ae",
"oslash",
"questiondown",
"exclamdown",
"logicalnot",
125 "radical",
"florin",
"approxequal",
"Delta",
"guillemotleft",
127 "guillemotright",
"ellipsis",
"nonbreakingspace",
"Agrave",
"Atilde",
128 "Otilde",
"OE",
"oe",
"endash",
"emdash",
130 "quotedblleft",
"quotedblright",
"quoteleft",
"quoteright",
"divide",
131 "lozenge",
"ydieresis",
"Ydieresis",
"fraction",
"currency",
133 "guilsinglleft",
"guilsinglright",
"fi",
"fl",
"daggerdbl",
134 "periodcentered",
"quotesinglbase",
"quotedblbase",
"perthousand",
"Acircumflex",
136 "Ecircumflex",
"Aacute",
"Edieresis",
"Egrave",
"Iacute",
137 "Icircumflex",
"Idieresis",
"Igrave",
"Oacute",
"Ocircumflex",
139 "apple",
"Ograve",
"Uacute",
"Ucircumflex",
"Ugrave",
140 "dotlessi",
"circumflex",
"tilde",
"macron",
"breve",
142 "dotaccent",
"ring",
"cedilla",
"hungarumlaut",
"ogonek",
143 "caron",
"Lslash",
"lslash",
"Scaron",
"scaron",
145 "Zcaron",
"zcaron",
"brokenbar",
"Eth",
"eth",
146 "Yacute",
"yacute",
"Thorn",
"thorn",
"minus",
148 "multiply",
"onesuperior",
"twosuperior",
"threesuperior",
"onehalf",
149 "onequarter",
"threequarters",
"franc",
"Gbreve",
"gbreve",
151 "Idotaccent",
"Scedilla",
"scedilla",
"Cacute",
"cacute",
152 "Ccaron",
"ccaron",
"dcroat",
183 if ( num_glyphs >
face->max_profile.numGlyphs )
198 for (
n = 0;
n < num_glyphs;
n++ )
211 for (
n = 0;
n < num_glyphs;
n++ )
216 idx = glyph_indices[
n];
243 FT_TRACE6((
"load_format_20: %d byte left in post table\n",
250 if (
len > post_limit ||
257 " exceeding string length (%d),"
258 " truncating at end of post table (%d byte left)\n",
267 name_strings[
n][
len] =
'\0';
273 " all entries in post table are already parsed,"
274 " using NULL names for gid %d - %d\n",
280 name_strings[
n][0] =
'\0';
291 table->glyph_indices = glyph_indices;
292 table->glyph_names = name_strings;
332 if ( num_glyphs >
face->max_profile.numGlyphs ||
349 for (
n = 0;
n < num_glyphs;
n++ )
354 if ( idx < 0 || idx > num_glyphs )
408 if (
format == 0x00020000L )
410 else if (
format == 0x00025000L )
415 face->postscript_names.loaded = 1;
434 if (
format == 0x00020000L )
441 table->num_glyphs = 0;
443 for (
n = 0;
n <
table->num_names;
n++ )
447 table->num_names = 0;
449 else if (
format == 0x00025000L )
455 table->num_glyphs = 0;
493#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
494 FT_Service_PsCMaps psnames;
499 return FT_THROW( Invalid_Face_Handle );
502 return FT_THROW( Invalid_Glyph_Index );
504#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
505 psnames = (FT_Service_PsCMaps)
face->psnames;
507 return FT_THROW( Unimplemented_Feature );
513 *PSname = MAC_NAME( 0 );
517 if (
format == 0x00010000L )
520 *PSname = MAC_NAME(
idx );
522 else if (
format == 0x00020000L )
527 if ( !
names->loaded )
539 if ( name_index < 258 )
540 *PSname = MAC_NAME( name_index );
545 else if (
format == 0x00025000L )
550 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)