ftccmap.c File Reference

#include <ft2build.h>
#include "ftcmanag.h"
#include "ftccback.h"
#include "ftcerror.h"

Go to the source code of this file.

Classes

struct  FTC_CMapQueryRec_
struct  FTC_CMapNodeRec_

Defines

#define FT_COMPONENT   trace_cache
#define FTC_CMAP_INDICES_MAX   128
#define FTC_CMAP_HASH(faceid, index, charcode)
#define FTC_CMAP_QUERY(x)   ((FTC_CMapQuery)(x))
#define FTC_CMAP_QUERY_HASH(x)   FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->char_code )
#define FTC_CMAP_NODE(x)   ( (FTC_CMapNode)( x ) )
#define FTC_CMAP_NODE_HASH(x)   FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->first )
#define FTC_CMAP_UNKNOWN   ( (FT_UInt16)-1 )

Typedefs

typedef FTC_CMapQueryRec_ FTC_CMapQueryRec
typedef FTC_CMapQueryRec_FTC_CMapQuery
typedef FTC_CMapNodeRec_ FTC_CMapNodeRec
typedef FTC_CMapNodeRec_FTC_CMapNode

Functions

 ftc_cmap_node_free (FTC_Node ftcnode, FTC_Cache cache)
 ftc_cmap_node_new (FTC_Node *ftcanode, FT_Pointer ftcquery, FTC_Cache cache)
 ftc_cmap_node_weight (FTC_Node cnode, FTC_Cache cache)
 ftc_cmap_node_compare (FTC_Node ftcnode, FT_Pointer ftcquery, FTC_Cache cache)
 ftc_cmap_node_remove_faceid (FTC_Node ftcnode, FT_Pointer ftcface_id, FTC_Cache cache)
 FTC_CMapCache_New (FTC_Manager manager, FTC_CMapCache *acache)
 FTC_CMapCache_Lookup (FTC_CMapCache cmap_cache, FTC_FaceID face_id, FT_Int cmap_index, FT_UInt32 char_code)

Variables

FT_CALLBACK_TABLE_DEF const
FTC_CacheClassRec 
ftc_cmap_cache_class


Define Documentation

#define FT_COMPONENT   trace_cache

Definition at line 30 of file ftccmap.c.

#define FTC_CMAP_HASH ( faceid,
index,
charcode   ) 

Value:

( FTC_FACE_ID_HASH( faceid ) + 211 * (index) + \
            ( (charcode) / FTC_CMAP_INDICES_MAX )      )

Definition at line 88 of file ftccmap.c.

Referenced by FTC_CMapCache_Lookup().

#define FTC_CMAP_INDICES_MAX   128

Definition at line 85 of file ftccmap.c.

Referenced by ftc_cmap_node_compare(), ftc_cmap_node_new(), and FTC_CMapCache_Lookup().

#define FTC_CMAP_NODE ( x   )     ( (FTC_CMapNode)( x ) )

Definition at line 116 of file ftccmap.c.

Referenced by FTC_CMapCache_Lookup().

#define FTC_CMAP_NODE_HASH ( x   )     FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->first )

Definition at line 117 of file ftccmap.c.

#define FTC_CMAP_QUERY ( x   )     ((FTC_CMapQuery)(x))

Definition at line 101 of file ftccmap.c.

#define FTC_CMAP_QUERY_HASH ( x   )     FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->char_code )

Definition at line 102 of file ftccmap.c.

#define FTC_CMAP_UNKNOWN   ( (FT_UInt16)-1 )

Definition at line 122 of file ftccmap.c.

Referenced by ftc_cmap_node_new(), and FTC_CMapCache_Lookup().


Typedef Documentation

typedef struct FTC_CMapNodeRec_ * FTC_CMapNode

typedef struct FTC_CMapNodeRec_ FTC_CMapNodeRec

typedef struct FTC_CMapQueryRec_ * FTC_CMapQuery

typedef struct FTC_CMapQueryRec_ FTC_CMapQueryRec


Function Documentation

ftc_cmap_node_compare ( FTC_Node  ftcnode,
FT_Pointer  ftcquery,
FTC_Cache  cache 
)

Definition at line 190 of file ftccmap.c.

References FTC_CMapQueryRec_::char_code, FTC_CMapNodeRec_::cmap_index, FTC_CMapQueryRec_::cmap_index, FTC_CMapQueryRec_::face_id, FTC_CMapNodeRec_::face_id, FTC_CMapNodeRec_::first, FT_BOOL, FT_UNUSED, and FTC_CMAP_INDICES_MAX.

Referenced by FTC_CMapCache_Lookup().

ftc_cmap_node_free ( FTC_Node  ftcnode,
FTC_Cache  cache 
)

Definition at line 135 of file ftccmap.c.

References FT_FREE.

ftc_cmap_node_new ( FTC_Node ftcanode,
FT_Pointer  ftcquery,
FTC_Cache  cache 
)

Definition at line 148 of file ftccmap.c.

References FTC_CMapQueryRec_::char_code, FTC_CMapNodeRec_::cmap_index, FTC_CMapQueryRec_::cmap_index, error, FTC_CMapQueryRec_::face_id, FTC_CMapNodeRec_::face_id, FTC_CMapNodeRec_::first, FT_NEW, FTC_CMAP_INDICES_MAX, FTC_CMAP_UNKNOWN, and FTC_CMapNodeRec_::indices.

ftc_cmap_node_remove_faceid ( FTC_Node  ftcnode,
FT_Pointer  ftcface_id,
FTC_Cache  cache 
)

Definition at line 213 of file ftccmap.c.

References FTC_CMapNodeRec_::face_id, FT_BOOL, FT_UNUSED, and FTC_FaceID.

ftc_cmap_node_weight ( FTC_Node  cnode,
FTC_Cache  cache 
)

Definition at line 178 of file ftccmap.c.

References FT_UNUSED.

FTC_CMapCache_Lookup ( FTC_CMapCache  cmap_cache,
FTC_FaceID  face_id,
FT_Int  cmap_index,
FT_UInt32  char_code 
)

Definition at line 279 of file ftccmap.c.

References FTC_CMapQueryRec_::char_code, FTC_CMapQueryRec_::cmap_index, error, FTC_CMapQueryRec_::face_id, FT_ASSERT, FT_Get_Char_Index(), FT_Select_Charmap(), FT_Set_Charmap(), FT_TRACE0, FTC_CACHE, FTC_CACHE_LOOKUP_CMP, FTC_CMAP_HASH, FTC_CMAP_INDICES_MAX, FTC_CMAP_NODE, ftc_cmap_node_compare(), FTC_CMAP_UNKNOWN, FTC_Manager_LookupFace(), hash, and NULL.

FTC_CMapCache_New ( FTC_Manager  manager,
FTC_CMapCache acache 
)

Definition at line 252 of file ftccmap.c.

References FTC_CACHE_P, ftc_cmap_cache_class, and FTC_Manager_RegisterCache().


Variable Documentation

FT_CALLBACK_TABLE_DEF const FTC_CacheClassRec ftc_cmap_cache_class

Initial value:

Definition at line 235 of file ftccmap.c.

Referenced by FTC_CMapCache_New().


Generated on Tue Jul 5 15:58:22 2011 for ROOT_528-00b_version by  doxygen 1.5.1