26#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
40#define FT_COMPONENT ttpload
79 face->glyf_offset = 0;
85#ifdef FT_CONFIG_OPTION_INCREMENTAL
86 if (
face->root.internal->incremental_interface )
87 face->glyf_offset = 0;
101 if (
face->header.Index_To_Loc_Format != 0 )
105 if ( table_len >= 0x40000L )
108 table_len = 0x3FFFFL;
110 face->num_locations = table_len >>
shift;
116 if ( table_len >= 0x20000L )
119 table_len = 0x1FFFFL;
121 face->num_locations = table_len >>
shift;
126 FT_TRACE2((
"glyph count mismatch! loca: %ld, maxp: %ld\n",
127 face->num_locations - 1,
face->root.num_glyphs ));
149 if ( diff > 0 && diff < dist )
162 if ( new_loca_len <= (
FT_ULong)dist )
165 table_len = new_loca_len;
167 FT_TRACE2((
"adjusting num_locations to %ld\n",
168 face->num_locations ));
172 face->root.num_glyphs =
face->num_locations
175 FT_TRACE2((
"adjusting num_glyphs to %ld\n",
176 face->root.num_glyphs ));
207 if ( gindex < face->num_locations )
209 if (
face->header.Index_To_Loc_Format != 0 )
211 p =
face->glyph_locations + gindex * 4;
212 p_limit =
face->glyph_locations +
face->num_locations * 4;
217 if (
p + 4 <= p_limit )
222 p =
face->glyph_locations + gindex * 2;
223 p_limit =
face->glyph_locations +
face->num_locations * 2;
228 if (
p + 2 <= p_limit )
237 if ( pos1 >
face->glyf_len )
240 " too large offset (0x%08lx) found for glyph index %d,\n"
242 " exceeding the end of `glyf' table (0x%08lx)\n",
243 pos1, gindex,
face->glyf_len ));
248 if ( pos2 >
face->glyf_len )
251 if ( gindex ==
face->num_locations - 2 )
254 " too large size (%ld bytes) found for glyph index %d,\n"
256 " truncating at the end of `glyf' table to %ld bytes\n",
257 pos2 - pos1, gindex,
face->glyf_len - pos1 ));
258 pos2 =
face->glyf_len;
263 " too large offset (0x%08lx) found for glyph index %d,\n"
265 " exceeding the end of `glyf' table (0x%08lx)\n",
266 pos2, gindex + 1,
face->glyf_len ));
281 *asize = (
FT_UInt)( pos2 - pos1 );
296 face->num_locations = 0;
324#ifdef TT_USE_BYTECODE_INTERPRETER
345 face->cvt_size = table_len / 2;
365#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
407#ifdef TT_USE_BYTECODE_INTERPRETER
420 face->font_program_size = 0;
427 face->font_program_size = table_len;
431 FT_TRACE2((
"loaded, %12ld bytes\n",
face->font_program_size ));
471#ifdef TT_USE_BYTECODE_INTERPRETER
483 face->cvt_program_size = 0;
490 face->cvt_program_size = table_len;
494 FT_TRACE2((
"loaded, %12ld bytes\n",
face->cvt_program_size ));
550 p =
face->hdmx_table;
571 if ( record_size >= 0xFFFF0000UL )
572 record_size &= 0xFFFFU;
575 if ( num_records > 255 ||
577 ( record_size > 0x10001L ||
578 record_size < 4 ) ) )
587 for ( nn = 0; nn < num_records; nn++ )
589 if (
p + record_size >
limit )
592 face->hdmx_record_sizes[nn] =
p[0];
596 face->hdmx_record_count = nn;
598 face->hdmx_record_size = record_size;
605 face->hdmx_table_size = 0;
638 for ( nn = 0; nn <
face->hdmx_record_count; nn++ )
639 if (
face->hdmx_record_sizes[nn] == ppem )
642 if ( gindex < record_size )
#define FT_TRACE2(varformat)
#define FT_TRACE1(varformat)
#define FT_NEW_ARRAY(ptr, count)
#define FT_OFFSET(base, count)
#define FT_FRAME_ENTER(size)
#define FT_FRAME_RELEASE(bytes)
#define FT_NEXT_USHORT(buffer)
#define FT_FRAME_EXTRACT(size, bytes)
#define FT_NEXT_ULONG(buffer)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLenum GLuint GLint GLenum face
static char memory[1024 *256]
tt_face_load_prep(TT_Face face, FT_Stream stream)
tt_face_load_cvt(TT_Face face, FT_Stream stream)
tt_face_free_hdmx(TT_Face face)
tt_face_get_device_metrics(TT_Face face, FT_UInt ppem, FT_UInt gindex)
tt_face_load_fpgm(TT_Face face, FT_Stream stream)
tt_face_load_hdmx(TT_Face face, FT_Stream stream)
tt_face_done_loca(TT_Face face)
tt_face_load_loca(TT_Face face, FT_Stream stream)
tt_face_get_location(TT_Face face, FT_UInt gindex, FT_UInt *asize)