20 #include FT_INTERNAL_DEBUG_H 21 #include FT_INTERNAL_STREAM_H 22 #include FT_TRUETYPE_TAGS_H 28 #ifdef TT_CONFIG_OPTION_BDF 37 #define FT_COMPONENT trace_ttbdf 43 TT_BDF bdf = &face->bdf;
51 if ( bdf->table !=
NULL )
54 bdf->table_end =
NULL;
56 bdf->strings_size = 0;
62 tt_face_load_bdf_props(
TT_Face face,
65 TT_BDF bdf = &face->bdf;
81 bdf->table_end = bdf->table +
length;
92 if ( version != 0x0001 ||
94 ( strings - 8 ) / 4 < num_strikes ||
95 strings + 1 > length )
100 bdf->num_strikes = num_strikes;
101 bdf->strings = bdf->table +
strings;
102 bdf->strings_size = length -
strings;
104 count = bdf->num_strikes;
106 strike = p + count * 4;
109 for ( ; count > 0; count-- )
117 strike += 10 * num_items;
122 if ( strike > bdf->strings )
144 TT_BDF bdf = &face->bdf;
155 if ( bdf->loaded == 0 )
157 error = tt_face_load_bdf_props( face,
FT_FACE( face )->stream );
162 count = bdf->num_strikes;
164 strike = p + 4 *
count;
166 error =
FT_ERR( Invalid_Argument );
168 if ( size ==
NULL || property_name ==
NULL )
171 property_len =
ft_strlen( property_name );
172 if ( property_len == 0 )
175 for ( ; count > 0; count-- )
186 strike += 10 * _count;
192 for ( ; count > 0; count-- )
196 if ( ( type & 0x10 ) != 0 )
202 if ( name_offset < bdf->strings_size &&
203 property_len < bdf->strings_size - name_offset &&
205 (
const char*)bdf->strings + name_offset,
206 bdf->strings_size - name_offset ) == 0 )
208 switch ( type & 0x0F )
214 ft_memchr( bdf->strings + value, 0, bdf->strings_size ) )
217 aprop->
u.
atom = (
const char*)bdf->strings + value;
GLenum GLuint GLenum GLsizei length
FT_BEGIN_HEADER tt_face_free_bdf_props(TT_Face face)
GLsizei const GLchar *const * strings
return FT_THROW(Missing_Property)
GLenum GLuint GLint GLenum face
#define FT_PEEK_USHORT(p)
GLsizei const GLfloat * value
#define FT_NEXT_USHORT(buffer)
#define FT_FRAME_RELEASE(bytes)
#define FT_NEXT_ULONG(buffer)
#define FT_FRAME_EXTRACT(size, bytes)
GLuint GLuint GLsizei count
const char * property_name
tt_face_goto_table(TT_Face face, FT_ULong tag, FT_Stream stream, FT_ULong *length)
tt_face_find_bdf_prop(TT_Face face, const char *property_name, BDF_PropertyRec *aprop)
union BDF_PropertyRec_::@0 u