29 #include FT_INTERNAL_DEBUG_H 30 #include FT_INTERNAL_STREAM_H 31 #include FT_TRUETYPE_TAGS_H 44 #define FT_COMPONENT trace_ttpost 50 #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES 53 #include FT_SERVICE_POSTSCRIPT_CMAPS_H 55 #define MAC_NAME( x ) ( (FT_String*)psnames->macintosh_name( x ) ) 65 #define MAC_NAME( x ) ( (FT_String*)tt_post_default_names[x] ) 69 static const FT_String*
const tt_post_default_names[258] =
72 ".notdef",
".null",
"CR",
"space",
"exclam",
73 "quotedbl",
"numbersign",
"dollar",
"percent",
"ampersand",
75 "quotesingle",
"parenleft",
"parenright",
"asterisk",
"plus",
76 "comma",
"hyphen",
"period",
"slash",
"zero",
78 "one",
"two",
"three",
"four",
"five",
79 "six",
"seven",
"eight",
"nine",
"colon",
81 "semicolon",
"less",
"equal",
"greater",
"question",
82 "at",
"A",
"B",
"C",
"D",
84 "E",
"F",
"G",
"H",
"I",
85 "J",
"K",
"L",
"M",
"N",
87 "O",
"P",
"Q",
"R",
"S",
88 "T",
"U",
"V",
"W",
"X",
90 "Y",
"Z",
"bracketleft",
"backslash",
"bracketright",
91 "asciicircum",
"underscore",
"grave",
"a",
"b",
93 "c",
"d",
"e",
"f",
"g",
94 "h",
"i",
"j",
"k",
"l",
96 "m",
"n",
"o",
"p",
"q",
97 "r",
"s",
"t",
"u",
"v",
99 "w",
"x",
"y",
"z",
"braceleft",
100 "bar",
"braceright",
"asciitilde",
"Adieresis",
"Aring",
102 "Ccedilla",
"Eacute",
"Ntilde",
"Odieresis",
"Udieresis",
103 "aacute",
"agrave",
"acircumflex",
"adieresis",
"atilde",
105 "aring",
"ccedilla",
"eacute",
"egrave",
"ecircumflex",
106 "edieresis",
"iacute",
"igrave",
"icircumflex",
"idieresis",
108 "ntilde",
"oacute",
"ograve",
"ocircumflex",
"odieresis",
109 "otilde",
"uacute",
"ugrave",
"ucircumflex",
"udieresis",
111 "dagger",
"degree",
"cent",
"sterling",
"section",
112 "bullet",
"paragraph",
"germandbls",
"registered",
"copyright",
114 "trademark",
"acute",
"dieresis",
"notequal",
"AE",
115 "Oslash",
"infinity",
"plusminus",
"lessequal",
"greaterequal",
117 "yen",
"mu",
"partialdiff",
"summation",
"product",
118 "pi",
"integral",
"ordfeminine",
"ordmasculine",
"Omega",
120 "ae",
"oslash",
"questiondown",
"exclamdown",
"logicalnot",
121 "radical",
"florin",
"approxequal",
"Delta",
"guillemotleft",
123 "guillemotright",
"ellipsis",
"nbspace",
"Agrave",
"Atilde",
124 "Otilde",
"OE",
"oe",
"endash",
"emdash",
126 "quotedblleft",
"quotedblright",
"quoteleft",
"quoteright",
"divide",
127 "lozenge",
"ydieresis",
"Ydieresis",
"fraction",
"currency",
129 "guilsinglleft",
"guilsinglright",
"fi",
"fl",
"daggerdbl",
130 "periodcentered",
"quotesinglbase",
"quotedblbase",
"perthousand",
"Acircumflex",
132 "Ecircumflex",
"Aacute",
"Edieresis",
"Egrave",
"Iacute",
133 "Icircumflex",
"Idieresis",
"Igrave",
"Oacute",
"Ocircumflex",
135 "apple",
"Ograve",
"Uacute",
"Ucircumflex",
"Ugrave",
136 "dotlessi",
"circumflex",
"tilde",
"macron",
"breve",
138 "dotaccent",
"ring",
"cedilla",
"hungarumlaut",
"ogonek",
139 "caron",
"Lslash",
"lslash",
"Scaron",
"scaron",
141 "Zcaron",
"zcaron",
"brokenbar",
"Eth",
"eth",
142 "Yacute",
"yacute",
"Thorn",
"thorn",
"minus",
144 "multiply",
"onesuperior",
"twosuperior",
"threesuperior",
"onehalf",
145 "onequarter",
"threequarters",
"franc",
"Gbreve",
"gbreve",
147 "Idot",
"Scedilla",
"scedilla",
"Cacute",
"cacute",
148 "Ccaron",
"ccaron",
"dmacron",
181 error =
FT_THROW( Invalid_File_Format );
194 for ( n = 0; n < num_glyphs; n++ )
207 for ( n = 0; n < num_glyphs; n++ )
212 idx = glyph_indices[
n];
216 if ( idx > num_names )
230 for ( n = 0; n < num_names; n++ )
239 FT_TRACE6((
"load_format_20: %d byte left in post table\n",
246 if ( (
FT_Int)len > post_limit ||
250 " exceeding string length (%d)," 251 " truncating at end of post table (%d byte left)\n",
260 name_strings[
n][
len] =
'\0';
266 " all entries in post table are already parsed," 267 " using NULL names for gid %d - %d\n",
269 for ( ; n < num_names; n++ )
273 name_strings[
n][0] =
'\0';
294 for ( n = 0; n < num_names; n++ )
328 error =
FT_THROW( Invalid_File_Format );
341 for ( n = 0; n < num_glyphs; n++ )
346 if ( idx < 0 || idx > num_glyphs )
348 error =
FT_THROW( Invalid_File_Format );
374 load_post_names(
TT_Face face )
400 if ( format == 0x00020000L )
401 error = load_format_20( face, stream, post_limit );
402 else if ( format == 0x00028000L )
403 error = load_format_25( face, stream, post_limit );
405 error =
FT_THROW( Invalid_File_Format );
426 if (
format == 0x00020000L )
441 else if (
format == 0x00028000L )
485 #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES 486 FT_Service_PsCMaps psnames;
491 return FT_THROW( Invalid_Face_Handle );
494 return FT_THROW( Invalid_Glyph_Index );
496 #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES 497 psnames = (FT_Service_PsCMaps)face->
psnames;
499 return FT_THROW( Unimplemented_Feature );
509 if (
format == 0x00010000L )
514 else if (
format == 0x00020000L )
521 error = load_post_names( face );
531 if ( name_index < 258 )
537 else if (
format == 0x00028000L )
544 error = load_post_names( face );
tt_face_free_ps_names(TT_Face face)
union TT_Post_NamesRec_::@1 names
return FT_THROW(Missing_Property)
#define FT_READ_BYTE(var)
FT_UShort * glyph_indices
#define FT_READ_USHORT(var)
TT_Loader_GotoTableFunc goto_table
tt_face_get_ps_name(TT_Face face, FT_UInt idx, FT_String **PSname)
GLenum GLuint GLint GLenum face
#define FT_ERROR(varformat)
#define FT_STREAM_SKIP(distance)
TT_MaxProfile max_profile
TT_Post_NamesRec postscript_names
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
#define FT_NEW_ARRAY(ptr, count)
if(!abbox) return FT_THROW(Invalid_Argument)
#define FT_TRACE6(varformat)
#define FT_FRAME_ENTER(size)
GLenum GLsizei GLenum GLenum const GLvoid * table
#define FT_STREAM_READ(buffer, count)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format