21 #include FT_INTERNAL_DEBUG_H
22 #include FT_INTERNAL_STREAM_H
23 #include FT_TRUETYPE_TAGS_H
36 #define FT_COMPONENT trace_ttkern
40 #define TT_KERN_INDEX( g1, g2 ) ( ( (FT_ULong)(g1) << 16 ) | (g2) )
52 FT_UInt32 avail = 0, ordered = 0;
56 error = face->goto_table( face,
TTAG_kern, stream, &table_size );
63 " kerning table is too small - ignored\n" ));
64 error = SFNT_Err_Table_Missing;
71 " could not extract kerning table\n" ));
75 face->kern_table_size = table_size;
78 p_limit = p + table_size;
83 if ( num_tables > 32 )
86 for ( nn = 0; nn < num_tables; nn++ )
90 FT_UInt32
mask = (FT_UInt32)1UL << nn;
93 if ( p + 6 > p_limit )
107 if ( p_next > p_limit )
111 if ( ( coverage & ~8 ) != 0x0001 ||
118 if ( ( p_next - p ) < 6 * (
int)num_pairs )
119 num_pairs = (
FT_UInt)( ( p_next - p ) / 6 );
136 for ( count = num_pairs - 1; count > 0; count-- )
142 if ( cur_pair <= old_pair )
157 face->num_kern_tables = nn;
158 face->kern_avail_bits = avail;
159 face->kern_order_bits = ordered;
173 face->kern_table_size = 0;
174 face->num_kern_tables = 0;
175 face->kern_avail_bits = 0;
176 face->kern_order_bits = 0;
188 FT_Byte* p_limit = p + face->kern_table_size;
194 for ( count = face->num_kern_tables;
195 count > 0 && p + 6 <= p_limit;
196 count--, mask <<= 1 )
211 if ( next > p_limit )
214 if ( ( face->kern_avail_bits & mask ) == 0 )
223 if ( ( next - p ) < 6 * (
int)num_pairs )
224 num_pairs = (
FT_UInt)( ( next - p ) / 6 );
226 switch ( coverage >> 8 )
233 if ( face->kern_order_bits & mask )
264 for ( count2 = num_pairs; count2 > 0; count2-- )
tt_face_done_kern(TT_Face face)
tt_face_get_kerning(TT_Face face, FT_UInt left_glyph, FT_UInt right_glyph)
#define FT_ERROR(varformat)
#define FT_NEXT_USHORT(buffer)
tt_face_load_kern(TT_Face face, FT_Stream stream)
#define FT_FRAME_RELEASE(bytes)
EGLSurface EGLint void ** value
GLdouble GLdouble GLdouble GLdouble q
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
#define FT_NEXT_ULONG(buffer)
#define FT_FRAME_EXTRACT(size, bytes)
#define TT_KERN_INDEX(g1, g2)
GLuint64EXT GLuint GLuint GLenum GLenum GLuint GLuint key0