ref: 75820e207297f83d7a7bf89c82f21ce166bcef3e
parent: fa0346d6d98d98c61042810b5bd6223606e0f3ca
author: David Turner <[email protected]>
date: Fri Jan 16 04:07:59 EST 2004
* include/freetype/ftcache.h, include/freetype/cache/ftcmanag.h: adding FTC_Manager_LookupSize and FTC_Scaler to the public API (they were previously hidden)
--- a/include/freetype/cache/ftcmanag.h
+++ b/include/freetype/cache/ftcmanag.h
@@ -151,18 +151,6 @@
/* */
- typedef struct FTC_ScalerRec_
- {
- FTC_FaceID face_id;
- FT_UInt width;
- FT_UInt height;
- FT_Int pixel;
- FT_UInt x_res;
- FT_UInt y_res;
-
- } FTC_ScalerRec, *FTC_Scaler;
-
-
#define FTC_SCALER_COMPARE( a, b ) \
( (a)->face_id == (b)->face_id && \
(a)->width == (b)->width && \
@@ -176,12 +164,6 @@
( FTC_FACE_ID_HASH( (q)->face_id ) + \
(q)->width + (q)->height*7 + \
( (q)->pixel ? 0 : ( (q)->x_res*33 ^ (q)->y_res*61 ) ) )
-
-
- FT_EXPORT( FT_Error )
- FTC_Manager_LookupSize( FTC_Manager manager,
- FTC_Scaler scaler,
- FT_Size *asize );
/* */
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -64,7 +64,7 @@
/* */
/* FTC_Manager_New */
/* FTC_Manager_LookupFace */
- /* FTC_Manager_Lookup_Size */
+ /* FTC_Manager_LookupSize */
/* */
/* FTC_Node */
/* FTC_Node_Ref */
@@ -342,7 +342,7 @@
/* */
/* The @FT_Face object doesn't necessarily have a current size object */
/* (i.e., face->size can be 0). If you need a specific `font size', */
- /* use @FTC_Manager_Lookup_Size instead. */
+ /* use @FTC_Manager_LookupSize instead. */
/* */
/* Never change the face's transformation matrix (i.e., never call */
/* the @FT_Set_Transform function) on a returned face! If you need */
@@ -352,6 +352,94 @@
FTC_Manager_LookupFace( FTC_Manager manager,
FTC_FaceID face_id,
FT_Face *aface );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FTC_Scaler */
+ /* */
+ /* <Description> */
+ /* Handle to a @FTC_ScalerRec structure. */
+ /* */
+ typedef struct FTC_FaceIDRec_* FTC_FaceID;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* FTC_ScalerRec */
+ /* */
+ /* <Description> */
+ /* A structure used to describe a given character size in either */
+ /* pixels or points to the cache manager. See @FTC_Manager_LookupSize */
+ /* */
+ /* <Fields> */
+ /* face_id :: source face id */
+ /* */
+ /* width :: character width */
+ /* */
+ /* height :: character height */
+ /* */
+ /* pixel :: booelan. If TRUE, the "width" and "height" fields */
+ /* are interpreted as integer pixel character sizes. */
+ /* If false, they are expressed as 1/64th of points */
+ /* */
+ /* x_res :: only used when 'pixel' is FALSE. indicates the */
+ /* horizontal resolution in dpis */
+ /* */
+ /* y_res :: only used when 'pixel' is FALSE. indicates the */
+ /* vertical resolution in dpis */
+ /* */
+ /* <Note> */
+ /* This type is mainly used to retrieve @FT_Size objects through the */
+ /* cache manager. */
+ /* */
+ typedef struct FTC_ScalerRec_
+ {
+ FTC_FaceID face_id;
+ FT_UInt width;
+ FT_UInt height;
+ FT_Int pixel;
+ FT_UInt x_res;
+ FT_UInt y_res;
+
+ } FTC_ScalerRec, *FTC_Scaler;
+
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FTC_Manager_LookupSize */
+ /* */
+ /* <Description> */
+ /* Retrieves the @FT_Size object that corresponds to a given */
+ /* @FTC_Scaler through a cache manager. */
+ /* */
+ /* <Input> */
+ /* manager :: A handle to the cache manager. */
+ /* */
+ /* scaler :: scaler handle. */
+ /* */
+ /* <Output> */
+ /* asize :: A handle to the size object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* The returned @FT_Size object is always owned by the manager. You */
+ /* should never try to discard it yourself. */
+ /* */
+ /* You can access the parent @FT_Face object simply as "size->face" */
+ /* if you need it. Note that this object is also owner by the */
+ /* manager. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FTC_Manager_LookupSize( FTC_Manager manager,
+ FTC_Scaler scaler,
+ FT_Size *asize );
/*************************************************************************/