21 #include FT_INTERNAL_DEBUG_H 22 #include FT_INTERNAL_STREAM_H 23 #include FT_TRUETYPE_TAGS_H 36 #define FT_COMPONENT trace_ttload 61 #ifdef FT_DEBUG_LEVEL_TRACE 66 FT_TRACE4((
"tt_face_lookup_table: %08p, `%c%c%c%c' -- ",
73 entry = face->dir_tables;
74 limit = entry + face->num_tables;
76 for ( ; entry <
limit; entry++ )
80 if ( entry->
Tag == tag )
87 #ifdef FT_DEBUG_LEVEL_TRACE 93 #ifdef FT_DEBUG_LEVEL_TRACE 174 FT_UInt has_head = 0, has_sing = 0, has_meta = 0;
180 #define FT_STRUCTURE TT_TableRec 203 " can read only %d table%s in font (instead of %d)\n",
212 FT_TRACE2((
"check_table_dir: table entry %d invalid\n", nn ));
223 #ifndef TT_CONFIG_OPTION_EMBEDDED_BITMAPS 237 if ( table.
Length < 0x36 )
239 FT_TRACE2((
"check_table_dir: `head' table too small\n" ));
248 if ( magic != 0x5F0F3CF5UL )
251 " no magic number found in `head' table\n"));
269 FT_TRACE2((
"check_table_dir: no tables found\n" ));
270 error =
FT_THROW( Unknown_File_Format );
275 if ( has_head || ( has_sing && has_meta ) )
283 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS 284 FT_TRACE2((
" neither `head', `bhed', nor `sing' table found\n" ));
286 FT_TRACE2((
" neither `head' nor `sing' table found\n" ));
331 #define FT_STRUCTURE SFNT_HeaderRec 356 return FT_THROW( Unknown_File_Format );
367 error = check_table_dir( &sfnt, stream );
371 " invalid table directory for TrueType\n" ));
387 entry =
face->dir_tables;
390 " tag offset length checksum\n" 391 " ----------------------------------\n" ));
405 FT_TRACE2((
" %c%c%c%c %08lx %08lx %08lx\n",
419 FT_TRACE2((
"table directory loaded\n\n" ));
506 stream =
face->root.stream;
543 #define FT_STRUCTURE TT_Header 569 error = face->
goto_table( face, tag, stream, 0 );
578 FT_TRACE3((
"Units per EM: %4u\n", header->Units_Per_EM ));
579 FT_TRACE3((
"IndexToLoc: %4d\n", header->Index_To_Loc_Format ));
590 return tt_face_load_generic_header( face, stream,
TTAG_head );
594 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS 597 tt_face_load_bhed(
TT_Face face,
600 return tt_face_load_generic_header( face, stream,
TTAG_bhed );
632 #define FT_STRUCTURE TT_MaxProfile 681 if ( maxProfile->
version >= 0x10000L )
699 " too much twilight points in `maxp' table;\n" 701 " some glyphs might be rendered incorrectly\n" ));
710 " abnormally large component depth (%d) set to 100\n",
746 FT_ULong storage_start, storage_limit;
753 #define FT_STRUCTURE TT_NameTableRec 765 #define FT_STRUCTURE TT_NameEntryRec 799 storage_limit = table_pos + table_len;
801 if ( storage_start > storage_limit )
803 FT_ERROR((
"tt_face_load_name: invalid `name' table\n" ));
960 #define FT_STRUCTURE TT_OS2 1100 #define FT_STRUCTURE TT_Postscript 1128 ?
" yes" :
" no" ));
1157 #define FT_STRUCTURE TT_PCLT 1243 FT_TRACE3((
"numRanges: %u\n", num_ranges ));
1251 for ( j = 0; j < num_ranges; j++ )
1256 FT_TRACE3((
"gaspRange %d: rangeMaxPPEM %5d, rangeGaspBehavior 0x%x\n",
1258 gaspranges[j].maxPPEM,
1259 gaspranges[j].gaspFlag ));
GLenum GLuint GLenum GLsizei length
tt_face_load_head(TT_Face face, FT_Stream stream)
FT_BEGIN_HEADER struct TT_Header_ TT_Header
FT_UShort maxComponentDepth
return FT_THROW(Missing_Property)
tt_face_load_font_dir(TT_Face face, FT_Stream stream)
tt_face_load_pclt(TT_Face face, FT_Stream stream)
#define FT_QNEW_ARRAY(ptr, count)
tt_face_load_gasp(TT_Face face, FT_Stream stream)
tt_face_free_name(TT_Face face)
#define FT_FRAME_BYTES(field, count)
FT_UShort maxInstructionDefs
FT_ULong ulCodePageRange1
TT_Loader_GotoTableFunc goto_table
FT_BEGIN_HEADER typedef unsigned char FT_Bool
tt_face_load_any(TT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong *length)
GLenum GLuint GLint GLenum face
#define FT_ERROR(varformat)
FT_UShort maxComponentElements
FT_UShort maxFunctionDefs
#define FT_TRACE4(varformat)
tt_face_load_cmap(TT_Face face, FT_Stream stream)
GLenum const GLvoid GLbitfield GLsizei numGlyphs
#define FT_STREAM_READ_FIELDS(fields, object)
tt_face_load_maxp(TT_Face face, FT_Stream stream)
#define FT_FRAME_USHORT(f)
TT_MaxProfile max_profile
#define FT_STREAM_READ_AT(position, buffer, count)
#define FT_READ_ULONG(var)
FT_UShort maxStackElements
#define FT_TRACE2(varformat)
FT_UShort maxSizeOfInstructions
FT_UShort maxCompositePoints
FT_ULong ulCodePageRange2
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
TT_NameTableRec name_table
#define FT_NEW_ARRAY(ptr, count)
#define FT_STREAM_SEEK(position)
#define FT_TRACE3(varformat)
#define FT_FRAME_ULONG(f)
tt_face_load_os2(TT_Face face, FT_Stream stream)
#define FT_FRAME_EXTRACT(size, bytes)
tt_face_lookup_table(TT_Face face, FT_ULong tag)
GLuint GLuint GLsizei count
FT_UShort maxCompositeContours
#define FT_FRAME_ENTER(size)
tt_face_load_name(TT_Face face, FT_Stream stream)
FT_TRACE0(("cff_property_set: missing property `%s'\, property_name))
FT_UShort maxTwilightPoints
GLenum GLsizei GLenum GLenum const GLvoid * table
tt_face_load_post(TT_Face face, FT_Stream stream)
#define FT_FRAME_SHORT(f)
tt_face_goto_table(TT_Face face, FT_ULong tag, FT_Stream stream, FT_ULong *length)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define FT_FRAME_START(size)