23#include FT_INTERNAL_MEMORY_H
24#include FT_INTERNAL_OBJECTS_H
25#include FT_INTERNAL_DEBUG_H
31#define FT_COMPONENT trace_cache
49#define FTC_CMAP_INDICES_MAX 128
52#define FTC_CMAP_HASH( faceid, index, charcode ) \
53 ( FTC_FACE_ID_HASH( faceid ) + 211 * (index) + \
54 ( (charcode) / FTC_CMAP_INDICES_MAX ) )
65#define FTC_CMAP_QUERY( x ) ((FTC_CMapQuery)(x))
78#define FTC_CMAP_NODE( x ) ( (FTC_CMapNode)( x ) )
82#define FTC_CMAP_UNKNOWN (FT_UInt16)~0
144 return sizeof ( *cnode );
161 *list_changed =
FALSE;
187 *list_changed =
FALSE;
234 FT_UInt32 char_code )
242 FT_Int no_cmap_change = 0;
245 if ( cmap_index < 0 )
258 FT_TRACE0((
"FTC_CMapCache_Lookup: bad arguments, returning 0\n" ));
262 query.face_id = face_id;
264 query.char_code = char_code;
306 cmap =
face->charmaps[cmap_index];
308 if ( old != cmap && !no_cmap_change )
313 if ( old != cmap && !no_cmap_change )
FT_Get_Char_Index(FT_Face face, FT_ULong charcode)
FT_Set_Charmap(FT_Face face, FT_CharMap charmap)
FT_BEGIN_HEADER typedef FT_Pointer FTC_FaceID
FTC_Manager_LookupFace(FTC_Manager manager, FTC_FaceID face_id, FT_Face *aface)
struct FTC_CMapCacheRec_ * FTC_CMapCache
ftc_cache_init(FTC_Cache cache)
ftc_cache_done(FTC_Cache cache)
struct FTC_CacheRec_ FTC_CacheRec
#define FTC_CACHE_LOOKUP_CMP(cache, nodecmp, hash, query, node, error)
FTC_CMapCache_Lookup(FTC_CMapCache cmap_cache, FTC_FaceID face_id, FT_Int cmap_index, FT_UInt32 char_code)
struct FTC_CMapQueryRec_ * FTC_CMapQuery
static const FTC_CacheClassRec ftc_cmap_cache_class
struct FTC_CMapNodeRec_ * FTC_CMapNode
ftc_cmap_node_free(FTC_Node ftcnode, FTC_Cache cache)
ftc_cmap_node_remove_faceid(FTC_Node ftcnode, FT_Pointer ftcface_id, FTC_Cache cache, FT_Bool *list_changed)
ftc_cmap_node_compare(FTC_Node ftcnode, FT_Pointer ftcquery, FTC_Cache cache, FT_Bool *list_changed)
ftc_cmap_node_new(FTC_Node *ftcanode, FT_Pointer ftcquery, FTC_Cache cache)
struct FTC_CMapNodeRec_ FTC_CMapNodeRec
#define FTC_CMAP_INDICES_MAX
struct FTC_CMapQueryRec_ FTC_CMapQueryRec
FTC_CMapCache_New(FTC_Manager manager, FTC_CMapCache *acache)
#define FTC_CMAP_HASH(faceid, index, charcode)
ftc_cmap_node_weight(FTC_Node cnode, FTC_Cache cache)
FTC_Manager_RegisterCache(FTC_Manager manager, FTC_CacheClass clazz, FTC_Cache *acache)
#define FT_CALLBACK_DEF(x)
#define FT_ASSERT(condition)
#define FT_TRACE0(varformat)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
FT_BEGIN_HEADER typedef unsigned char FT_Bool
GLuint GLuint GLsizei GLenum const GLvoid * indices
GLenum GLuint GLint GLenum face
static char memory[1024 *256]