nuclear@0: /***************************************************************************/ nuclear@0: /* */ nuclear@0: /* ftcache.h */ nuclear@0: /* */ nuclear@0: /* FreeType Cache subsystem (specification). */ nuclear@0: /* */ nuclear@0: /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by */ nuclear@0: /* David Turner, Robert Wilhelm, and Werner Lemberg. */ nuclear@0: /* */ nuclear@0: /* This file is part of the FreeType project, and may only be used, */ nuclear@0: /* modified, and distributed under the terms of the FreeType project */ nuclear@0: /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ nuclear@0: /* this file you indicate that you have read the license and */ nuclear@0: /* understand and accept it fully. */ nuclear@0: /* */ nuclear@0: /***************************************************************************/ nuclear@0: nuclear@0: nuclear@0: #ifndef __FTCACHE_H__ nuclear@0: #define __FTCACHE_H__ nuclear@0: nuclear@0: nuclear@0: #include nuclear@0: #include FT_GLYPH_H nuclear@0: nuclear@0: nuclear@0: FT_BEGIN_HEADER nuclear@0: nuclear@0: nuclear@0: /************************************************************************* nuclear@0: * nuclear@0: *
nuclear@0: * cache_subsystem nuclear@0: * nuclear@0: * nuclear@0: * Cache Sub-System nuclear@0: * nuclear@0: * <Abstract> nuclear@0: * How to cache face, size, and glyph data with FreeType~2. nuclear@0: * nuclear@0: * <Description> nuclear@0: * This section describes the FreeType~2 cache sub-system, which is used nuclear@0: * to limit the number of concurrently opened @FT_Face and @FT_Size nuclear@0: * objects, as well as caching information like character maps and glyph nuclear@0: * images while limiting their maximum memory usage. nuclear@0: * nuclear@0: * Note that all types and functions begin with the `FTC_' prefix. nuclear@0: * nuclear@0: * The cache is highly portable and thus doesn't know anything about the nuclear@0: * fonts installed on your system, or how to access them. This implies nuclear@0: * the following scheme: nuclear@0: * nuclear@0: * First, available or installed font faces are uniquely identified by nuclear@0: * @FTC_FaceID values, provided to the cache by the client. Note that nuclear@0: * the cache only stores and compares these values, and doesn't try to nuclear@0: * interpret them in any way. nuclear@0: * nuclear@0: * Second, the cache calls, only when needed, a client-provided function nuclear@0: * to convert an @FTC_FaceID into a new @FT_Face object. The latter is nuclear@0: * then completely managed by the cache, including its termination nuclear@0: * through @FT_Done_Face. To monitor termination of face objects, the nuclear@0: * finalizer callback in the `generic' field of the @FT_Face object can nuclear@0: * be used, which might also be used to store the @FTC_FaceID of the nuclear@0: * face. nuclear@0: * nuclear@0: * Clients are free to map face IDs to anything else. The most simple nuclear@0: * usage is to associate them to a (pathname,face_index) pair that is nuclear@0: * used to call @FT_New_Face. However, more complex schemes are also nuclear@0: * possible. nuclear@0: * nuclear@0: * Note that for the cache to work correctly, the face ID values must be nuclear@0: * *persistent*, which means that the contents they point to should not nuclear@0: * change at runtime, or that their value should not become invalid. nuclear@0: * nuclear@0: * If this is unavoidable (e.g., when a font is uninstalled at runtime), nuclear@0: * you should call @FTC_Manager_RemoveFaceID as soon as possible, to let nuclear@0: * the cache get rid of any references to the old @FTC_FaceID it may nuclear@0: * keep internally. Failure to do so will lead to incorrect behaviour nuclear@0: * or even crashes. nuclear@0: * nuclear@0: * To use the cache, start with calling @FTC_Manager_New to create a new nuclear@0: * @FTC_Manager object, which models a single cache instance. You can nuclear@0: * then look up @FT_Face and @FT_Size objects with nuclear@0: * @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively. nuclear@0: * nuclear@0: * If you want to use the charmap caching, call @FTC_CMapCache_New, then nuclear@0: * later use @FTC_CMapCache_Lookup to perform the equivalent of nuclear@0: * @FT_Get_Char_Index, only much faster. nuclear@0: * nuclear@0: * If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then nuclear@0: * later use @FTC_ImageCache_Lookup to retrieve the corresponding nuclear@0: * @FT_Glyph objects from the cache. nuclear@0: * nuclear@0: * If you need lots of small bitmaps, it is much more memory efficient nuclear@0: * to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This nuclear@0: * returns @FTC_SBitRec structures, which are used to store small nuclear@0: * bitmaps directly. (A small bitmap is one whose metrics and nuclear@0: * dimensions all fit into 8-bit integers). nuclear@0: * nuclear@0: * We hope to also provide a kerning cache in the near future. nuclear@0: * nuclear@0: * nuclear@0: * <Order> nuclear@0: * FTC_Manager nuclear@0: * FTC_FaceID nuclear@0: * FTC_Face_Requester nuclear@0: * nuclear@0: * FTC_Manager_New nuclear@0: * FTC_Manager_Reset nuclear@0: * FTC_Manager_Done nuclear@0: * FTC_Manager_LookupFace nuclear@0: * FTC_Manager_LookupSize nuclear@0: * FTC_Manager_RemoveFaceID nuclear@0: * nuclear@0: * FTC_Node nuclear@0: * FTC_Node_Unref nuclear@0: * nuclear@0: * FTC_ImageCache nuclear@0: * FTC_ImageCache_New nuclear@0: * FTC_ImageCache_Lookup nuclear@0: * nuclear@0: * FTC_SBit nuclear@0: * FTC_SBitCache nuclear@0: * FTC_SBitCache_New nuclear@0: * FTC_SBitCache_Lookup nuclear@0: * nuclear@0: * FTC_CMapCache nuclear@0: * FTC_CMapCache_New nuclear@0: * FTC_CMapCache_Lookup nuclear@0: * nuclear@0: *************************************************************************/ nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: /***** *****/ nuclear@0: /***** BASIC TYPE DEFINITIONS *****/ nuclear@0: /***** *****/ nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: nuclear@0: nuclear@0: /************************************************************************* nuclear@0: * nuclear@0: * @type: FTC_FaceID nuclear@0: * nuclear@0: * @description: nuclear@0: * An opaque pointer type that is used to identity face objects. The nuclear@0: * contents of such objects is application-dependent. nuclear@0: * nuclear@0: * These pointers are typically used to point to a user-defined nuclear@0: * structure containing a font file path, and face index. nuclear@0: * nuclear@0: * @note: nuclear@0: * Never use NULL as a valid @FTC_FaceID. nuclear@0: * nuclear@0: * Face IDs are passed by the client to the cache manager, which calls, nuclear@0: * when needed, the @FTC_Face_Requester to translate them into new nuclear@0: * @FT_Face objects. nuclear@0: * nuclear@0: * If the content of a given face ID changes at runtime, or if the value nuclear@0: * becomes invalid (e.g., when uninstalling a font), you should nuclear@0: * immediately call @FTC_Manager_RemoveFaceID before any other cache nuclear@0: * function. nuclear@0: * nuclear@0: * Failure to do so will result in incorrect behaviour or even nuclear@0: * memory leaks and crashes. nuclear@0: */ nuclear@0: typedef FT_Pointer FTC_FaceID; nuclear@0: nuclear@0: nuclear@0: /************************************************************************ nuclear@0: * nuclear@0: * @functype: nuclear@0: * FTC_Face_Requester nuclear@0: * nuclear@0: * @description: nuclear@0: * A callback function provided by client applications. It is used by nuclear@0: * the cache manager to translate a given @FTC_FaceID into a new valid nuclear@0: * @FT_Face object, on demand. nuclear@0: * nuclear@0: * <Input> nuclear@0: * face_id :: nuclear@0: * The face ID to resolve. nuclear@0: * nuclear@0: * library :: nuclear@0: * A handle to a FreeType library object. nuclear@0: * nuclear@0: * req_data :: nuclear@0: * Application-provided request data (see note below). nuclear@0: * nuclear@0: * <Output> nuclear@0: * aface :: nuclear@0: * A new @FT_Face handle. nuclear@0: * nuclear@0: * <Return> nuclear@0: * FreeType error code. 0~means success. nuclear@0: * nuclear@0: * <Note> nuclear@0: * The third parameter `req_data' is the same as the one passed by the nuclear@0: * client when @FTC_Manager_New is called. nuclear@0: * nuclear@0: * The face requester should not perform funny things on the returned nuclear@0: * face object, like creating a new @FT_Size for it, or setting a nuclear@0: * transformation through @FT_Set_Transform! nuclear@0: */ nuclear@0: typedef FT_Error nuclear@0: (*FTC_Face_Requester)( FTC_FaceID face_id, nuclear@0: FT_Library library, nuclear@0: FT_Pointer request_data, nuclear@0: FT_Face* aface ); nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: #ifdef FT_CONFIG_OPTION_OLD_INTERNALS nuclear@0: nuclear@0: /* these macros are incompatible with LLP64, should not be used */ nuclear@0: nuclear@0: #define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) ) nuclear@0: nuclear@0: #define FTC_FACE_ID_HASH( i ) \ nuclear@0: ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \ nuclear@0: ( FT_POINTER_TO_ULONG( i ) << 7 ) ) ) nuclear@0: nuclear@0: #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: /***** *****/ nuclear@0: /***** CACHE MANAGER OBJECT *****/ nuclear@0: /***** *****/ nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Type> */ nuclear@0: /* FTC_Manager */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* This object corresponds to one instance of the cache-subsystem. */ nuclear@0: /* It is used to cache one or more @FT_Face objects, along with */ nuclear@0: /* corresponding @FT_Size objects. */ nuclear@0: /* */ nuclear@0: /* The manager intentionally limits the total number of opened */ nuclear@0: /* @FT_Face and @FT_Size objects to control memory usage. See the */ nuclear@0: /* `max_faces' and `max_sizes' parameters of @FTC_Manager_New. */ nuclear@0: /* */ nuclear@0: /* The manager is also used to cache `nodes' of various types while */ nuclear@0: /* limiting their total memory usage. */ nuclear@0: /* */ nuclear@0: /* All limitations are enforced by keeping lists of managed objects */ nuclear@0: /* in most-recently-used order, and flushing old nodes to make room */ nuclear@0: /* for new ones. */ nuclear@0: /* */ nuclear@0: typedef struct FTC_ManagerRec_* FTC_Manager; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Type> */ nuclear@0: /* FTC_Node */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* An opaque handle to a cache node object. Each cache node is */ nuclear@0: /* reference-counted. A node with a count of~0 might be flushed */ nuclear@0: /* out of a full cache whenever a lookup request is performed. */ nuclear@0: /* */ nuclear@0: /* If you look up nodes, you have the ability to `acquire' them, */ nuclear@0: /* i.e., to increment their reference count. This will prevent the */ nuclear@0: /* node from being flushed out of the cache until you explicitly */ nuclear@0: /* `release' it (see @FTC_Node_Unref). */ nuclear@0: /* */ nuclear@0: /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */ nuclear@0: /* */ nuclear@0: typedef struct FTC_NodeRec_* FTC_Node; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_Manager_New */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Create a new cache manager. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* library :: The parent FreeType library handle to use. */ nuclear@0: /* */ nuclear@0: /* max_faces :: Maximum number of opened @FT_Face objects managed by */ nuclear@0: /* this cache instance. Use~0 for defaults. */ nuclear@0: /* */ nuclear@0: /* max_sizes :: Maximum number of opened @FT_Size objects managed by */ nuclear@0: /* this cache instance. Use~0 for defaults. */ nuclear@0: /* */ nuclear@0: /* max_bytes :: Maximum number of bytes to use for cached data nodes. */ nuclear@0: /* Use~0 for defaults. Note that this value does not */ nuclear@0: /* account for managed @FT_Face and @FT_Size objects. */ nuclear@0: /* */ nuclear@0: /* requester :: An application-provided callback used to translate */ nuclear@0: /* face IDs into real @FT_Face objects. */ nuclear@0: /* */ nuclear@0: /* req_data :: A generic pointer that is passed to the requester */ nuclear@0: /* each time it is called (see @FTC_Face_Requester). */ nuclear@0: /* */ nuclear@0: /* <Output> */ nuclear@0: /* amanager :: A handle to a new manager object. 0~in case of */ nuclear@0: /* failure. */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* FreeType error code. 0~means success. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_Manager_New( FT_Library library, nuclear@0: FT_UInt max_faces, nuclear@0: FT_UInt max_sizes, nuclear@0: FT_ULong max_bytes, nuclear@0: FTC_Face_Requester requester, nuclear@0: FT_Pointer req_data, nuclear@0: FTC_Manager *amanager ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_Manager_Reset */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Empty a given cache manager. This simply gets rid of all the */ nuclear@0: /* currently cached @FT_Face and @FT_Size objects within the manager. */ nuclear@0: /* */ nuclear@0: /* <InOut> */ nuclear@0: /* manager :: A handle to the manager. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( void ) nuclear@0: FTC_Manager_Reset( FTC_Manager manager ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_Manager_Done */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Destroy a given manager after emptying it. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* manager :: A handle to the target cache manager object. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( void ) nuclear@0: FTC_Manager_Done( FTC_Manager manager ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_Manager_LookupFace */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Retrieve the @FT_Face object that corresponds to a given face ID */ nuclear@0: /* through a cache manager. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* manager :: A handle to the cache manager. */ nuclear@0: /* */ nuclear@0: /* face_id :: The ID of the face object. */ nuclear@0: /* */ nuclear@0: /* <Output> */ nuclear@0: /* aface :: A handle to the face object. */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* FreeType error code. 0~means success. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* The returned @FT_Face object is always owned by the manager. You */ nuclear@0: /* should never try to discard it yourself. */ nuclear@0: /* */ nuclear@0: /* The @FT_Face object doesn't necessarily have a current size object */ nuclear@0: /* (i.e., face->size can be 0). If you need a specific `font size', */ nuclear@0: /* use @FTC_Manager_LookupSize instead. */ nuclear@0: /* */ nuclear@0: /* Never change the face's transformation matrix (i.e., never call */ nuclear@0: /* the @FT_Set_Transform function) on a returned face! If you need */ nuclear@0: /* to transform glyphs, do it yourself after glyph loading. */ nuclear@0: /* */ nuclear@0: /* When you perform a lookup, out-of-memory errors are detected */ nuclear@0: /* _within_ the lookup and force incremental flushes of the cache */ nuclear@0: /* until enough memory is released for the lookup to succeed. */ nuclear@0: /* */ nuclear@0: /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ nuclear@0: /* already been completely flushed, and still no memory was available */ nuclear@0: /* for the operation. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_Manager_LookupFace( FTC_Manager manager, nuclear@0: FTC_FaceID face_id, nuclear@0: FT_Face *aface ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* FTC_ScalerRec */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A structure used to describe a given character size in either */ nuclear@0: /* pixels or points to the cache manager. See */ nuclear@0: /* @FTC_Manager_LookupSize. */ nuclear@0: /* */ nuclear@0: /* <Fields> */ nuclear@0: /* face_id :: The source face ID. */ nuclear@0: /* */ nuclear@0: /* width :: The character width. */ nuclear@0: /* */ nuclear@0: /* height :: The character height. */ nuclear@0: /* */ nuclear@0: /* pixel :: A Boolean. If 1, the `width' and `height' fields are */ nuclear@0: /* interpreted as integer pixel character sizes. */ nuclear@0: /* Otherwise, they are expressed as 1/64th of points. */ nuclear@0: /* */ nuclear@0: /* x_res :: Only used when `pixel' is value~0 to indicate the */ nuclear@0: /* horizontal resolution in dpi. */ nuclear@0: /* */ nuclear@0: /* y_res :: Only used when `pixel' is value~0 to indicate the */ nuclear@0: /* vertical resolution in dpi. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* This type is mainly used to retrieve @FT_Size objects through the */ nuclear@0: /* cache manager. */ nuclear@0: /* */ nuclear@0: typedef struct FTC_ScalerRec_ nuclear@0: { nuclear@0: FTC_FaceID face_id; nuclear@0: FT_UInt width; nuclear@0: FT_UInt height; nuclear@0: FT_Int pixel; nuclear@0: FT_UInt x_res; nuclear@0: FT_UInt y_res; nuclear@0: nuclear@0: } FTC_ScalerRec; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* FTC_Scaler */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A handle to an @FTC_ScalerRec structure. */ nuclear@0: /* */ nuclear@0: typedef struct FTC_ScalerRec_* FTC_Scaler; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_Manager_LookupSize */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Retrieve the @FT_Size object that corresponds to a given */ nuclear@0: /* @FTC_ScalerRec pointer through a cache manager. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* manager :: A handle to the cache manager. */ nuclear@0: /* */ nuclear@0: /* scaler :: A scaler handle. */ nuclear@0: /* */ nuclear@0: /* <Output> */ nuclear@0: /* asize :: A handle to the size object. */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* FreeType error code. 0~means success. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* The returned @FT_Size object is always owned by the manager. You */ nuclear@0: /* should never try to discard it by yourself. */ nuclear@0: /* */ nuclear@0: /* You can access the parent @FT_Face object simply as `size->face' */ nuclear@0: /* if you need it. Note that this object is also owned by the */ nuclear@0: /* manager. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* When you perform a lookup, out-of-memory errors are detected */ nuclear@0: /* _within_ the lookup and force incremental flushes of the cache */ nuclear@0: /* until enough memory is released for the lookup to succeed. */ nuclear@0: /* */ nuclear@0: /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */ nuclear@0: /* already been completely flushed, and still no memory is available */ nuclear@0: /* for the operation. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_Manager_LookupSize( FTC_Manager manager, nuclear@0: FTC_Scaler scaler, nuclear@0: FT_Size *asize ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_Node_Unref */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Decrement a cache node's internal reference count. When the count */ nuclear@0: /* reaches 0, it is not destroyed but becomes eligible for subsequent */ nuclear@0: /* cache flushes. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* node :: The cache node handle. */ nuclear@0: /* */ nuclear@0: /* manager :: The cache manager handle. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( void ) nuclear@0: FTC_Node_Unref( FTC_Node node, nuclear@0: FTC_Manager manager ); nuclear@0: nuclear@0: nuclear@0: /************************************************************************* nuclear@0: * nuclear@0: * @function: nuclear@0: * FTC_Manager_RemoveFaceID nuclear@0: * nuclear@0: * @description: nuclear@0: * A special function used to indicate to the cache manager that nuclear@0: * a given @FTC_FaceID is no longer valid, either because its nuclear@0: * content changed, or because it was deallocated or uninstalled. nuclear@0: * nuclear@0: * @input: nuclear@0: * manager :: nuclear@0: * The cache manager handle. nuclear@0: * nuclear@0: * face_id :: nuclear@0: * The @FTC_FaceID to be removed. nuclear@0: * nuclear@0: * @note: nuclear@0: * This function flushes all nodes from the cache corresponding to this nuclear@0: * `face_id', with the exception of nodes with a non-null reference nuclear@0: * count. nuclear@0: * nuclear@0: * Such nodes are however modified internally so as to never appear nuclear@0: * in later lookups with the same `face_id' value, and to be immediately nuclear@0: * destroyed when released by all their users. nuclear@0: * nuclear@0: */ nuclear@0: FT_EXPORT( void ) nuclear@0: FTC_Manager_RemoveFaceID( FTC_Manager manager, nuclear@0: FTC_FaceID face_id ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Section> */ nuclear@0: /* cache_subsystem */ nuclear@0: /* */ nuclear@0: /*************************************************************************/ nuclear@0: nuclear@0: /************************************************************************* nuclear@0: * nuclear@0: * @type: nuclear@0: * FTC_CMapCache nuclear@0: * nuclear@0: * @description: nuclear@0: * An opaque handle used to model a charmap cache. This cache is to nuclear@0: * hold character codes -> glyph indices mappings. nuclear@0: * nuclear@0: */ nuclear@0: typedef struct FTC_CMapCacheRec_* FTC_CMapCache; nuclear@0: nuclear@0: nuclear@0: /************************************************************************* nuclear@0: * nuclear@0: * @function: nuclear@0: * FTC_CMapCache_New nuclear@0: * nuclear@0: * @description: nuclear@0: * Create a new charmap cache. nuclear@0: * nuclear@0: * @input: nuclear@0: * manager :: nuclear@0: * A handle to the cache manager. nuclear@0: * nuclear@0: * @output: nuclear@0: * acache :: nuclear@0: * A new cache handle. NULL in case of error. nuclear@0: * nuclear@0: * @return: nuclear@0: * FreeType error code. 0~means success. nuclear@0: * nuclear@0: * @note: nuclear@0: * Like all other caches, this one will be destroyed with the cache nuclear@0: * manager. nuclear@0: * nuclear@0: */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_CMapCache_New( FTC_Manager manager, nuclear@0: FTC_CMapCache *acache ); nuclear@0: nuclear@0: nuclear@0: /************************************************************************ nuclear@0: * nuclear@0: * @function: nuclear@0: * FTC_CMapCache_Lookup nuclear@0: * nuclear@0: * @description: nuclear@0: * Translate a character code into a glyph index, using the charmap nuclear@0: * cache. nuclear@0: * nuclear@0: * @input: nuclear@0: * cache :: nuclear@0: * A charmap cache handle. nuclear@0: * nuclear@0: * face_id :: nuclear@0: * The source face ID. nuclear@0: * nuclear@0: * cmap_index :: nuclear@0: * The index of the charmap in the source face. Any negative value nuclear@0: * means to use the cache @FT_Face's default charmap. nuclear@0: * nuclear@0: * char_code :: nuclear@0: * The character code (in the corresponding charmap). nuclear@0: * nuclear@0: * @return: nuclear@0: * Glyph index. 0~means `no glyph'. nuclear@0: * nuclear@0: */ nuclear@0: FT_EXPORT( FT_UInt ) nuclear@0: FTC_CMapCache_Lookup( FTC_CMapCache cache, nuclear@0: FTC_FaceID face_id, nuclear@0: FT_Int cmap_index, nuclear@0: FT_UInt32 char_code ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Section> */ nuclear@0: /* cache_subsystem */ nuclear@0: /* */ nuclear@0: /*************************************************************************/ nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: /***** *****/ nuclear@0: /***** IMAGE CACHE OBJECT *****/ nuclear@0: /***** *****/ nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: /*************************************************************************/ nuclear@0: nuclear@0: nuclear@0: /************************************************************************* nuclear@0: * nuclear@0: * @struct: nuclear@0: * FTC_ImageTypeRec nuclear@0: * nuclear@0: * @description: nuclear@0: * A structure used to model the type of images in a glyph cache. nuclear@0: * nuclear@0: * @fields: nuclear@0: * face_id :: nuclear@0: * The face ID. nuclear@0: * nuclear@0: * width :: nuclear@0: * The width in pixels. nuclear@0: * nuclear@0: * height :: nuclear@0: * The height in pixels. nuclear@0: * nuclear@0: * flags :: nuclear@0: * The load flags, as in @FT_Load_Glyph. nuclear@0: * nuclear@0: */ nuclear@0: typedef struct FTC_ImageTypeRec_ nuclear@0: { nuclear@0: FTC_FaceID face_id; nuclear@0: FT_Int width; nuclear@0: FT_Int height; nuclear@0: FT_Int32 flags; nuclear@0: nuclear@0: } FTC_ImageTypeRec; nuclear@0: nuclear@0: nuclear@0: /************************************************************************* nuclear@0: * nuclear@0: * @type: nuclear@0: * FTC_ImageType nuclear@0: * nuclear@0: * @description: nuclear@0: * A handle to an @FTC_ImageTypeRec structure. nuclear@0: * nuclear@0: */ nuclear@0: typedef struct FTC_ImageTypeRec_* FTC_ImageType; nuclear@0: nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: nuclear@0: #define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \ nuclear@0: ( (d1)->face_id == (d2)->face_id && \ nuclear@0: (d1)->width == (d2)->width && \ nuclear@0: (d1)->flags == (d2)->flags ) nuclear@0: nuclear@0: #ifdef FT_CONFIG_OPTION_OLD_INTERNALS nuclear@0: nuclear@0: /* this macro is incompatible with LLP64, should not be used */ nuclear@0: nuclear@0: #define FTC_IMAGE_TYPE_HASH( d ) \ nuclear@0: (FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \ nuclear@0: ( (d)->width << 8 ) ^ (d)->height ^ \ nuclear@0: ( (d)->flags << 4 ) ) nuclear@0: nuclear@0: #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Type> */ nuclear@0: /* FTC_ImageCache */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A handle to an glyph image cache object. They are designed to */ nuclear@0: /* hold many distinct glyph images while not exceeding a certain */ nuclear@0: /* memory threshold. */ nuclear@0: /* */ nuclear@0: typedef struct FTC_ImageCacheRec_* FTC_ImageCache; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_ImageCache_New */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Create a new glyph image cache. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* manager :: The parent manager for the image cache. */ nuclear@0: /* */ nuclear@0: /* <Output> */ nuclear@0: /* acache :: A handle to the new glyph image cache object. */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* FreeType error code. 0~means success. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_ImageCache_New( FTC_Manager manager, nuclear@0: FTC_ImageCache *acache ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_ImageCache_Lookup */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Retrieve a given glyph image from a glyph image cache. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* cache :: A handle to the source glyph image cache. */ nuclear@0: /* */ nuclear@0: /* type :: A pointer to a glyph image type descriptor. */ nuclear@0: /* */ nuclear@0: /* gindex :: The glyph index to retrieve. */ nuclear@0: /* */ nuclear@0: /* <Output> */ nuclear@0: /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ nuclear@0: /* failure. */ nuclear@0: /* */ nuclear@0: /* anode :: Used to return the address of of the corresponding cache */ nuclear@0: /* node after incrementing its reference count (see note */ nuclear@0: /* below). */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* FreeType error code. 0~means success. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* The returned glyph is owned and managed by the glyph image cache. */ nuclear@0: /* Never try to transform or discard it manually! You can however */ nuclear@0: /* create a copy with @FT_Glyph_Copy and modify the new one. */ nuclear@0: /* */ nuclear@0: /* If `anode' is _not_ NULL, it receives the address of the cache */ nuclear@0: /* node containing the glyph image, after increasing its reference */ nuclear@0: /* count. This ensures that the node (as well as the @FT_Glyph) will */ nuclear@0: /* always be kept in the cache until you call @FTC_Node_Unref to */ nuclear@0: /* `release' it. */ nuclear@0: /* */ nuclear@0: /* If `anode' is NULL, the cache node is left unchanged, which means */ nuclear@0: /* that the @FT_Glyph could be flushed out of the cache on the next */ nuclear@0: /* call to one of the caching sub-system APIs. Don't assume that it */ nuclear@0: /* is persistent! */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_ImageCache_Lookup( FTC_ImageCache cache, nuclear@0: FTC_ImageType type, nuclear@0: FT_UInt gindex, nuclear@0: FT_Glyph *aglyph, nuclear@0: FTC_Node *anode ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_ImageCache_LookupScaler */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec */ nuclear@0: /* to specify the face ID and its size. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* cache :: A handle to the source glyph image cache. */ nuclear@0: /* */ nuclear@0: /* scaler :: A pointer to a scaler descriptor. */ nuclear@0: /* */ nuclear@0: /* load_flags :: The corresponding load flags. */ nuclear@0: /* */ nuclear@0: /* gindex :: The glyph index to retrieve. */ nuclear@0: /* */ nuclear@0: /* <Output> */ nuclear@0: /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ nuclear@0: /* failure. */ nuclear@0: /* */ nuclear@0: /* anode :: Used to return the address of of the corresponding */ nuclear@0: /* cache node after incrementing its reference count */ nuclear@0: /* (see note below). */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* FreeType error code. 0~means success. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* The returned glyph is owned and managed by the glyph image cache. */ nuclear@0: /* Never try to transform or discard it manually! You can however */ nuclear@0: /* create a copy with @FT_Glyph_Copy and modify the new one. */ nuclear@0: /* */ nuclear@0: /* If `anode' is _not_ NULL, it receives the address of the cache */ nuclear@0: /* node containing the glyph image, after increasing its reference */ nuclear@0: /* count. This ensures that the node (as well as the @FT_Glyph) will */ nuclear@0: /* always be kept in the cache until you call @FTC_Node_Unref to */ nuclear@0: /* `release' it. */ nuclear@0: /* */ nuclear@0: /* If `anode' is NULL, the cache node is left unchanged, which means */ nuclear@0: /* that the @FT_Glyph could be flushed out of the cache on the next */ nuclear@0: /* call to one of the caching sub-system APIs. Don't assume that it */ nuclear@0: /* is persistent! */ nuclear@0: /* */ nuclear@0: /* Calls to @FT_Set_Char_Size and friends have no effect on cached */ nuclear@0: /* glyphs; you should always use the FreeType cache API instead. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_ImageCache_LookupScaler( FTC_ImageCache cache, nuclear@0: FTC_Scaler scaler, nuclear@0: FT_ULong load_flags, nuclear@0: FT_UInt gindex, nuclear@0: FT_Glyph *aglyph, nuclear@0: FTC_Node *anode ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Type> */ nuclear@0: /* FTC_SBit */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */ nuclear@0: /* structure for details. */ nuclear@0: /* */ nuclear@0: typedef struct FTC_SBitRec_* FTC_SBit; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* FTC_SBitRec */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A very compact structure used to describe a small glyph bitmap. */ nuclear@0: /* */ nuclear@0: /* <Fields> */ nuclear@0: /* width :: The bitmap width in pixels. */ nuclear@0: /* */ nuclear@0: /* height :: The bitmap height in pixels. */ nuclear@0: /* */ nuclear@0: /* left :: The horizontal distance from the pen position to the */ nuclear@0: /* left bitmap border (a.k.a. `left side bearing', or */ nuclear@0: /* `lsb'). */ nuclear@0: /* */ nuclear@0: /* top :: The vertical distance from the pen position (on the */ nuclear@0: /* baseline) to the upper bitmap border (a.k.a. `top */ nuclear@0: /* side bearing'). The distance is positive for upwards */ nuclear@0: /* y~coordinates. */ nuclear@0: /* */ nuclear@0: /* format :: The format of the glyph bitmap (monochrome or gray). */ nuclear@0: /* */ nuclear@0: /* max_grays :: Maximum gray level value (in the range 1 to~255). */ nuclear@0: /* */ nuclear@0: /* pitch :: The number of bytes per bitmap line. May be positive */ nuclear@0: /* or negative. */ nuclear@0: /* */ nuclear@0: /* xadvance :: The horizontal advance width in pixels. */ nuclear@0: /* */ nuclear@0: /* yadvance :: The vertical advance height in pixels. */ nuclear@0: /* */ nuclear@0: /* buffer :: A pointer to the bitmap pixels. */ nuclear@0: /* */ nuclear@0: typedef struct FTC_SBitRec_ nuclear@0: { nuclear@0: FT_Byte width; nuclear@0: FT_Byte height; nuclear@0: FT_Char left; nuclear@0: FT_Char top; nuclear@0: nuclear@0: FT_Byte format; nuclear@0: FT_Byte max_grays; nuclear@0: FT_Short pitch; nuclear@0: FT_Char xadvance; nuclear@0: FT_Char yadvance; nuclear@0: nuclear@0: FT_Byte* buffer; nuclear@0: nuclear@0: } FTC_SBitRec; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Type> */ nuclear@0: /* FTC_SBitCache */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A handle to a small bitmap cache. These are special cache objects */ nuclear@0: /* used to store small glyph bitmaps (and anti-aliased pixmaps) in a */ nuclear@0: /* much more efficient way than the traditional glyph image cache */ nuclear@0: /* implemented by @FTC_ImageCache. */ nuclear@0: /* */ nuclear@0: typedef struct FTC_SBitCacheRec_* FTC_SBitCache; nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_SBitCache_New */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Create a new cache to store small glyph bitmaps. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* manager :: A handle to the source cache manager. */ nuclear@0: /* */ nuclear@0: /* <Output> */ nuclear@0: /* acache :: A handle to the new sbit cache. NULL in case of error. */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* FreeType error code. 0~means success. */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_SBitCache_New( FTC_Manager manager, nuclear@0: FTC_SBitCache *acache ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_SBitCache_Lookup */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* Look up a given small glyph bitmap in a given sbit cache and */ nuclear@0: /* `lock' it to prevent its flushing from the cache until needed. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* cache :: A handle to the source sbit cache. */ nuclear@0: /* */ nuclear@0: /* type :: A pointer to the glyph image type descriptor. */ nuclear@0: /* */ nuclear@0: /* gindex :: The glyph index. */ nuclear@0: /* */ nuclear@0: /* <Output> */ nuclear@0: /* sbit :: A handle to a small bitmap descriptor. */ nuclear@0: /* */ nuclear@0: /* anode :: Used to return the address of of the corresponding cache */ nuclear@0: /* node after incrementing its reference count (see note */ nuclear@0: /* below). */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* FreeType error code. 0~means success. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* The small bitmap descriptor and its bit buffer are owned by the */ nuclear@0: /* cache and should never be freed by the application. They might */ nuclear@0: /* as well disappear from memory on the next cache lookup, so don't */ nuclear@0: /* treat them as persistent data. */ nuclear@0: /* */ nuclear@0: /* The descriptor's `buffer' field is set to~0 to indicate a missing */ nuclear@0: /* glyph bitmap. */ nuclear@0: /* */ nuclear@0: /* If `anode' is _not_ NULL, it receives the address of the cache */ nuclear@0: /* node containing the bitmap, after increasing its reference count. */ nuclear@0: /* This ensures that the node (as well as the image) will always be */ nuclear@0: /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ nuclear@0: /* */ nuclear@0: /* If `anode' is NULL, the cache node is left unchanged, which means */ nuclear@0: /* that the bitmap could be flushed out of the cache on the next */ nuclear@0: /* call to one of the caching sub-system APIs. Don't assume that it */ nuclear@0: /* is persistent! */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_SBitCache_Lookup( FTC_SBitCache cache, nuclear@0: FTC_ImageType type, nuclear@0: FT_UInt gindex, nuclear@0: FTC_SBit *sbit, nuclear@0: FTC_Node *anode ); nuclear@0: nuclear@0: nuclear@0: /*************************************************************************/ nuclear@0: /* */ nuclear@0: /* <Function> */ nuclear@0: /* FTC_SBitCache_LookupScaler */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec */ nuclear@0: /* to specify the face ID and its size. */ nuclear@0: /* */ nuclear@0: /* <Input> */ nuclear@0: /* cache :: A handle to the source sbit cache. */ nuclear@0: /* */ nuclear@0: /* scaler :: A pointer to the scaler descriptor. */ nuclear@0: /* */ nuclear@0: /* load_flags :: The corresponding load flags. */ nuclear@0: /* */ nuclear@0: /* gindex :: The glyph index. */ nuclear@0: /* */ nuclear@0: /* <Output> */ nuclear@0: /* sbit :: A handle to a small bitmap descriptor. */ nuclear@0: /* */ nuclear@0: /* anode :: Used to return the address of of the corresponding */ nuclear@0: /* cache node after incrementing its reference count */ nuclear@0: /* (see note below). */ nuclear@0: /* */ nuclear@0: /* <Return> */ nuclear@0: /* FreeType error code. 0~means success. */ nuclear@0: /* */ nuclear@0: /* <Note> */ nuclear@0: /* The small bitmap descriptor and its bit buffer are owned by the */ nuclear@0: /* cache and should never be freed by the application. They might */ nuclear@0: /* as well disappear from memory on the next cache lookup, so don't */ nuclear@0: /* treat them as persistent data. */ nuclear@0: /* */ nuclear@0: /* The descriptor's `buffer' field is set to~0 to indicate a missing */ nuclear@0: /* glyph bitmap. */ nuclear@0: /* */ nuclear@0: /* If `anode' is _not_ NULL, it receives the address of the cache */ nuclear@0: /* node containing the bitmap, after increasing its reference count. */ nuclear@0: /* This ensures that the node (as well as the image) will always be */ nuclear@0: /* kept in the cache until you call @FTC_Node_Unref to `release' it. */ nuclear@0: /* */ nuclear@0: /* If `anode' is NULL, the cache node is left unchanged, which means */ nuclear@0: /* that the bitmap could be flushed out of the cache on the next */ nuclear@0: /* call to one of the caching sub-system APIs. Don't assume that it */ nuclear@0: /* is persistent! */ nuclear@0: /* */ nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_SBitCache_LookupScaler( FTC_SBitCache cache, nuclear@0: FTC_Scaler scaler, nuclear@0: FT_ULong load_flags, nuclear@0: FT_UInt gindex, nuclear@0: FTC_SBit *sbit, nuclear@0: FTC_Node *anode ); nuclear@0: nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: #ifdef FT_CONFIG_OPTION_OLD_INTERNALS nuclear@0: nuclear@0: /*@***********************************************************************/ nuclear@0: /* */ nuclear@0: /* <Struct> */ nuclear@0: /* FTC_FontRec */ nuclear@0: /* */ nuclear@0: /* <Description> */ nuclear@0: /* A simple structure used to describe a given `font' to the cache */ nuclear@0: /* manager. Note that a `font' is the combination of a given face */ nuclear@0: /* with a given character size. */ nuclear@0: /* */ nuclear@0: /* <Fields> */ nuclear@0: /* face_id :: The ID of the face to use. */ nuclear@0: /* */ nuclear@0: /* pix_width :: The character width in integer pixels. */ nuclear@0: /* */ nuclear@0: /* pix_height :: The character height in integer pixels. */ nuclear@0: /* */ nuclear@0: typedef struct FTC_FontRec_ nuclear@0: { nuclear@0: FTC_FaceID face_id; nuclear@0: FT_UShort pix_width; nuclear@0: FT_UShort pix_height; nuclear@0: nuclear@0: } FTC_FontRec; nuclear@0: nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: nuclear@0: #define FTC_FONT_COMPARE( f1, f2 ) \ nuclear@0: ( (f1)->face_id == (f2)->face_id && \ nuclear@0: (f1)->pix_width == (f2)->pix_width && \ nuclear@0: (f1)->pix_height == (f2)->pix_height ) nuclear@0: nuclear@0: /* this macro is incompatible with LLP64, should not be used */ nuclear@0: #define FTC_FONT_HASH( f ) \ nuclear@0: (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \ nuclear@0: ((f)->pix_width << 8) ^ \ nuclear@0: ((f)->pix_height) ) nuclear@0: nuclear@0: typedef FTC_FontRec* FTC_Font; nuclear@0: nuclear@0: nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_Manager_Lookup_Face( FTC_Manager manager, nuclear@0: FTC_FaceID face_id, nuclear@0: FT_Face *aface ); nuclear@0: nuclear@0: FT_EXPORT( FT_Error ) nuclear@0: FTC_Manager_Lookup_Size( FTC_Manager manager, nuclear@0: FTC_Font font, nuclear@0: FT_Face *aface, nuclear@0: FT_Size *asize ); nuclear@0: nuclear@0: #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ nuclear@0: nuclear@0: nuclear@0: /* */ nuclear@0: nuclear@0: FT_END_HEADER nuclear@0: nuclear@0: #endif /* __FTCACHE_H__ */ nuclear@0: nuclear@0: nuclear@0: /* END */