1 /***************************************************************************/
5 /* FreeType Cache subsystem (specification). */
7 /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
16 /***************************************************************************/
30 /*************************************************************************
39 * How to cache face, size, and glyph data with FreeType 2.
42 * This section describes the FreeType 2 cache sub-system, which is used
43 * to limit the number of concurrently opened @FT_Face and @FT_Size
44 * objects, as well as caching information like character maps and glyph
45 * images while limiting their maximum memory usage.
47 * Note that all types and functions begin with the `FTC_' prefix.
49 * The cache is highly portable and thus doesn't know anything about the
50 * fonts installed on your system, or how to access them. This implies
51 * the following scheme:
53 * First, available or installed font faces are uniquely identified by
54 * @FTC_FaceID values, provided to the cache by the client. Note that
55 * the cache only stores and compares these values, and doesn't try to
56 * interpret them in any way.
58 * Second, the cache calls, only when needed, a client-provided function
59 * to convert a @FTC_FaceID into a new @FT_Face object. The latter is
60 * then completely managed by the cache, including its termination
61 * through @FT_Done_Face.
63 * Clients are free to map face IDs to anything else. The most simple
64 * usage is to associate them to a (pathname,face_index) pair that is
65 * used to call @FT_New_Face. However, more complex schemes are also
68 * Note that for the cache to work correctly, the face ID values must be
69 * *persistent*, which means that the contents they point to should not
70 * change at runtime, or that their value should not become invalid.
72 * If this is unavoidable (e.g., when a font is uninstalled at runtime),
73 * you should call @FTC_Manager_RemoveFaceID as soon as possible, to let
74 * the cache get rid of any references to the old @FTC_FaceID it may
75 * keep internally. Failure to do so will lead to incorrect behaviour
78 * To use the cache, start with calling @FTC_Manager_New to create a new
79 * @FTC_Manager object, which models a single cache instance. You can
80 * then look up @FT_Face and @FT_Size objects with
81 * @FTC_Manager_LookupFace and @FTC_Manager_LookupSize, respectively.
83 * If you want to use the charmap caching, call @FTC_CMapCache_New, then
84 * later use @FTC_CMapCache_Lookup to perform the equivalent of
85 * @FT_Get_Char_Index, only much faster.
87 * If you want to use the @FT_Glyph caching, call @FTC_ImageCache, then
88 * later use @FTC_ImageCache_Lookup to retrieve the corresponding
89 * @FT_Glyph objects from the cache.
91 * If you need lots of small bitmaps, it is much more memory efficient
92 * to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This
93 * returns @FTC_SBitRec structures, which are used to store small
94 * bitmaps directly. (A small bitmap is one whose metrics and
95 * dimensions all fit into 8-bit integers).
97 * We hope to also provide a kerning cache in the near future.
108 * FTC_Manager_LookupFace
109 * FTC_Manager_LookupSize
110 * FTC_Manager_RemoveFaceID
117 * FTC_ImageCache_Lookup
122 * FTC_SBitCache_Lookup
126 * FTC_CMapCache_Lookup
128 *************************************************************************/
131 /*************************************************************************/
132 /*************************************************************************/
133 /*************************************************************************/
135 /***** BASIC TYPE DEFINITIONS *****/
137 /*************************************************************************/
138 /*************************************************************************/
139 /*************************************************************************/
142 /*************************************************************************
147 * An opaque pointer type that is used to identity face objects. The
148 * contents of such objects is application-dependent.
150 * These pointers are typically used to point to a user-defined
151 * structure containing a font file path, and face index.
154 * Never use NULL as a valid @FTC_FaceID.
156 * Face IDs are passed by the client to the cache manager, which calls,
157 * when needed, the @FTC_Face_Requester to translate them into new
160 * If the content of a given face ID changes at runtime, or if the value
161 * becomes invalid (e.g., when uninstalling a font), you should
162 * immediately call @FTC_Manager_RemoveFaceID before any other cache
165 * Failure to do so will result in incorrect behaviour or even
166 * memory leaks and crashes.
168 typedef struct FTC_FaceIDRec_
* FTC_FaceID
;
171 /************************************************************************
177 * A callback function provided by client applications. It is used by
178 * the cache manager to translate a given @FTC_FaceID into a new valid
179 * @FT_Face object, on demand.
183 * The face ID to resolve.
186 * A handle to a FreeType library object.
189 * Application-provided request data (see note below).
193 * A new @FT_Face handle.
196 * FreeType error code. 0 means success.
199 * The third parameter `req_data' is the same as the one passed by the
200 * client when @FTC_Manager_New is called.
202 * The face requester should not perform funny things on the returned
203 * face object, like creating a new @FT_Size for it, or setting a
204 * transformation through @FT_Set_Transform!
207 (*FTC_Face_Requester
)( FTC_FaceID face_id
,
209 FT_Pointer request_data
,
214 #define FT_POINTER_TO_ULONG( p ) ( (FT_ULong)(FT_Pointer)(p) )
216 #define FTC_FACE_ID_HASH( i ) \
217 ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \
218 ( FT_POINTER_TO_ULONG( i ) << 7 ) ) )
221 /*************************************************************************/
222 /*************************************************************************/
223 /*************************************************************************/
225 /***** CACHE MANAGER OBJECT *****/
227 /*************************************************************************/
228 /*************************************************************************/
229 /*************************************************************************/
232 /*************************************************************************/
238 /* This object corresponds to one instance of the cache-subsystem. */
239 /* It is used to cache one or more @FT_Face objects, along with */
240 /* corresponding @FT_Size objects. */
242 /* The manager intentionally limits the total number of opened */
243 /* @FT_Face and @FT_Size objects to control memory usage. See the */
244 /* `max_faces' and `max_sizes' parameters of @FTC_Manager_New. */
246 /* The manager is also used to cache `nodes' of various types while */
247 /* limiting their total memory usage. */
249 /* All limitations are enforced by keeping lists of managed objects */
250 /* in most-recently-used order, and flushing old nodes to make room */
253 typedef struct FTC_ManagerRec_
* FTC_Manager
;
256 /*************************************************************************/
262 /* An opaque handle to a cache node object. Each cache node is */
263 /* reference-counted. A node with a count of 0 might be flushed */
264 /* out of a full cache whenever a lookup request is performed. */
266 /* If you lookup nodes, you have the ability to `acquire' them, i.e., */
267 /* to increment their reference count. This will prevent the node */
268 /* from being flushed out of the cache until you explicitly `release' */
269 /* it (see @FTC_Node_Unref). */
271 /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */
273 typedef struct FTC_NodeRec_
* FTC_Node
;
276 /*************************************************************************/
279 /* FTC_Manager_New */
282 /* Creates a new cache manager. */
285 /* library :: The parent FreeType library handle to use. */
287 /* max_faces :: Maximum number of opened @FT_Face objects managed by */
288 /* this cache instance. Use 0 for defaults. */
290 /* max_sizes :: Maximum number of opened @FT_Size objects managed by */
291 /* this cache instance. Use 0 for defaults. */
293 /* max_bytes :: Maximum number of bytes to use for cached data nodes. */
294 /* Use 0 for defaults. Note that this value does not */
295 /* account for managed @FT_Face and @FT_Size objects. */
297 /* requester :: An application-provided callback used to translate */
298 /* face IDs into real @FT_Face objects. */
300 /* req_data :: A generic pointer that is passed to the requester */
301 /* each time it is called (see @FTC_Face_Requester). */
304 /* amanager :: A handle to a new manager object. 0 in case of */
308 /* FreeType error code. 0 means success. */
310 FT_EXPORT( FT_Error
)
311 FTC_Manager_New( FT_Library library
,
315 FTC_Face_Requester requester
,
317 FTC_Manager
*amanager
);
320 /*************************************************************************/
323 /* FTC_Manager_Reset */
326 /* Empties a given cache manager. This simply gets rid of all the */
327 /* currently cached @FT_Face and @FT_Size objects within the manager. */
330 /* manager :: A handle to the manager. */
333 FTC_Manager_Reset( FTC_Manager manager
);
336 /*************************************************************************/
339 /* FTC_Manager_Done */
342 /* Destroys a given manager after emptying it. */
345 /* manager :: A handle to the target cache manager object. */
348 FTC_Manager_Done( FTC_Manager manager
);
351 /*************************************************************************/
354 /* FTC_Manager_LookupFace */
357 /* Retrieves the @FT_Face object that corresponds to a given face ID */
358 /* through a cache manager. */
361 /* manager :: A handle to the cache manager. */
363 /* face_id :: The ID of the face object. */
366 /* aface :: A handle to the face object. */
369 /* FreeType error code. 0 means success. */
372 /* The returned @FT_Face object is always owned by the manager. You */
373 /* should never try to discard it yourself. */
375 /* The @FT_Face object doesn't necessarily have a current size object */
376 /* (i.e., face->size can be 0). If you need a specific `font size', */
377 /* use @FTC_Manager_LookupSize instead. */
379 /* Never change the face's transformation matrix (i.e., never call */
380 /* the @FT_Set_Transform function) on a returned face! If you need */
381 /* to transform glyphs, do it yourself after glyph loading. */
383 /* When you perform a lookup, out-of-memory errors are detected */
384 /* _within_ the lookup and force incremental flushes of the cache */
385 /* until enough memory is released for the lookup to succeed. */
387 /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */
388 /* already been completely flushed, and still no memory was available */
389 /* for the operation. */
391 FT_EXPORT( FT_Error
)
392 FTC_Manager_LookupFace( FTC_Manager manager
,
397 /*************************************************************************/
403 /* A structure used to describe a given character size in either */
404 /* pixels or points to the cache manager. See */
405 /* @FTC_Manager_LookupSize. */
408 /* face_id :: The source face ID. */
410 /* width :: The character width. */
412 /* height :: The character height. */
414 /* pixel :: A Boolean. If 1, the `width' and `height' fields are */
415 /* interpreted as integer pixel character sizes. */
416 /* Otherwise, they are expressed as 1/64th of points. */
418 /* x_res :: Only used when `pixel' is value 0 to indicate the */
419 /* horizontal resolution in dpi. */
421 /* y_res :: Only used when `pixel' is value 0 to indicate the */
422 /* vertical resolution in dpi. */
425 /* This type is mainly used to retrieve @FT_Size objects through the */
428 typedef struct FTC_ScalerRec_
437 } FTC_ScalerRec
, *FTC_Scaler
;
440 /*************************************************************************/
443 /* FTC_Manager_LookupSize */
446 /* Retrieve the @FT_Size object that corresponds to a given */
447 /* @FTC_ScalerRec pointer through a cache manager. */
450 /* manager :: A handle to the cache manager. */
452 /* scaler :: A scaler handle. */
455 /* asize :: A handle to the size object. */
458 /* FreeType error code. 0 means success. */
461 /* The returned @FT_Size object is always owned by the manager. You */
462 /* should never try to discard it by yourself. */
464 /* You can access the parent @FT_Face object simply as `size->face' */
465 /* if you need it. Note that this object is also owned by the */
469 /* When you perform a lookup, out-of-memory errors are detected */
470 /* _within_ the lookup and force incremental flushes of the cache */
471 /* until enough memory is released for the lookup to succeed. */
473 /* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has */
474 /* already been completely flushed, and still no memory is available */
475 /* for the operation. */
477 FT_EXPORT( FT_Error
)
478 FTC_Manager_LookupSize( FTC_Manager manager
,
483 /*************************************************************************/
489 /* Decrement a cache node's internal reference count. When the count */
490 /* reaches 0, it is not destroyed but becomes eligible for subsequent */
494 /* node :: The cache node handle. */
496 /* manager :: The cache manager handle. */
499 FTC_Node_Unref( FTC_Node node
,
500 FTC_Manager manager
);
503 /*************************************************************************
506 * FTC_Manager_RemoveFaceID
509 * A special function used to indicate to the cache manager that
510 * a given @FTC_FaceID is no longer valid, either because its
511 * content changed, or because it was deallocated or uninstalled.
515 * The cache manager handle.
518 * The @FTC_FaceID to be removed.
521 * This function flushes all nodes from the cache corresponding to this
522 * `face_id', with the exception of nodes with a non-null reference
525 * Such nodes are however modified internally so as to never appear
526 * in later lookups with the same `face_id' value, and to be immediately
527 * destroyed when released by all their users.
531 FTC_Manager_RemoveFaceID( FTC_Manager manager
,
532 FTC_FaceID face_id
);
535 /*************************************************************************/
538 /* cache_subsystem */
540 /*************************************************************************/
542 /*************************************************************************
548 * An opaque handle used to model a charmap cache. This cache is to
549 * hold character codes -> glyph indices mappings.
552 typedef struct FTC_CMapCacheRec_
* FTC_CMapCache
;
555 /*************************************************************************
561 * Create a new charmap cache.
565 * A handle to the cache manager.
569 * A new cache handle. NULL in case of error.
572 * FreeType error code. 0 means success.
575 * Like all other caches, this one will be destroyed with the cache
579 FT_EXPORT( FT_Error
)
580 FTC_CMapCache_New( FTC_Manager manager
,
581 FTC_CMapCache
*acache
);
584 /************************************************************************
587 * FTC_CMapCache_Lookup
590 * Translate a character code into a glyph index, using the charmap
595 * A charmap cache handle.
598 * The source face ID.
601 * The index of the charmap in the source face.
604 * The character code (in the corresponding charmap).
607 * Glyph index. 0 means `no glyph'.
611 FTC_CMapCache_Lookup( FTC_CMapCache cache
,
614 FT_UInt32 char_code
);
617 /*************************************************************************/
620 /* cache_subsystem */
622 /*************************************************************************/
625 /*************************************************************************/
626 /*************************************************************************/
627 /*************************************************************************/
629 /***** IMAGE CACHE OBJECT *****/
631 /*************************************************************************/
632 /*************************************************************************/
633 /*************************************************************************/
636 /*************************************************************************
642 * A structure used to model the type of images in a glyph cache.
649 * The width in pixels.
652 * The height in pixels.
655 * The load flags, as in @FT_Load_Glyph.
658 typedef struct FTC_ImageTypeRec_
668 /*************************************************************************
674 * A handle to an @FTC_ImageTypeRec structure.
677 typedef struct FTC_ImageTypeRec_
* FTC_ImageType
;
683 #define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \
684 ( (d1)->face_id == (d2)->face_id && \
685 (d1)->width == (d2)->width && \
686 (d1)->flags == (d2)->flags )
688 #define FTC_IMAGE_TYPE_HASH( d ) \
689 (FT_UFast)( FTC_FACE_ID_HASH( (d)->face_id ) ^ \
690 ( (d)->width << 8 ) ^ (d)->height ^ \
691 ( (d)->flags << 4 ) )
694 /*************************************************************************/
700 /* A handle to an glyph image cache object. They are designed to */
701 /* hold many distinct glyph images while not exceeding a certain */
702 /* memory threshold. */
704 typedef struct FTC_ImageCacheRec_
* FTC_ImageCache
;
707 /*************************************************************************/
710 /* FTC_ImageCache_New */
713 /* Creates a new glyph image cache. */
716 /* manager :: The parent manager for the image cache. */
719 /* acache :: A handle to the new glyph image cache object. */
722 /* FreeType error code. 0 means success. */
724 FT_EXPORT( FT_Error
)
725 FTC_ImageCache_New( FTC_Manager manager
,
726 FTC_ImageCache
*acache
);
729 /*************************************************************************/
732 /* FTC_ImageCache_Lookup */
735 /* Retrieves a given glyph image from a glyph image cache. */
738 /* cache :: A handle to the source glyph image cache. */
740 /* type :: A pointer to a glyph image type descriptor. */
742 /* gindex :: The glyph index to retrieve. */
745 /* aglyph :: The corresponding @FT_Glyph object. 0 in case of */
748 /* anode :: Used to return the address of of the corresponding cache */
749 /* node after incrementing its reference count (see note */
753 /* FreeType error code. 0 means success. */
756 /* The returned glyph is owned and managed by the glyph image cache. */
757 /* Never try to transform or discard it manually! You can however */
758 /* create a copy with @FT_Glyph_Copy and modify the new one. */
760 /* If `anode' is _not_ NULL, it receives the address of the cache */
761 /* node containing the glyph image, after increasing its reference */
762 /* count. This ensures that the node (as well as the @FT_Glyph) will */
763 /* always be kept in the cache until you call @FTC_Node_Unref to */
766 /* If `anode' is NULL, the cache node is left unchanged, which means */
767 /* that the @FT_Glyph could be flushed out of the cache on the next */
768 /* call to one of the caching sub-system APIs. Don't assume that it */
771 FT_EXPORT( FT_Error
)
772 FTC_ImageCache_Lookup( FTC_ImageCache cache
,
779 /*************************************************************************/
782 /* FTC_ImageCache_LookupScaler */
785 /* A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec */
786 /* to specify the face ID and its size. */
789 /* cache :: A handle to the source glyph image cache. */
791 /* scaler :: A pointer to a scaler descriptor. */
793 /* load_flags :: The corresponding load flags. */
795 /* gindex :: The glyph index to retrieve. */
798 /* aglyph :: The corresponding @FT_Glyph object. 0 in case of */
801 /* anode :: Used to return the address of of the corresponding */
802 /* cache node after incrementing its reference count */
803 /* (see note below). */
806 /* FreeType error code. 0 means success. */
809 /* The returned glyph is owned and managed by the glyph image cache. */
810 /* Never try to transform or discard it manually! You can however */
811 /* create a copy with @FT_Glyph_Copy and modify the new one. */
813 /* If `anode' is _not_ NULL, it receives the address of the cache */
814 /* node containing the glyph image, after increasing its reference */
815 /* count. This ensures that the node (as well as the @FT_Glyph) will */
816 /* always be kept in the cache until you call @FTC_Node_Unref to */
819 /* If `anode' is NULL, the cache node is left unchanged, which means */
820 /* that the @FT_Glyph could be flushed out of the cache on the next */
821 /* call to one of the caching sub-system APIs. Don't assume that it */
824 FT_EXPORT( FT_Error
)
825 FTC_ImageCache_LookupScaler( FTC_ImageCache cache
,
833 /*************************************************************************/
839 /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */
840 /* structure for details. */
842 typedef struct FTC_SBitRec_
* FTC_SBit
;
845 /*************************************************************************/
851 /* A very compact structure used to describe a small glyph bitmap. */
854 /* width :: The bitmap width in pixels. */
856 /* height :: The bitmap height in pixels. */
858 /* left :: The horizontal distance from the pen position to the */
859 /* left bitmap border (a.k.a. `left side bearing', or */
862 /* top :: The vertical distance from the pen position (on the */
863 /* baseline) to the upper bitmap border (a.k.a. `top */
864 /* side bearing'). The distance is positive for upwards */
867 /* format :: The format of the glyph bitmap (monochrome or gray). */
869 /* max_grays :: Maximum gray level value (in the range 1 to 255). */
871 /* pitch :: The number of bytes per bitmap line. May be positive */
874 /* xadvance :: The horizontal advance width in pixels. */
876 /* yadvance :: The vertical advance height in pixels. */
878 /* buffer :: A pointer to the bitmap pixels. */
880 typedef struct FTC_SBitRec_
898 /*************************************************************************/
904 /* A handle to a small bitmap cache. These are special cache objects */
905 /* used to store small glyph bitmaps (and anti-aliased pixmaps) in a */
906 /* much more efficient way than the traditional glyph image cache */
907 /* implemented by @FTC_ImageCache. */
909 typedef struct FTC_SBitCacheRec_
* FTC_SBitCache
;
912 /*************************************************************************/
915 /* FTC_SBitCache_New */
918 /* Creates a new cache to store small glyph bitmaps. */
921 /* manager :: A handle to the source cache manager. */
924 /* acache :: A handle to the new sbit cache. NULL in case of error. */
927 /* FreeType error code. 0 means success. */
929 FT_EXPORT( FT_Error
)
930 FTC_SBitCache_New( FTC_Manager manager
,
931 FTC_SBitCache
*acache
);
934 /*************************************************************************/
937 /* FTC_SBitCache_Lookup */
940 /* Looks up a given small glyph bitmap in a given sbit cache and */
941 /* `lock' it to prevent its flushing from the cache until needed. */
944 /* cache :: A handle to the source sbit cache. */
946 /* type :: A pointer to the glyph image type descriptor. */
948 /* gindex :: The glyph index. */
951 /* sbit :: A handle to a small bitmap descriptor. */
953 /* anode :: Used to return the address of of the corresponding cache */
954 /* node after incrementing its reference count (see note */
958 /* FreeType error code. 0 means success. */
961 /* The small bitmap descriptor and its bit buffer are owned by the */
962 /* cache and should never be freed by the application. They might */
963 /* as well disappear from memory on the next cache lookup, so don't */
964 /* treat them as persistent data. */
966 /* The descriptor's `buffer' field is set to 0 to indicate a missing */
969 /* If `anode' is _not_ NULL, it receives the address of the cache */
970 /* node containing the bitmap, after increasing its reference count. */
971 /* This ensures that the node (as well as the image) will always be */
972 /* kept in the cache until you call @FTC_Node_Unref to `release' it. */
974 /* If `anode' is NULL, the cache node is left unchanged, which means */
975 /* that the bitmap could be flushed out of the cache on the next */
976 /* call to one of the caching sub-system APIs. Don't assume that it */
979 FT_EXPORT( FT_Error
)
980 FTC_SBitCache_Lookup( FTC_SBitCache cache
,
987 /*************************************************************************/
990 /* FTC_SBitCache_LookupScaler */
993 /* A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec */
994 /* to specify the face ID and its size. */
997 /* cache :: A handle to the source sbit cache. */
999 /* scaler :: A pointer to the scaler descriptor. */
1001 /* load_flags :: The corresponding load flags. */
1003 /* gindex :: The glyph index. */
1006 /* sbit :: A handle to a small bitmap descriptor. */
1008 /* anode :: Used to return the address of of the corresponding */
1009 /* cache node after incrementing its reference count */
1010 /* (see note below). */
1013 /* FreeType error code. 0 means success. */
1016 /* The small bitmap descriptor and its bit buffer are owned by the */
1017 /* cache and should never be freed by the application. They might */
1018 /* as well disappear from memory on the next cache lookup, so don't */
1019 /* treat them as persistent data. */
1021 /* The descriptor's `buffer' field is set to 0 to indicate a missing */
1024 /* If `anode' is _not_ NULL, it receives the address of the cache */
1025 /* node containing the bitmap, after increasing its reference count. */
1026 /* This ensures that the node (as well as the image) will always be */
1027 /* kept in the cache until you call @FTC_Node_Unref to `release' it. */
1029 /* If `anode' is NULL, the cache node is left unchanged, which means */
1030 /* that the bitmap could be flushed out of the cache on the next */
1031 /* call to one of the caching sub-system APIs. Don't assume that it */
1032 /* is persistent! */
1034 FT_EXPORT( FT_Error
)
1035 FTC_SBitCache_LookupScaler( FTC_SBitCache cache
,
1037 FT_ULong load_flags
,
1045 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
1047 /*@***********************************************************************/
1053 /* A simple structure used to describe a given `font' to the cache */
1054 /* manager. Note that a `font' is the combination of a given face */
1055 /* with a given character size. */
1058 /* face_id :: The ID of the face to use. */
1060 /* pix_width :: The character width in integer pixels. */
1062 /* pix_height :: The character height in integer pixels. */
1064 typedef struct FTC_FontRec_
1067 FT_UShort pix_width
;
1068 FT_UShort pix_height
;
1076 #define FTC_FONT_COMPARE( f1, f2 ) \
1077 ( (f1)->face_id == (f2)->face_id && \
1078 (f1)->pix_width == (f2)->pix_width && \
1079 (f1)->pix_height == (f2)->pix_height )
1081 #define FTC_FONT_HASH( f ) \
1082 (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \
1083 ((f)->pix_width << 8) ^ \
1086 typedef FTC_FontRec
* FTC_Font
;
1089 FT_EXPORT( FT_Error
)
1090 FTC_Manager_Lookup_Face( FTC_Manager manager
,
1094 FT_EXPORT( FT_Error
)
1095 FTC_Manager_Lookup_Size( FTC_Manager manager
,
1100 #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
1107 #endif /* __FTCACHE_H__ */