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;
120 code = encodings[mid].
enc;
122 if ( charcode == code )
128 if ( charcode < code )
150 max = cmap->num_encodings;
158 code = encodings[mid].
enc;
160 if ( charcode == code )
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" ));
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 292 if (
FT_ERR_EQ( error2, Unimplemented_Feature ) )
299 #ifdef FT_CONFIG_OPTION_USE_LZW 307 if (
FT_ERR_EQ( error3, Unimplemented_Feature ) )
314 #ifdef FT_CONFIG_OPTION_USE_BZIP2 322 if (
FT_ERR_EQ( error4, Unimplemented_Feature ) )
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];
447 if (
height == ( ( bsize->y_ppem + 32 ) >> 6 ) )
485 FT_TRACE4((
"load_glyph %d ---", glyph_index ));
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 FT_THROW( 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;
593 pcf_get_bdf_property(
PCF_Face face,
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 FT_THROW( Invalid_Argument );
631 const char* *acharset_encoding,
632 const char* *acharset_registry )
641 static const FT_Service_BDFRec pcf_service_bdf =
702 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS 703 ft_stub_set_char_sizes,
704 ft_stub_set_pixel_sizes,
GLint GLint GLsizei GLsizei height
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)
return FT_THROW(Missing_Property)
pcf_find_property(PCF_Face face, const FT_String *prop)
union PCF_PropertyRec_::@27 value
FT_Error(* FT_BDF_GetCharsetIdFunc)(FT_Face face, const char **acharset_encoding, const char **acharset_registry)
struct FT_SizeRec_ FT_SizeRec
TwoByteSwap(unsigned char *buf, size_t nbytes)
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)
GLenum GLuint GLint GLenum face
#define FT_TRACE4(varformat)
FT_BEGIN_HEADER FT_Stream_OpenGzip(FT_Stream stream, FT_Stream source)
pcf_cmap_char_next(FT_CMap pcfcmap, FT_UInt32 *acharcode)
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
float min(float a, float b)
FT_Pointer FT_Module_Interface
FT_CALLBACK_TABLE_DEF const FT_Driver_ClassRec pcf_driver_class
#define FT_TRACE2(varformat)
#define FT_CALLBACK_DEF(x)
pcf_cmap_init(FT_CMap pcfcmap, FT_Pointer init_data)
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)
FT_Error(* FT_BDF_GetPropertyFunc)(FT_Face face, const char *prop_name, BDF_PropertyRec *aproperty)
GLuint const GLchar * name
#define FT_CALLBACK_TABLE_DEF
#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)
GLenum const GLfloat * params
BitOrderInvert(unsigned char *buf, size_t nbytes)
pcf_load_font(FT_Stream, PCF_Face)
#define TT_PLATFORM_APPLE_UNICODE
#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)
#define TT_APPLE_ID_DEFAULT
union BDF_PropertyRec_::@0 u