* include/freetype/ftcache.h, include/freetype/cache/ftcmanag.h: adding FTC_Manager_LookupSize and FTC_Scaler to the public API (they were previously hidden)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
diff --git a/include/freetype/cache/ftcmanag.h b/include/freetype/cache/ftcmanag.h
index ba86800..68eebef 100644
--- a/include/freetype/cache/ftcmanag.h
+++ b/include/freetype/cache/ftcmanag.h
@@ -151,18 +151,6 @@ FT_BEGIN_HEADER
/* */
- 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 && \
@@ -177,12 +165,6 @@ FT_BEGIN_HEADER
(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 );
-
/* */
FT_END_HEADER
diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h
index 6312f06..d6a6abc 100644
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -64,7 +64,7 @@ FT_BEGIN_HEADER
/* */
/* FTC_Manager_New */
/* FTC_Manager_LookupFace */
- /* FTC_Manager_Lookup_Size */
+ /* FTC_Manager_LookupSize */
/* */
/* FTC_Node */
/* FTC_Node_Ref */
@@ -342,7 +342,7 @@ FT_BEGIN_HEADER
/* */
/* 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 */
@@ -356,6 +356,94 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* <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 );
+
+
+ /*************************************************************************/
+ /* */
/* <Function> */
/* FTC_Node_Unref */
/* */