30 #include FT_INTERNAL_DEBUG_H
31 #include FT_INTERNAL_STREAM_H
32 #include FT_INTERNAL_OBJECTS_H
38 #include FT_TRUETYPE_IDS_H
48 #define FT_COMPONENT trace_pcfread
50 #include FT_SERVICE_BDF_H
51 #include FT_SERVICE_XFREE86_NAME_H
61 #define FT_COMPONENT trace_pcfdriver
64 typedef struct PCF_CMapRec_
96 cmap->encodings =
NULL;
97 cmap->num_encodings = 0;
112 max = cmap->num_encodings;
119 mid = ( min +
max ) >> 1;
120 code = encodings[mid].
enc;
122 if ( charcode == code )
124 result = encodings[mid].
glyph + 1;
128 if ( charcode < code )
140 FT_UInt32 *acharcode )
150 max = cmap->num_encodings;
157 mid = ( min +
max ) >> 1;
158 code = encodings[mid].
enc;
160 if ( charcode == code )
162 result = encodings[mid].
glyph + 1;
166 if ( charcode < code )
173 if ( min < cmap->num_encodings )
175 charcode = encodings[
min].
enc;
180 if ( charcode > 0xFFFFFFFFUL )
182 FT_TRACE1((
"pcf_cmap_char_next: charcode 0x%x > 32bit API" ));
187 *acharcode = (FT_UInt32)charcode;
228 for ( i = 0; i < face->
nprops; i++ )
244 FT_FREE( pcfface->family_name );
245 FT_FREE( pcfface->style_name );
246 FT_FREE( pcfface->available_sizes );
281 #if defined( FT_CONFIG_OPTION_USE_ZLIB ) || \
282 defined( FT_CONFIG_OPTION_USE_LZW ) || \
283 defined( FT_CONFIG_OPTION_USE_BZIP2 )
285 #ifdef FT_CONFIG_OPTION_USE_ZLIB
299 #ifdef FT_CONFIG_OPTION_USE_LZW
307 if (
FT_ERROR_BASE( error3 ) == FT_Err_Unimplemented_Feature )
314 #ifdef FT_CONFIG_OPTION_USE_BZIP2
322 if (
FT_ERROR_BASE( error4 ) == FT_Err_Unimplemented_Feature )
335 stream = pcfface->stream;
357 if ( charset_registry && charset_encoding )
359 char*
s = charset_registry;
364 if ( ( s[0] ==
'i' || s[0] ==
'I' ) &&
365 ( s[1] ==
's' || s[1] ==
'S' ) &&
366 ( s[2] ==
'o' || s[2] ==
'O' ) )
381 charmap.
encoding = FT_ENCODING_NONE;
386 if ( unicode_charmap )
388 charmap.
encoding = FT_ENCODING_UNICODE;
397 if ( pcfface->num_charmaps )
398 pcfface->charmap = pcfface->charmaps[0];
409 error = PCF_Err_Unknown_File_Format;
423 size->metrics.ascender = accel->
fontAscent << 6;
424 size->metrics.descender = -accel->
fontDescent << 6;
447 if (
height == ( ( bsize->y_ppem + 32 ) >> 6 ) )
458 error = PCF_Err_Unimplemented_Feature;
473 FT_Int32 load_flags )
485 FT_TRACE4((
"load_glyph %d ---", glyph_index ));
489 error = PCF_Err_Invalid_Argument;
495 if ( glyph_index > 0 )
498 metric = face->
metrics + glyph_index;
505 FT_TRACE6((
"BIT_ORDER %d ; BYTE_ORDER %d ; GLYPH_PAD %d\n",
517 bitmap->
pitch = ( ( bitmap->
width + 15 ) >> 4 ) << 1;
521 bitmap->
pitch = ( ( bitmap->
width + 31 ) >> 5 ) << 2;
525 bitmap->
pitch = ( ( bitmap->
width + 63 ) >> 6 ) << 3;
529 return PCF_Err_Invalid_File_Format;
564 slot->format = FT_GLYPH_FORMAT_BITMAP;
566 slot->bitmap_top = metric->
ascent;
570 slot->metrics.horiBearingY = metric->
ascent << 6;
573 slot->metrics.height = bitmap->
rows << 6;
594 const char* prop_name,
610 if ( prop->
value.
l > 0x7FFFFFFFL || prop->
value.
l < ( -1 - 0x7FFFFFFFL ) )
613 FT_TRACE1((
"too large integer 0x%x is truncated\n" ));
625 return PCF_Err_Invalid_Argument;
631 const char* *acharset_encoding,
632 const char* *acharset_registry )
702 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
703 ft_stub_set_char_sizes,
704 ft_stub_set_pixel_sizes,
ft_service_list_lookup(FT_ServiceDesc service_descriptors, const char *service_id)
FT_BEGIN_HEADER FT_Stream_OpenLZW(FT_Stream stream, FT_Stream source)
FourByteSwap(unsigned char *buf, size_t nbytes)
FT_Short rightSideBearing
struct PCF_FaceRec_ * PCF_Face
ft_synthesize_vertical_metrics(FT_Glyph_Metrics *metrics, FT_Pos advance)
PCF_Glyph_Load(FT_GlyphSlot slot, FT_Size size, FT_UInt glyph_index, FT_Int32 load_flags)
FT_Select_Metrics(FT_Face face, FT_ULong strike_index)
PCF_Size_Request(FT_Size size, FT_Size_Request req)
struct PCF_CMapRec_ PCF_CMapRec
#define FT_REQUEST_HEIGHT(req)
PCF_Face_Init(FT_Stream stream, FT_Face pcfface, FT_Int face_index, FT_Int num_params, FT_Parameter *params)
static const FT_ServiceDescRec pcf_services[]
pcf_find_property(PCF_Face face, const FT_String *prop)
union BDF_PropertyRec_::@18 u
EGLSurface EGLint EGLint EGLint EGLint height
struct FT_SizeRec_ FT_SizeRec
TwoByteSwap(unsigned char *buf, size_t nbytes)
EGLImageKHR EGLint * name
FT_Stream_Close(FT_Stream stream)
#define FT_SERVICE_ID_BDF
#define TT_PLATFORM_MICROSOFT
#define FT_XF86_FORMAT_PCF
FT_BEGIN_HEADER typedef unsigned char FT_Bool
#define FT_TRACE1(varformat)
union PCF_PropertyRec_::@37 value
#define FT_TRACE4(varformat)
pcf_cmap_char_next(FT_CMap pcfcmap, FT_UInt32 *acharcode)
static struct @83 encodings[]
FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec pcf_cmap_class
#define PCF_BYTE_ORDER(f)
pcf_driver_requester(FT_Module module, const char *name)
ft_glyphslot_alloc_bitmap(FT_GlyphSlot slot, FT_ULong size)
#define FT_SERVICE_ID_XF86_NAME
FT_Pointer FT_Module_Interface
FT_CALLBACK_TABLE_DEF const FT_Driver_ClassRec pcf_driver_class
#define FT_TRACE2(varformat)
FT_Error(* FT_BDF_GetPropertyFunc)(FT_Face face, const char *prop_name, BDF_PropertyRec *aproperty)
static FT_Error pcf_get_bdf_property(PCF_Face face, const char *prop_name, BDF_PropertyRec *aproperty)
pcf_cmap_init(FT_CMap pcfcmap, FT_Pointer init_data)
#define FT_CALLBACK_DEF(x)
PCF_Face_Done(FT_Face pcfface)
#define FT_MODULE_FONT_DRIVER
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
struct PCF_CMapRec_ * PCF_CMap
pcf_cmap_done(FT_CMap pcfcmap)
#define FT_STREAM_SEEK(position)
#define FT_FACE_MEMORY(x)
FT_CMap_New(FT_CMap_Class clazz, FT_Pointer init_data, FT_CharMap charmap, FT_CMap *acmap)
#define FT_TRACE6(varformat)
BitOrderInvert(unsigned char *buf, size_t nbytes)
pcf_load_font(FT_Stream, PCF_Face)
static FT_Error pcf_get_charset_id(PCF_Face face, const char **acharset_encoding, const char **acharset_registry)
static const FT_Service_BDFRec pcf_service_bdf
#define TT_PLATFORM_APPLE_UNICODE
GLsizei GLfixed GLfixed GLfixed GLfixed const GLubyte * bitmap
#define TT_MS_ID_UNICODE_CS
#define FT_MODULE_DRIVER_NO_OUTLINES
FT_BEGIN_HEADER FT_Stream_OpenBzip2(FT_Stream stream, FT_Stream source)
PCF_Size_Select(FT_Size size, FT_ULong strike_index)
struct FT_DriverRec_ FT_DriverRec
#define FT_STREAM_READ(buffer, count)
pcf_cmap_char_index(FT_CMap pcfcmap, FT_UInt32 charcode)
FT_Error(* FT_BDF_GetCharsetIdFunc)(FT_Face face, const char **acharset_encoding, const char **acharset_registry)
#define TT_APPLE_ID_DEFAULT
#define FT_CALLBACK_TABLE_DEF