35#define FT_COMPONENT ttload
62#ifdef FT_DEBUG_LEVEL_TRACE
67 FT_TRACE4((
"tt_face_lookup_table: %p, `%c%c%c%c' -- ",
83 if (
entry->Length != 0 )
88#ifdef FT_DEBUG_LEVEL_TRACE
94#ifdef FT_DEBUG_LEVEL_TRACE
181 FT_UInt has_head = 0, has_sing = 0, has_meta = 0;
187#define FT_STRUCTURE TT_TableRec
201 for ( nn = 0; nn <
sfnt->num_tables; nn++ )
210 " can read only %d table%s in font (instead of %d)\n",
211 nn, nn == 1 ?
"" :
"s",
sfnt->num_tables ));
212 sfnt->num_tables = nn;
220 FT_TRACE2((
"check_table_dir: table entry %d invalid\n", nn ));
235 FT_TRACE2((
"check_table_dir: table entry %d invalid\n", nn ));
247#ifndef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
261 if (
table.Length < 0x36 )
264 " `head' or `bhed' table too small\n" ));
273 if ( magic != 0x5F0F3CF5UL )
275 " invalid magic number in `head' or `bhed' table\n"));
286 *
valid = valid_entries;
288 if ( !valid_entries )
290 FT_TRACE2((
"check_table_dir: no valid tables found\n" ));
296 if ( has_head || ( has_sing && has_meta ) )
304#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
305 FT_TRACE2((
" neither `head', `bhed', nor `sing' table found\n" ));
307 FT_TRACE2((
" neither `head' nor `sing' table found\n" ));
354#define FT_STRUCTURE SFNT_HeaderRec
377 if (
sfnt.search_range != 1 << (
sfnt.entry_selector + 4 ) ||
378 sfnt.search_range +
sfnt.range_shift !=
sfnt.num_tables << 4 )
379 return FT_THROW( Unknown_File_Format );
384 FT_TRACE2((
"-- Number of tables: %10u\n",
sfnt.num_tables ));
385 FT_TRACE2((
"-- Format version: 0x%08lx\n",
sfnt.format_tag ));
394 " invalid table directory for TrueType\n" ));
400 valid_entries =
sfnt.num_tables;
401 if ( !valid_entries )
403 FT_TRACE2((
"tt_face_load_font_dir: no valid tables found\n" ));
409 face->num_tables = valid_entries;
420 " tag offset length checksum\n"
421 " ----------------------------------\n" ));
424 for ( nn = 0; nn <
sfnt.num_tables; nn++ )
445#ifdef FT_DEBUG_LEVEL_TRACE
453 FT_TRACE2((
" %c%c%c%c %08lx %08lx %08lx"
454 " (sanitized; original length %08lx)",
467#ifdef FT_DEBUG_LEVEL_TRACE
469 FT_TRACE2((
" %c%c%c%c %08lx %08lx %08lx",
481 for (
i = 0;
i < valid_entries;
i++ )
491 FT_TRACE2((
" (duplicate, ignored)\n" ));
499 face->dir_tables[valid_entries++] =
entry;
504 face->num_tables = valid_entries;
508 FT_TRACE2((
"table directory loaded\n\n" ));
639#define FT_STRUCTURE TT_Header
690#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
730#define FT_STRUCTURE TT_MaxProfile
779 if ( maxProfile->
version >= 0x10000L )
797 " too much twilight points in `maxp' table;\n"
799 " some glyphs might be rendered incorrectly\n" ));
837 FT_ULong storage_start, storage_limit;
843#define FT_STRUCTURE TT_NameTableRec
855#define FT_STRUCTURE TT_NameRec
870#define FT_STRUCTURE TT_LangTagRec
898 storage_start = table_pos + 6 + 12 *
table->numNameRecords;
899 storage_limit = table_pos + table_len;
901 if ( storage_start > storage_limit )
903 FT_ERROR((
"tt_face_load_name: invalid `name' table\n" ));
910 if (
table->format == 1 )
916 storage_start += 2 + 4 *
table->numLangTagRecords;
934 entry->stringOffset += table_pos +
table->storageOffset;
935 if (
entry->stringOffset < storage_start ||
936 entry->stringOffset +
entry->stringLength > storage_limit )
939 entry->stringLength = 0;
966 if (
entry->stringLength == 0 )
970 entry->stringOffset += table_pos +
table->storageOffset;
971 if (
entry->stringOffset < storage_start ||
972 entry->stringOffset +
entry->stringLength > storage_limit )
980 if (
table->format == 1 &&
entry->languageID >= 0x8000U )
982 if (
entry->languageID - 0x8000U >=
table->numLangTagRecords ||
983 !
table->langTags[
entry->languageID - 0x8000U].stringLength )
996 table->numNameRecords,
1042 if (
table->langTags )
1054 table->numNameRecords = 0;
1055 table->numLangTagRecords = 0;
1057 table->storageOffset = 0;
1093 face->cmap_size = 0;
1129#define FT_STRUCTURE TT_OS2
1291#define FT_STRUCTURE TT_Postscript
1319 ?
" yes" :
" no" ));
1350#define FT_STRUCTURE TT_PCLT
1431 if (
face->gasp.version >= 2 )
1433 face->gasp.numRanges = 0;
1438 num_ranges =
face->gasp.numRanges;
1439 FT_TRACE3((
"numRanges: %u\n", num_ranges ));
1445 gaspranges =
face->gasp.gaspRanges;
1447 for (
j = 0;
j < num_ranges;
j++ )
1452 FT_TRACE3((
"gaspRange %d: rangeMaxPPEM %5d, rangeGaspBehavior 0x%x\n",
1454 gaspranges[
j].maxPPEM,
1455 gaspranges[
j].gaspFlag ));
static const WCHAR version[]
#define FT_TRACE0(varformat)
#define FT_ERROR(varformat)
#define FT_TRACE3(varformat)
#define FT_TRACE2(varformat)
#define FT_TRACE4(varformat)
#define FT_NEW_ARRAY(ptr, count)
#define FT_OFFSET(base, count)
#define FT_RENEW_ARRAY(ptr, curcnt, newcnt)
#define FT_QNEW_ARRAY(ptr, count)
#define FT_FRAME_ENTER(size)
#define FT_READ_USHORT(var)
#define FT_STREAM_SEEK(position)
#define FT_READ_ULONG(var)
#define FT_FRAME_SHORT(f)
#define FT_FRAME_ULONG(f)
#define FT_FRAME_EXTRACT(size, bytes)
#define FT_STREAM_READ_FIELDS(fields, object)
#define FT_STREAM_READ_AT(position, buffer, count)
#define FT_FRAME_BYTES(field, count)
#define FT_FRAME_START(size)
#define FT_FRAME_USHORT(f)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLuint GLuint GLsizei count
GLenum const GLvoid GLbitfield GLsizei numGlyphs
GLenum GLuint GLint GLenum face
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static char memory[1024 *256]
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
FT_UShort maxComponentElements
FT_UShort maxStackElements
FT_UShort maxInstructionDefs
FT_UShort maxTwilightPoints
FT_UShort maxCompositeContours
FT_UShort maxComponentDepth
FT_UShort maxCompositePoints
FT_UShort maxSizeOfInstructions
FT_UShort maxFunctionDefs
FT_ULong ulCodePageRange1
FT_UShort usLowerOpticalPointSize
FT_UShort usUpperOpticalPointSize
FT_ULong ulCodePageRange2
tt_face_free_name(TT_Face face)
tt_face_load_post(TT_Face face, FT_Stream stream)
tt_face_load_pclt(TT_Face face, FT_Stream stream)
tt_face_load_gasp(TT_Face face, FT_Stream stream)
tt_face_load_font_dir(TT_Face face, FT_Stream stream)
tt_face_load_head(TT_Face face, FT_Stream stream)
tt_face_load_os2(TT_Face face, FT_Stream stream)
tt_face_load_maxp(TT_Face face, FT_Stream stream)
tt_face_load_any(TT_Face face, FT_ULong tag, FT_Long offset, FT_Byte *buffer, FT_ULong *length)
tt_face_goto_table(TT_Face face, FT_ULong tag, FT_Stream stream, FT_ULong *length)
static FT_Error check_table_dir(SFNT_Header sfnt, FT_Stream stream, FT_UShort *valid)
tt_face_load_cmap(TT_Face face, FT_Stream stream)
tt_face_load_name(TT_Face face, FT_Stream stream)
static FT_Error tt_face_load_generic_header(TT_Face face, FT_Stream stream, FT_ULong tag)
tt_face_lookup_table(TT_Face face, FT_ULong tag)
FT_BEGIN_HEADER struct TT_Header_ TT_Header
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
_Reserved_ PVOID Reserved
_Must_inspect_result_ _In_ ULONG Flags