20 #include FT_INTERNAL_DEBUG_H 21 #include FT_INTERNAL_STREAM_H 22 #include FT_TRUETYPE_TAGS_H 35 #define FT_COMPONENT trace_ttmtx 63 #ifndef FT_CONFIG_OPTION_OLD_INTERNALS 79 ptable_offset = &face->vert_metrics_offset;
80 ptable_size = &face->vert_metrics_size;
85 ptable_offset = &face->horz_metrics_offset;
86 ptable_size = &face->horz_metrics_size;
89 error = face->goto_table( face, tag, stream, &table_size );
93 *ptable_size = table_size;
111 FT_Long num_shorts, num_longs, num_shorts_checked;
129 if ( (
FT_ULong)num_longs > table_len / 4 )
130 num_longs = (
FT_Long)( table_len / 4 );
148 if ( (
FT_ULong)num_longs > table_len / 4 )
149 num_longs = (
FT_Long)( table_len / 4 );
160 num_shorts_checked = ( table_len - num_longs * 4L ) / 2;
162 if ( num_shorts < 0 )
165 " %cmtx has more metrics than glyphs.\n",
166 vertical ?
'v' :
'h' ));
170 error = vertical ?
FT_THROW( Invalid_Vert_Metrics )
171 :
FT_THROW( Invalid_Horiz_Metrics );
192 for ( ; cur <
limit; cur++ )
203 FT_MIN( num_shorts, num_shorts_checked );
206 for ( ; cur <
limit; cur++ )
212 if ( num_shorts > num_shorts_checked && num_shorts_checked > 0 )
217 limit = *shorts + num_shorts;
218 for ( ; cur <
limit; cur++ )
266 #define FT_STRUCTURE TT_HoriHeader 346 #ifndef FT_CONFIG_OPTION_OLD_INTERNALS 358 FT_ULong table_pos, table_size, table_end;
378 table_end = table_pos + table_size;
386 table_pos += 4 * gindex;
387 if ( table_pos + 4 > table_end )
397 table_pos += 4 * ( k - 1 );
398 if ( table_pos + 4 > table_end )
405 table_pos += 4 + 2 * ( gindex - k );
406 if ( table_pos + 2 > table_end )
446 *abearing = *aadvance = 0;
tt_face_load_hhea(TT_Face face, FT_Stream stream, FT_Bool vertical)
GLfloat GLfloat GLfloat GLfloat h
return FT_THROW(Missing_Property)
tt_face_get_metrics(TT_Face face, FT_Bool vertical, FT_UInt gindex, FT_Short *abearing, FT_UShort *aadvance)
#define FT_QNEW_ARRAY(ptr, count)
#define FT_READ_USHORT(var)
FT_ULong horz_metrics_size
TT_Loader_GotoTableFunc goto_table
FT_ULong vert_metrics_offset
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLenum GLuint GLint GLenum face
#define FT_STREAM_READ_FIELDS(fields, object)
#define FT_FRAME_USHORT(f)
TT_MaxProfile max_profile
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
#define FT_STREAM_SEEK(position)
#define FT_NEXT_USHORT(buffer)
#define FT_TRACE3(varformat)
#define FT_FRAME_ULONG(f)
FT_ULong horz_metrics_offset
FT_ULong vert_metrics_size
tt_face_load_hmtx(TT_Face face, FT_Stream stream, FT_Bool vertical)
#define FT_FRAME_ENTER(size)
FT_TRACE0(("cff_property_set: missing property `%s'\, property_name))
#define FT_NEXT_SHORT(buffer)
#define FT_READ_SHORT(var)
#define FT_FRAME_SHORT(f)
#define FT_FRAME_START(size)
struct TT_LongMetricsRec_ * TT_LongMetrics