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] )
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 = SFNT_Err_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 )
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",
273 name_strings[
n][0] =
'\0';
328 error = SFNT_Err_Invalid_File_Format;
341 for ( n = 0; n < num_glyphs; n++ )
346 if ( idx < 0 || idx > num_glyphs )
348 error = SFNT_Err_Invalid_File_Format;
400 if ( format == 0x00020000L )
402 else if ( format == 0x00028000L )
405 error = SFNT_Err_Invalid_File_Format;
424 format = face->postscript.FormatType;
426 if ( format == 0x00020000L )
441 else if ( format == 0x00028000L )
485 #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
486 FT_Service_PsCMaps psnames;
491 return SFNT_Err_Invalid_Face_Handle;
493 if ( idx >= (
FT_UInt)face->max_profile.numGlyphs )
494 return SFNT_Err_Invalid_Glyph_Index;
496 #ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
497 psnames = (FT_Service_PsCMaps)face->psnames;
499 return SFNT_Err_Unimplemented_Feature;
502 names = &face->postscript_names;
507 format = face->postscript.FormatType;
509 if ( format == 0x00010000L )
514 else if ( format == 0x00020000L )
531 if ( name_index < 258 )
537 else if ( format == 0x00028000L )
GLenum GLsizei GLenum GLenum const GLvoid * table
tt_face_free_ps_names(TT_Face face)
static const FT_String *const tt_post_default_names[258]
GLuint const GLuint * names
#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)
static FT_Error load_post_names(TT_Face face)
#define FT_ERROR(varformat)
#define FT_STREAM_SKIP(distance)
TT_MaxProfile max_profile
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum format
TT_Post_NamesRec postscript_names
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
#define FT_NEW_ARRAY(ptr, count)
#define FT_TRACE6(varformat)
static FT_Error load_format_25(TT_Face face, FT_Stream stream, FT_Long post_limit)
static FT_Error load_format_20(TT_Face face, FT_Stream stream, FT_Long post_limit)
#define FT_FRAME_ENTER(size)
union TT_Post_NamesRec_::@19 names
#define FT_STREAM_READ(buffer, count)