20 #include FT_INTERNAL_OBJECTS_H 21 #include FT_INTERNAL_DEBUG_H 30 #define FT_COMPONENT trace_cache 33 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS 39 typedef struct FTC_OldFontRec_
45 } FTC_OldFontRec, *FTC_OldFont;
48 typedef struct FTC_OldImageDescRec_
53 } FTC_OldImageDescRec, *FTC_OldImageDesc;
75 typedef struct FTC_BasicAttrRec_
82 #define FTC_BASIC_ATTR_COMPARE( a, b ) \ 83 FT_BOOL( FTC_SCALER_COMPARE( &(a)->scaler, &(b)->scaler ) && \ 84 (a)->load_flags == (b)->load_flags ) 86 #define FTC_BASIC_ATTR_HASH( a ) \ 87 ( FTC_SCALER_HASH( &(a)->scaler ) + 31*(a)->load_flags ) 90 typedef struct FTC_BasicQueryRec_
98 typedef struct FTC_BasicFamilyRec_
129 family->attrs =
query->attrs;
147 if (
error || !face )
152 FT_TRACE1((
"ftc_basic_family_get_count: too large number of glyphs " ));
214 if ( face->
glyph->
format == FT_GLYPH_FORMAT_BITMAP ||
251 *list_changed =
FALSE;
339 #if defined( FT_CONFIG_OPTION_OLD_INTERNALS ) && ( FT_INT_MAX > 0xFFFFU ) 347 FTC_OldImageDesc desc = (FTC_OldImageDesc)
type;
350 query.attrs.scaler.face_id = desc->font.face_id;
351 query.attrs.scaler.width = desc->font.pix_width;
352 query.attrs.scaler.height = desc->font.pix_height;
353 query.attrs.load_flags = desc->flags;
362 FT_TRACE1((
"FTC_ImageCache_Lookup: higher bits in load_flags" ));
366 query.attrs.scaler.face_id =
type->face_id;
368 query.attrs.scaler.height =
type->height;
372 query.attrs.scaler.pixel = 1;
373 query.attrs.scaler.x_res = 0;
374 query.attrs.scaler.y_res = 0;
425 if ( !aglyph || !scaler )
438 FT_TRACE1((
"FTC_ImageCache_LookupScaler: higher bits in load_flags" ));
442 query.attrs.scaler = scaler[0];
471 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS 474 typedef struct FTC_OldImage_Desc_
482 #define FTC_OLD_IMAGE_FORMAT( x ) ( (x) & 7 ) 485 #define ftc_old_image_format_bitmap 0x0000 486 #define ftc_old_image_format_outline 0x0001 488 #define ftc_old_image_format_mask 0x000F 490 #define ftc_old_image_flag_monochrome 0x0010 491 #define ftc_old_image_flag_unhinted 0x0020 492 #define ftc_old_image_flag_autohinted 0x0040 493 #define ftc_old_image_flag_unscaled 0x0080 494 #define ftc_old_image_flag_no_sbits 0x0100 497 #define ftc_old_image_mono ftc_old_image_format_bitmap | \ 498 ftc_old_image_flag_monochrome 501 #define ftc_old_image_grays ftc_old_image_format_bitmap 504 #define ftc_old_image_outline ftc_old_image_format_outline 509 FTC_OldImage_Desc* desc )
511 typ->
face_id = desc->font.face_id;
512 typ->
width = desc->font.pix_width;
513 typ->
height = desc->font.pix_height;
524 if ( FTC_OLD_IMAGE_FORMAT( type ) == ftc_old_image_format_bitmap )
526 if ( type & ftc_old_image_flag_monochrome )
530 if ( type & ftc_old_image_flag_no_sbits )
538 if ( type & ftc_old_image_flag_unscaled )
545 if ( type & ftc_old_image_flag_unhinted )
548 if ( type & ftc_old_image_flag_autohinted )
551 typ->
flags = load_flags;
562 FTC_OldImage_Desc* desc,
578 FTC_OldImage_Desc* desc,
586 return FT_THROW( Invalid_Argument );
588 ftc_image_type_from_old_desc( &type0, desc );
671 return FT_THROW( Invalid_Argument );
675 #if defined( FT_CONFIG_OPTION_OLD_INTERNALS ) && ( FT_INT_MAX > 0xFFFFU ) 682 FTC_OldImageDesc desc = (FTC_OldImageDesc)
type;
685 query.attrs.scaler.face_id = desc->font.face_id;
686 query.attrs.scaler.width = desc->font.pix_width;
687 query.attrs.scaler.height = desc->font.pix_height;
688 query.attrs.load_flags = desc->flags;
697 FT_TRACE1((
"FTC_ImageCache_Lookup: higher bits in load_flags" ));
701 query.attrs.scaler.face_id =
type->face_id;
703 query.attrs.scaler.height =
type->height;
707 query.attrs.scaler.pixel = 1;
708 query.attrs.scaler.x_res = 0;
709 query.attrs.scaler.y_res = 0;
767 if ( !ansbit || !scaler )
768 return FT_THROW( Invalid_Argument );
775 FT_TRACE1((
"FTC_ImageCache_LookupScaler: higher bits in load_flags" ));
779 query.attrs.scaler = scaler[0];
810 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS 818 FTC_OldImage_Desc* desc,
833 FTC_OldImage_Desc* desc,
841 return FT_THROW( Invalid_Argument );
843 ftc_image_type_from_old_desc( &type0, desc );
struct FTC_BasicAttrRec_ FTC_BasicAttrRec
ftc_gnode_compare(FTC_Node gnode, FT_Pointer gquery, FTC_Cache cache, FT_Bool *list_changed)
struct FTC_BasicAttrRec_ * FTC_BasicAttrs
struct FTC_BasicQueryRec_ FTC_BasicQueryRec
FTC_ImageCache_Lookup(FTC_ImageCache cache, FTC_ImageType type, FT_UInt gindex, FT_Glyph *aglyph, FTC_Node *anode)
FT_CALLBACK_TABLE_DEF const FTC_GCacheClassRec ftc_basic_sbit_cache_class
FTC_GNode_UnselectFamily(FTC_GNode gnode, FTC_Cache cache)
FT_CALLBACK_TABLE_DEF const FTC_GCacheClassRec ftc_basic_image_cache_class
#define FTC_SBIT_ITEMS_PER_NODE
struct FTC_GCacheRec_ FTC_GCacheRec
ftc_snode_weight(FTC_Node snode, FTC_Cache cache)
FT_CALLBACK_TABLE_DEF const FTC_IFamilyClassRec ftc_basic_image_family_class
ftc_snode_compare(FTC_Node snode, FT_Pointer gquery, FTC_Cache cache, FT_Bool *list_changed)
ftc_inode_free(FTC_Node inode, FTC_Cache cache)
#define FT_LOAD_NO_HINTING
return FT_THROW(Missing_Property)
typedefFT_BEGIN_HEADER struct FTC_MruNodeRec_ * FTC_MruNode
FTC_SBitCache_New(FTC_Manager manager, FTC_SBitCache *acache)
struct FTC_BasicFamilyRec_ * FTC_BasicFamily
FT_BEGIN_HEADER typedef FT_Pointer FTC_FaceID
FT_BEGIN_HEADER typedef unsigned char FT_Bool
ftc_basic_family_get_count(FTC_Family ftcfamily, FTC_Manager manager)
#define FT_TRACE1(varformat)
GLenum GLuint GLint GLenum face
ftc_basic_family_load_bitmap(FTC_Family ftcfamily, FT_UInt gindex, FTC_Manager manager, FT_Face *aface)
ftc_snode_new(FTC_Node *psnode, FT_Pointer gquery, FTC_Cache cache)
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
FT_BEGIN_HEADER struct FTC_FamilyRec_ FTC_FamilyRec
FTC_Family_Init(FTC_Family family, FTC_Cache cache)
struct FTC_ImageCacheRec_ * FTC_ImageCache
ftc_inode_weight(FTC_Node inode, FTC_Cache cache)
ftc_basic_family_compare(FTC_MruNode ftcfamily, FT_Pointer ftcquery)
ftc_basic_gnode_compare_faceid(FTC_Node ftcgnode, FT_Pointer ftcface_id, FTC_Cache cache, FT_Bool *list_changed)
#define FT_LOAD_FORCE_AUTOHINT
struct FTC_GNodeRec_ * FTC_GNode
FTC_SBitCache_Lookup(FTC_SBitCache cache, FTC_ImageType type, FT_UInt gindex, FTC_SBit *ansbit, FTC_Node *anode)
ftc_inode_new(FTC_Node *pinode, FT_Pointer gquery, FTC_Cache cache)
#define FT_CALLBACK_DEF(x)
struct FTC_CacheRec_ * FTC_Cache
FTC_ImageCache_New(FTC_Manager manager, FTC_ImageCache *acache)
ftc_gcache_done(FTC_Cache cache)
#define FT_LOAD_MONOCHROME
struct FTC_BasicFamilyRec_ FTC_BasicFamilyRec
FT_Get_Glyph(FT_GlyphSlot slot, FT_Glyph *aglyph)
FT_BEGIN_HEADER struct FTC_FamilyRec_ * FTC_Family
if(!abbox) return FT_THROW(Invalid_Argument)
#define FT_CALLBACK_TABLE_DEF
FTC_SNode_Compare(FTC_SNode snode, FTC_GQuery gquery, FTC_Cache cache, FT_Bool *list_changed)
FTC_GNode_Compare(FTC_GNode gnode, FTC_GQuery gquery, FTC_Cache cache, FT_Bool *list_changed)
#define FTC_BASIC_ATTR_COMPARE(a, b)
#define FTC_GCACHE_LOOKUP_CMP(cache, famcmp, nodecmp, hash, gindex, query, node, error)
ftc_basic_family_init(FTC_MruNode ftcfamily, FT_Pointer ftcquery, FT_Pointer ftccache)
ftc_snode_free(FTC_Node snode, FTC_Cache cache)
ftc_gcache_init(FTC_Cache cache)
ftc_basic_family_load_glyph(FTC_Family ftcfamily, FT_UInt gindex, FTC_Cache cache, FT_Glyph *aglyph)
FTC_Manager_LookupSize(FTC_Manager manager, FTC_Scaler scaler, FT_Size *asize)
FTC_ImageCache_LookupScaler(FTC_ImageCache cache, FTC_Scaler scaler, FT_ULong load_flags, FT_UInt gindex, FT_Glyph *aglyph, FTC_Node *anode)
struct FTC_MruListClassRec_ const * FTC_MruListClass
#define FT_LOAD_NO_BITMAP
FTC_SBitCache_LookupScaler(FTC_SBitCache cache, FTC_Scaler scaler, FT_ULong load_flags, FT_UInt gindex, FTC_SBit *ansbit, FTC_Node *anode)
struct FTC_BasicQueryRec_ * FTC_BasicQuery
FTC_GCache_New(FTC_Manager manager, FTC_GCacheClass clazz, FTC_GCache *acache)
struct FTC_SBitCacheRec_ * FTC_SBitCache
#define FTC_BASIC_ATTR_HASH(a)
FT_Module_Constructor FT_GLYPH_FORMAT_OUTLINE
FT_CALLBACK_TABLE_DEF const FTC_SFamilyClassRec ftc_basic_sbit_family_class
FTC_Manager_LookupFace(FTC_Manager manager, FTC_FaceID face_id, FT_Face *aface)