From 27a4f9c4ac45ff65f941964f7351b64b1e6a9f35 Mon Sep 17 00:00:00 2001 From: scuri Date: Tue, 20 Oct 2009 17:20:18 +0000 Subject: *** empty log message *** --- src/freetype2/freetype/ftcache.h | 93 +++++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 39 deletions(-) (limited to 'src/freetype2/freetype/ftcache.h') diff --git a/src/freetype2/freetype/ftcache.h b/src/freetype2/freetype/ftcache.h index 721aa16..0916d70 100644 --- a/src/freetype2/freetype/ftcache.h +++ b/src/freetype2/freetype/ftcache.h @@ -4,7 +4,7 @@ /* */ /* FreeType Cache subsystem (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -36,10 +36,10 @@ FT_BEGIN_HEADER * Cache Sub-System * * - * How to cache face, size, and glyph data with FreeType 2. + * How to cache face, size, and glyph data with FreeType~2. * * - * This section describes the FreeType 2 cache sub-system, which is used + * This section describes the FreeType~2 cache sub-system, which is used * to limit the number of concurrently opened @FT_Face and @FT_Size * objects, as well as caching information like character maps and glyph * images while limiting their maximum memory usage. @@ -165,7 +165,7 @@ FT_BEGIN_HEADER * Failure to do so will result in incorrect behaviour or even * memory leaks and crashes. */ - typedef struct FTC_FaceIDRec_* FTC_FaceID; + typedef FT_Pointer FTC_FaceID; /************************************************************************ @@ -193,7 +193,7 @@ FT_BEGIN_HEADER * A new @FT_Face handle. * * - * FreeType error code. 0 means success. + * FreeType error code. 0~means success. * * * The third parameter `req_data' is the same as the one passed by the @@ -260,7 +260,7 @@ FT_BEGIN_HEADER /* */ /* */ /* An opaque handle to a cache node object. Each cache node is */ - /* reference-counted. A node with a count of 0 might be flushed */ + /* reference-counted. A node with a count of~0 might be flushed */ /* out of a full cache whenever a lookup request is performed. */ /* */ /* If you lookup nodes, you have the ability to `acquire' them, i.e., */ @@ -279,19 +279,19 @@ FT_BEGIN_HEADER /* FTC_Manager_New */ /* */ /* */ - /* Creates a new cache manager. */ + /* Create a new cache manager. */ /* */ /* */ /* library :: The parent FreeType library handle to use. */ /* */ /* max_faces :: Maximum number of opened @FT_Face objects managed by */ - /* this cache instance. Use 0 for defaults. */ + /* this cache instance. Use~0 for defaults. */ /* */ /* max_sizes :: Maximum number of opened @FT_Size objects managed by */ - /* this cache instance. Use 0 for defaults. */ + /* this cache instance. Use~0 for defaults. */ /* */ /* max_bytes :: Maximum number of bytes to use for cached data nodes. */ - /* Use 0 for defaults. Note that this value does not */ + /* Use~0 for defaults. Note that this value does not */ /* account for managed @FT_Face and @FT_Size objects. */ /* */ /* requester :: An application-provided callback used to translate */ @@ -301,11 +301,11 @@ FT_BEGIN_HEADER /* each time it is called (see @FTC_Face_Requester). */ /* */ /* */ - /* amanager :: A handle to a new manager object. 0 in case of */ + /* amanager :: A handle to a new manager object. 0~in case of */ /* failure. */ /* */ /* */ - /* FreeType error code. 0 means success. */ + /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FTC_Manager_New( FT_Library library, @@ -323,7 +323,7 @@ FT_BEGIN_HEADER /* FTC_Manager_Reset */ /* */ /* */ - /* Empties a given cache manager. This simply gets rid of all the */ + /* Empty a given cache manager. This simply gets rid of all the */ /* currently cached @FT_Face and @FT_Size objects within the manager. */ /* */ /* */ @@ -339,7 +339,7 @@ FT_BEGIN_HEADER /* FTC_Manager_Done */ /* */ /* */ - /* Destroys a given manager after emptying it. */ + /* Destroy a given manager after emptying it. */ /* */ /* */ /* manager :: A handle to the target cache manager object. */ @@ -354,7 +354,7 @@ FT_BEGIN_HEADER /* FTC_Manager_LookupFace */ /* */ /* */ - /* Retrieves the @FT_Face object that corresponds to a given face ID */ + /* Retrieve the @FT_Face object that corresponds to a given face ID */ /* through a cache manager. */ /* */ /* */ @@ -366,7 +366,7 @@ FT_BEGIN_HEADER /* aface :: A handle to the face object. */ /* */ /* */ - /* FreeType error code. 0 means success. */ + /* FreeType error code. 0~means success. */ /* */ /* */ /* The returned @FT_Face object is always owned by the manager. You */ @@ -415,10 +415,10 @@ FT_BEGIN_HEADER /* interpreted as integer pixel character sizes. */ /* Otherwise, they are expressed as 1/64th of points. */ /* */ - /* x_res :: Only used when `pixel' is value 0 to indicate the */ + /* x_res :: Only used when `pixel' is value~0 to indicate the */ /* horizontal resolution in dpi. */ /* */ - /* y_res :: Only used when `pixel' is value 0 to indicate the */ + /* y_res :: Only used when `pixel' is value~0 to indicate the */ /* vertical resolution in dpi. */ /* */ /* */ @@ -434,7 +434,18 @@ FT_BEGIN_HEADER FT_UInt x_res; FT_UInt y_res; - } FTC_ScalerRec, *FTC_Scaler; + } FTC_ScalerRec; + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_Scaler */ + /* */ + /* */ + /* A handle to an @FTC_ScalerRec structure. */ + /* */ + typedef struct FTC_ScalerRec_* FTC_Scaler; /*************************************************************************/ @@ -455,7 +466,7 @@ FT_BEGIN_HEADER /* asize :: A handle to the size object. */ /* */ /* */ - /* FreeType error code. 0 means success. */ + /* FreeType error code. 0~means success. */ /* */ /* */ /* The returned @FT_Size object is always owned by the manager. You */ @@ -569,7 +580,7 @@ FT_BEGIN_HEADER * A new cache handle. NULL in case of error. * * @return: - * FreeType error code. 0 means success. + * FreeType error code. 0~means success. * * @note: * Like all other caches, this one will be destroyed with the cache @@ -598,13 +609,14 @@ FT_BEGIN_HEADER * The source face ID. * * cmap_index :: - * The index of the charmap in the source face. + * The index of the charmap in the source face. Any negative value + * means to use the cache @FT_Face's default charmap. * * char_code :: * The character code (in the corresponding charmap). * * @return: - * Glyph index. 0 means `no glyph'. + * Glyph index. 0~means `no glyph'. * */ FT_EXPORT( FT_UInt ) @@ -710,7 +722,7 @@ FT_BEGIN_HEADER /* FTC_ImageCache_New */ /* */ /* */ - /* Creates a new glyph image cache. */ + /* Create a new glyph image cache. */ /* */ /* */ /* manager :: The parent manager for the image cache. */ @@ -719,7 +731,7 @@ FT_BEGIN_HEADER /* acache :: A handle to the new glyph image cache object. */ /* */ /* */ - /* FreeType error code. 0 means success. */ + /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FTC_ImageCache_New( FTC_Manager manager, @@ -732,7 +744,7 @@ FT_BEGIN_HEADER /* FTC_ImageCache_Lookup */ /* */ /* */ - /* Retrieves a given glyph image from a glyph image cache. */ + /* Retrieve a given glyph image from a glyph image cache. */ /* */ /* */ /* cache :: A handle to the source glyph image cache. */ @@ -742,7 +754,7 @@ FT_BEGIN_HEADER /* gindex :: The glyph index to retrieve. */ /* */ /* */ - /* aglyph :: The corresponding @FT_Glyph object. 0 in case of */ + /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ /* failure. */ /* */ /* anode :: Used to return the address of of the corresponding cache */ @@ -750,7 +762,7 @@ FT_BEGIN_HEADER /* below). */ /* */ /* */ - /* FreeType error code. 0 means success. */ + /* FreeType error code. 0~means success. */ /* */ /* */ /* The returned glyph is owned and managed by the glyph image cache. */ @@ -795,7 +807,7 @@ FT_BEGIN_HEADER /* gindex :: The glyph index to retrieve. */ /* */ /* */ - /* aglyph :: The corresponding @FT_Glyph object. 0 in case of */ + /* aglyph :: The corresponding @FT_Glyph object. 0~in case of */ /* failure. */ /* */ /* anode :: Used to return the address of of the corresponding */ @@ -803,7 +815,7 @@ FT_BEGIN_HEADER /* (see note below). */ /* */ /* */ - /* FreeType error code. 0 means success. */ + /* FreeType error code. 0~means success. */ /* */ /* */ /* The returned glyph is owned and managed by the glyph image cache. */ @@ -821,6 +833,9 @@ FT_BEGIN_HEADER /* call to one of the caching sub-system APIs. Don't assume that it */ /* is persistent! */ /* */ + /* Calls to @FT_Set_Char_Size and friends have no effect on cached */ + /* glyphs; you should always use the FreeType cache API instead. */ + /* */ FT_EXPORT( FT_Error ) FTC_ImageCache_LookupScaler( FTC_ImageCache cache, FTC_Scaler scaler, @@ -862,11 +877,11 @@ FT_BEGIN_HEADER /* top :: The vertical distance from the pen position (on the */ /* baseline) to the upper bitmap border (a.k.a. `top */ /* side bearing'). The distance is positive for upwards */ - /* Y coordinates. */ + /* y~coordinates. */ /* */ /* format :: The format of the glyph bitmap (monochrome or gray). */ /* */ - /* max_grays :: Maximum gray level value (in the range 1 to 255). */ + /* max_grays :: Maximum gray level value (in the range 1 to~255). */ /* */ /* pitch :: The number of bytes per bitmap line. May be positive */ /* or negative. */ @@ -915,7 +930,7 @@ FT_BEGIN_HEADER /* FTC_SBitCache_New */ /* */ /* */ - /* Creates a new cache to store small glyph bitmaps. */ + /* Create a new cache to store small glyph bitmaps. */ /* */ /* */ /* manager :: A handle to the source cache manager. */ @@ -924,7 +939,7 @@ FT_BEGIN_HEADER /* acache :: A handle to the new sbit cache. NULL in case of error. */ /* */ /* */ - /* FreeType error code. 0 means success. */ + /* FreeType error code. 0~means success. */ /* */ FT_EXPORT( FT_Error ) FTC_SBitCache_New( FTC_Manager manager, @@ -937,7 +952,7 @@ FT_BEGIN_HEADER /* FTC_SBitCache_Lookup */ /* */ /* */ - /* Looks up a given small glyph bitmap in a given sbit cache and */ + /* Look up a given small glyph bitmap in a given sbit cache and */ /* `lock' it to prevent its flushing from the cache until needed. */ /* */ /* */ @@ -955,7 +970,7 @@ FT_BEGIN_HEADER /* below). */ /* */ /* */ - /* FreeType error code. 0 means success. */ + /* FreeType error code. 0~means success. */ /* */ /* */ /* The small bitmap descriptor and its bit buffer are owned by the */ @@ -963,7 +978,7 @@ FT_BEGIN_HEADER /* as well disappear from memory on the next cache lookup, so don't */ /* treat them as persistent data. */ /* */ - /* The descriptor's `buffer' field is set to 0 to indicate a missing */ + /* The descriptor's `buffer' field is set to~0 to indicate a missing */ /* glyph bitmap. */ /* */ /* If `anode' is _not_ NULL, it receives the address of the cache */ @@ -1010,7 +1025,7 @@ FT_BEGIN_HEADER /* (see note below). */ /* */ /* */ - /* FreeType error code. 0 means success. */ + /* FreeType error code. 0~means success. */ /* */ /* */ /* The small bitmap descriptor and its bit buffer are owned by the */ @@ -1018,7 +1033,7 @@ FT_BEGIN_HEADER /* as well disappear from memory on the next cache lookup, so don't */ /* treat them as persistent data. */ /* */ - /* The descriptor's `buffer' field is set to 0 to indicate a missing */ + /* The descriptor's `buffer' field is set to~0 to indicate a missing */ /* glyph bitmap. */ /* */ /* If `anode' is _not_ NULL, it receives the address of the cache */ -- cgit v1.2.3