ref: 4b5661c3868134f4fa7c5e2c840e55beed2d26bd
parent: 9d3de385a6ac989223d3c179fd5c78b88a3783b7
author: Werner Lemberg <[email protected]>
date: Thu Oct 27 17:28:35 EDT 2005
* include/freetype/ftsysmem.h, include/freetype/ftsysio.h: Removed. Obsolete. Cleaning up comments to avoid a mix-up of old and new style.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-27 Werner Lemberg <[email protected]>
+
+ * include/freetype/ftsysmem.h, include/freetype/ftsysio.h: Removed.
+ Obsolete.
+
2005-10-25 Werner Lemberg <[email protected]>
* src/sfnt/sfdriver.c (sfnt_interface): Move out
--- a/include/freetype/cache/ftccmap.h
+++ b/include/freetype/cache/ftccmap.h
@@ -4,7 +4,7 @@
/* */
/* FreeType charmap cache (specification). */
/* */
-/* Copyright 2000-2001, 2003 by */
+/* Copyright 2000-2001, 2003, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,57 +29,60 @@
/*************************************************************************/
/* */
/* <Section> */
- /* cache_subsystem */
+ /* cache_subsystem */
/* */
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* @type: */
- /* FTC_CMapCache */
- /* */
- /* @description: */
- /* An opaque handle used to manager a charmap cache. This cache is */
- /* to hold character codes -> glyph indices mappings. */
- /* */
+ /*************************************************************************
+ *
+ * @type:
+ * FTC_CMapCache
+ *
+ * @description:
+ * An opaque handle used to manager a charmap cache. This cache is to
+ * hold character codes -> glyph indices mappings.
+ *
+ */
typedef struct FTC_CMapCacheRec_* FTC_CMapCache;
- /*************************************************************************/
- /* */
- /* @type: */
- /* FTC_CMapDesc */
- /* */
- /* @description: */
- /* A handle to an @FTC_CMapDescRec structure used to describe a given */
- /* charmap in a charmap cache. */
- /* */
- /* Each @FTC_CMapDesc describes which charmap (of which @FTC_FaceID) */
- /* we want to use in @FTC_CMapCache_Lookup. */
- /* */
+ /*************************************************************************
+ *
+ * @type:
+ * FTC_CMapDesc
+ *
+ * @description:
+ * A handle to an @FTC_CMapDescRec structure used to describe a given
+ * charmap in a charmap cache.
+ *
+ * Each @FTC_CMapDesc describes which charmap (of which @FTC_FaceID) we
+ * want to use in @FTC_CMapCache_Lookup.
+ *
+ */
typedef struct FTC_CMapDescRec_* FTC_CMapDesc;
- /*************************************************************************/
- /* */
- /* @enum: */
- /* FTC_CMapType */
- /* */
- /* @description: */
- /* The list of valid @FTC_CMapDesc types. They indicate how we want */
- /* to address a charmap within an @FTC_FaceID. */
- /* */
- /* @values: */
- /* FTC_CMAP_BY_INDEX :: */
- /* Address a charmap by its index in the corresponding @FT_Face. */
- /* */
- /* FTC_CMAP_BY_ENCODING :: */
- /* Use a @FT_Face charmap that corresponds to a given encoding. */
- /* */
- /* FTC_CMAP_BY_ID :: */
- /* Use an @FT_Face charmap that corresponds to a given */
- /* (platform,encoding) ID. See @FTC_CMapIdRec. */
- /* */
+ /*************************************************************************
+ *
+ * @enum:
+ * FTC_CMapType
+ *
+ * @description:
+ * The list of valid @FTC_CMapDesc types. They indicate how we want to
+ * address a charmap within an @FTC_FaceID.
+ *
+ * @values:
+ * FTC_CMAP_BY_INDEX ::
+ * Address a charmap by its index in the corresponding @FT_Face.
+ *
+ * FTC_CMAP_BY_ENCODING ::
+ * Use a @FT_Face charmap that corresponds to a given encoding.
+ *
+ * FTC_CMAP_BY_ID ::
+ * Use an @FT_Face charmap that corresponds to a given
+ * (platform,encoding) ID. See @FTC_CMapIdRec.
+ *
+ */
typedef enum FTC_CMapType_
{
FTC_CMAP_BY_INDEX = 0,
@@ -89,20 +92,23 @@
} FTC_CMapType;
- /*************************************************************************/
- /* */
- /* @struct: */
- /* FTC_CMapIdRec */
- /* */
- /* @description: */
- /* A short structure to identify a charmap by a (platform,encoding) */
- /* pair of values. */
- /* */
- /* @fields: */
- /* platform :: The platform ID. */
- /* */
- /* encoding :: The encoding ID. */
- /* */
+ /*************************************************************************
+ *
+ * @struct:
+ * FTC_CMapIdRec
+ *
+ * @description:
+ * A short structure to identify a charmap by a (platform,encoding) pair
+ * of values.
+ *
+ * @fields:
+ * platform ::
+ * The platform ID.
+ *
+ * encoding ::
+ * The encoding ID.
+ *
+ */
typedef struct FTC_CMapIdRec_
{
FT_UInt platform;
@@ -111,29 +117,34 @@
} FTC_CMapIdRec;
- /*************************************************************************/
- /* */
- /* @struct: */
- /* FTC_CMapDescRec */
- /* */
- /* @description: */
- /* A structure to describe a given charmap to @FTC_CMapCache. */
- /* */
- /* @fields: */
- /* face_id :: @FTC_FaceID of the face this charmap belongs to. */
- /* */
- /* type :: The type of charmap, see @FTC_CMapType. */
- /* */
- /* u.index :: For @FTC_CMAP_BY_INDEX types, this is the charmap */
- /* index (within a @FT_Face) we want to use. */
- /* */
- /* u.encoding :: For @FTC_CMAP_BY_ENCODING types, this is the charmap */
- /* encoding we want to use. see @FT_Encoding. */
- /* */
- /* u.id :: For @FTC_CMAP_BY_ID types, this is the */
- /* (platform,encoding) pair we want to use. see */
- /* @FTC_CMapIdRec and @FT_CharMapRec. */
- /* */
+ /*************************************************************************
+ *
+ * @struct:
+ * FTC_CMapDescRec
+ *
+ * @description:
+ * A structure to describe a given charmap to @FTC_CMapCache.
+ *
+ * @fields:
+ * face_id ::
+ * @FTC_FaceID of the face this charmap belongs to.
+ *
+ * type ::
+ * The type of charmap, see @FTC_CMapType.
+ *
+ * u.index ::
+ * For @FTC_CMAP_BY_INDEX types, this is the charmap index (within a
+ * @FT_Face) we want to use.
+ *
+ * u.encoding ::
+ * For @FTC_CMAP_BY_ENCODING types, this is the charmap encoding we
+ * want to use. see @FT_Encoding.
+ *
+ * u.id ::
+ * For @FTC_CMAP_BY_ID types, this is the (platform,encoding) pair we
+ * want to use. see @FTC_CMapIdRec and @FT_CharMapRec.
+ *
+ */
typedef struct FTC_CMapDescRec_
{
FTC_FaceID face_id;
@@ -150,55 +161,62 @@
} FTC_CMapDescRec;
- /*************************************************************************/
- /* */
- /* @function: */
- /* FTC_CMapCache_New */
- /* */
- /* @description: */
- /* Creates a new charmap cache. */
- /* */
- /* @input: */
- /* manager :: A handle to the cache manager. */
- /* */
- /* @output: */
- /* acache :: A new cache handle. NULL in case of error. */
- /* */
- /* @return: */
- /* FreeType error code. 0 means success. */
- /* */
- /* @note: */
- /* Like all other caches, this one will be destroyed with the cache */
- /* manager. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FTC_CMapCache_New
+ *
+ * @description:
+ * Creates a new charmap cache.
+ *
+ * @input:
+ * manager ::
+ * A handle to the cache manager.
+ *
+ * @output:
+ * acache ::
+ * A new cache handle. NULL in case of error.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * Like all other caches, this one will be destroyed with the cache
+ * manager.
+ *
+ */
FT_EXPORT( FT_Error )
FTC_CMapCache_New( FTC_Manager manager,
FTC_CMapCache *acache );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FTC_CMapCache_Lookup */
- /* */
- /* @description: */
- /* Translates a character code into a glyph index, using the charmap */
- /* cache. */
- /* */
- /* @input: */
- /* cache :: A charmap cache handle. */
- /* */
- /* cmap_desc :: A charmap descriptor handle. */
- /* */
- /* char_code :: The character code (in the corresponding charmap). */
- /* */
- /* @return: */
- /* Glyph index. 0 means "no glyph". */
- /* */
- /* @note: */
- /* This function doesn't return @FTC_Node handles, since there is no */
- /* real use for them with typical uses of charmaps. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FTC_CMapCache_Lookup
+ *
+ * @description:
+ * Translates a character code into a glyph index, using the charmap
+ * cache.
+ *
+ * @input:
+ * cache ::
+ * A charmap cache handle.
+ *
+ * cmap_desc ::
+ * A charmap descriptor handle.
+ *
+ * char_code ::
+ * The character code (in the corresponding charmap).
+ *
+ * @return:
+ * Glyph index. 0 means `no glyph'.
+ *
+ * @note:
+ * This function doesn't return @FTC_Node handles, since there is no
+ * real use for them with typical uses of charmaps.
+ *
+ */
FT_EXPORT( FT_UInt )
FTC_CMapCache_Lookup( FTC_CMapCache cache,
FTC_CMapDesc cmap_desc,
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -96,58 +96,62 @@
/* configuration files */
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_CONFIG_CONFIG_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* FreeType 2 configuration data. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CONFIG_CONFIG_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * FreeType 2 configuration data.
+ *
+ */
#ifndef FT_CONFIG_CONFIG_H
#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h>
#endif
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_CONFIG_STANDARD_LIBRARY_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* FreeType 2 configuration data. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CONFIG_STANDARD_LIBRARY_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * FreeType 2 interface to the standard C library functions.
+ *
+ */
#ifndef FT_CONFIG_STANDARD_LIBRARY_H
#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h>
#endif
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_CONFIG_OPTIONS_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* FreeType 2 project-specific configuration options. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CONFIG_OPTIONS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing
+ * FreeType 2 project-specific configuration options.
+ *
+ */
#ifndef FT_CONFIG_OPTIONS_H
#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h>
#endif
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_CONFIG_MODULES_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the list of FreeType 2 modules that are statically linked to new */
- /* library instances in @FT_Init_FreeType. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CONFIG_MODULES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * list of FreeType 2 modules that are statically linked to new library
+ * instances in @FT_Init_FreeType.
+ *
+ */
#ifndef FT_CONFIG_MODULES_H
#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h>
#endif
@@ -155,419 +159,447 @@
/* public headers */
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_FREETYPE_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the base FreeType 2 API. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_FREETYPE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * base FreeType 2 API.
+ *
+ */
#define FT_FREETYPE_H <freetype/freetype.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_ERRORS_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the list of FreeType 2 error codes (and messages). */
- /* */
- /* It is included by @FT_FREETYPE_H. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_ERRORS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * list of FreeType 2 error codes (and messages).
+ *
+ * It is included by @FT_FREETYPE_H.
+ *
+ */
#define FT_ERRORS_H <freetype/fterrors.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_MODULE_ERRORS_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the list of FreeType 2 module error offsets (and messages). */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_MODULE_ERRORS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * list of FreeType 2 module error offsets (and messages).
+ *
+ */
#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_SYSTEM_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the FreeType 2 interface to low-level operations (i.e. memory */
- /* management and stream i/o). */
- /* */
- /* It is included by @FT_FREETYPE_H. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_SYSTEM_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * FreeType 2 interface to low-level operations (i.e., memory management
+ * and stream i/o).
+ *
+ * It is included by @FT_FREETYPE_H.
+ *
+ */
#define FT_SYSTEM_H <freetype/ftsystem.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_IMAGE_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* types definitions related to glyph images (i.e. bitmaps, outlines, */
- /* scan-converter parameters). */
- /* */
- /* It is included by @FT_FREETYPE_H. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IMAGE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing types
+ * definitions related to glyph images (i.e., bitmaps, outlines,
+ * scan-converter parameters).
+ *
+ * It is included by @FT_FREETYPE_H.
+ *
+ */
#define FT_IMAGE_H <freetype/ftimage.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_TYPES_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the basic data types defined by FreeType 2. */
- /* */
- /* It is included by @FT_FREETYPE_H. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TYPES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * basic data types defined by FreeType 2.
+ *
+ * It is included by @FT_FREETYPE_H.
+ *
+ */
#define FT_TYPES_H <freetype/fttypes.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_LIST_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the list management API of FreeType 2. */
- /* */
- /* (Most applications will never need to include this file.) */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_LIST_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * list management API of FreeType 2.
+ *
+ * (Most applications will never need to include this file.)
+ *
+ */
#define FT_LIST_H <freetype/ftlist.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_OUTLINE_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the scalable outline management API of FreeType 2. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_OUTLINE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * scalable outline management API of FreeType 2.
+ *
+ */
#define FT_OUTLINE_H <freetype/ftoutln.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_SIZES_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the API used to manage multiple @FT_Size objects per face. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_SIZES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * API used to manage multiple @FT_Size objects per face.
+ *
+ */
#define FT_SIZES_H <freetype/ftsizes.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_MODULE_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the module management API of FreeType 2. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_MODULE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * module management API of FreeType 2.
+ *
+ */
#define FT_MODULE_H <freetype/ftmodapi.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_RENDER_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the renderer module management API of FreeType 2. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_RENDER_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * renderer module management API of FreeType 2.
+ *
+ */
#define FT_RENDER_H <freetype/ftrender.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_TYPE1_TABLES_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the types and API specific to the Type 1 format. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TYPE1_TABLES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * types and API specific to the Type 1 format.
+ *
+ */
#define FT_TYPE1_TABLES_H <freetype/t1tables.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_TRUETYPE_IDS_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the enumeration values used to identify name strings, languages, */
- /* encodings, etc. This file really contains a _large_ set of */
- /* constant macro definitions, taken from the TrueType and OpenType */
- /* specifications. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TRUETYPE_IDS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * enumeration values used to identify name strings, languages,
+ * encodings, etc. This file really contains a _large_ set of constant
+ * macro definitions, taken from the TrueType and OpenType
+ * specifications.
+ *
+ */
#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_TRUETYPE_TABLES_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the types and API specific to the TrueType (as well as OpenType) */
- /* format. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TRUETYPE_TABLES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * types and API specific to the TrueType (as well as OpenType) format.
+ *
+ */
#define FT_TRUETYPE_TABLES_H <freetype/tttables.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_TRUETYPE_TAGS_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the definitions of TrueType 4-byte `tags' used to identify blocks */
- /* in SFNT-based font formats (i.e. TrueType and OpenType). */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_TRUETYPE_TAGS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of TrueType 4-byte `tags' used to identify blocks in
+ * SFNT-based font formats (i.e., TrueType and OpenType).
+ *
+ */
#define FT_TRUETYPE_TAGS_H <freetype/tttags.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_BDF_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the definitions of an API to access BDF-specific strings from a */
- /* face. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_BDF_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API to access BDF-specific strings from a face.
+ *
+ */
#define FT_BDF_H <freetype/ftbdf.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_GZIP_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the definitions of an API to support for gzip-compressed files. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_GZIP_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API to support for gzip-compressed files.
+ *
+ */
#define FT_GZIP_H <freetype/ftgzip.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_LZW_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the definitions of an API to support for LZW-compressed files. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_LZW_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API to support for LZW-compressed files.
+ *
+ */
#define FT_LZW_H <freetype/ftlzw.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_WINFONTS_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the definitions of an API to support Windows .FNT files */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_WINFONTS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * definitions of an API to support Windows FNT files.
+ *
+ */
#define FT_WINFONTS_H <freetype/ftwinfnt.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_GLYPH_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the API of the optional glyph management component. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_GLYPH_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * API of the optional glyph management component.
+ *
+ */
#define FT_GLYPH_H <freetype/ftglyph.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_BITMAP_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the API of the optional bitmap conversion component. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_BITMAP_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * API of the optional bitmap conversion component.
+ *
+ */
#define FT_BITMAP_H <freetype/ftbitmap.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_BBOX_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the API of the optional exact bounding box computation routines. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_BBOX_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * API of the optional exact bounding box computation routines.
+ *
+ */
#define FT_BBOX_H <freetype/ftbbox.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_CACHE_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the API of the optional FreeType 2 cache sub-system. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CACHE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * API of the optional FreeType 2 cache sub-system.
+ *
+ */
#define FT_CACHE_H <freetype/ftcache.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_CACHE_IMAGE_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the `glyph image' API of the FreeType 2 cache sub-system. */
- /* */
- /* It is used to define a cache for @FT_Glyph elements. You can also */
- /* see the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need */
- /* to store small glyph bitmaps, as it will use less memory. */
- /* */
- /* This macro is deprecated. Simply include @FT_CACHE_H to have all */
- /* glyph image-related cache declarations. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CACHE_IMAGE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * `glyph image' API of the FreeType 2 cache sub-system.
+ *
+ * It is used to define a cache for @FT_Glyph elements. You can also
+ * see the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need to
+ * store small glyph bitmaps, as it will use less memory.
+ *
+ * This macro is deprecated. Simply include @FT_CACHE_H to have all
+ * glyph image-related cache declarations.
+ *
+ */
#define FT_CACHE_IMAGE_H FT_CACHE_H
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_CACHE_SMALL_BITMAPS_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the `small bitmaps' API of the FreeType 2 cache sub-system. */
- /* */
- /* It is used to define a cache for small glyph bitmaps in a */
- /* relatively memory-efficient way. You can also use the API defined */
- /* in @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, */
- /* including scalable outlines. */
- /* */
- /* This macro is deprecated. Simply include @FT_CACHE_H to have all */
- /* small bitmaps-related cache declarations. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CACHE_SMALL_BITMAPS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * `small bitmaps' API of the FreeType 2 cache sub-system.
+ *
+ * It is used to define a cache for small glyph bitmaps in a relatively
+ * memory-efficient way. You can also use the API defined in
+ * @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images,
+ * including scalable outlines.
+ *
+ * This macro is deprecated. Simply include @FT_CACHE_H to have all
+ * small bitmaps-related cache declarations.
+ *
+ */
#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_CACHE_CHARMAP_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the `charmap' API of the FreeType 2 cache sub-system. */
- /* */
- /* This macro is deprecated. Simply include @FT_CACHE_H to have all */
- /* charmap-based cache declarations. */
- /* */
-#define FT_CACHE_CHARMAP_H FT_CACHE_H
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_CACHE_CHARMAP_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * `charmap' API of the FreeType 2 cache sub-system.
+ *
+ * This macro is deprecated. Simply include @FT_CACHE_H to have all
+ * charmap-based cache declarations.
+ *
+ */
+#define FT_CACHE_CHARMAP_H FT_CACHE_H
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_MAC_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the Macintosh-specific FreeType 2 API. The latter is used to */
- /* access fonts embedded in resource forks. */
- /* */
- /* This header file must be explicitly included by client */
- /* applications compiled on the Mac (note that the base API still */
- /* works though). */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_MAC_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * Macintosh-specific FreeType 2 API. The latter is used to access
+ * fonts embedded in resource forks.
+ *
+ * This header file must be explicitly included by client applications
+ * compiled on the Mac (note that the base API still works though).
+ *
+ */
#define FT_MAC_H <freetype/ftmac.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_MULTIPLE_MASTERS_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the optional multiple-masters management API of FreeType 2. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_MULTIPLE_MASTERS_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * optional multiple-masters management API of FreeType 2.
+ *
+ */
#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_SFNT_NAMES_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the optional FreeType 2 API used to access embedded `name' strings */
- /* in SFNT-based font formats (i.e. TrueType and OpenType). */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_SFNT_NAMES_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * optional FreeType 2 API used to access embedded `name' strings in
+ * SFNT-based font formats (i.e., TrueType and OpenType).
+ *
+ */
#define FT_SFNT_NAMES_H <freetype/ftsnames.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_OPENTYPE_VALIDATE_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the optional FreeType 2 API used to validate OpenType tables */
- /* (BASE, GDEF, GPOS, GSUB, JSTF). */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_OPENTYPE_VALIDATE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * optional FreeType 2 API used to validate OpenType tables (BASE, GDEF,
+ * GPOS, GSUB, JSTF).
+ *
+ */
#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h>
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_GX_VALIDATE_H */
- /* */
- /* @description: */
- /* A macro used in #include statements to name the file containing */
- /* the optional FreeType 2 API used to validate TrueTypeGX/AAT tables */
- /* (feat, mort, morx, bsln, just, kern, opbd, trak, prop). */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_GX_VALIDATE_H
+ *
+ * @description:
+ * A macro used in #include statements to name the file containing the
+ * optional FreeType 2 API used to validate TrueTypeGX/AAT tables (feat,
+ * mort, morx, bsln, just, kern, opbd, trak, prop).
+ *
+ */
#define FT_GX_VALIDATE_H <freetype/ftgxval.h>
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1087,148 +1087,157 @@
/* */
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_HAS_HORIZONTAL( face ) */
- /* */
- /* @description: */
- /* A macro that returns true whenever a face object contains */
- /* horizontal metrics (this is true for all font formats though). */
- /* */
- /* @also: */
- /* @FT_HAS_VERTICAL can be used to check for vertical metrics. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_HORIZONTAL( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains
+ * horizontal metrics (this is true for all font formats though).
+ *
+ * @also:
+ * @FT_HAS_VERTICAL can be used to check for vertical metrics.
+ *
+ */
#define FT_HAS_HORIZONTAL( face ) \
( face->face_flags & FT_FACE_FLAG_HORIZONTAL )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_HAS_VERTICAL( face ) */
- /* */
- /* @description: */
- /* A macro that returns true whenever a face object contains vertical */
- /* metrics. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_VERTICAL( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains vertical
+ * metrics.
+ *
+ */
#define FT_HAS_VERTICAL( face ) \
( face->face_flags & FT_FACE_FLAG_VERTICAL )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_HAS_KERNING( face ) */
- /* */
- /* @description: */
- /* A macro that returns true whenever a face object contains kerning */
- /* data that can be accessed with @FT_Get_Kerning. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_KERNING( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains kerning
+ * data that can be accessed with @FT_Get_Kerning.
+ *
+ */
#define FT_HAS_KERNING( face ) \
( face->face_flags & FT_FACE_FLAG_KERNING )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_IS_SCALABLE( face ) */
- /* */
- /* @description: */
- /* A macro that returns true whenever a face object contains a */
- /* scalable font face (true for TrueType, Type 1, CID, and */
- /* OpenType/CFF font formats. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IS_SCALABLE( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains a scalable
+ * font face (true for TrueType, Type 1, CID, and OpenType/CFF font
+ * formats.
+ *
+ */
#define FT_IS_SCALABLE( face ) \
( face->face_flags & FT_FACE_FLAG_SCALABLE )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_IS_SFNT( face ) */
- /* */
- /* @description: */
- /* A macro that returns true whenever a face object contains a font */
- /* whose format is based on the SFNT storage scheme. This usually */
- /* means: TrueType fonts, OpenType fonts, as well as SFNT-based */
- /* embedded bitmap fonts. */
- /* */
- /* If this macro is true, all functions defined in @FT_SFNT_NAMES_H */
- /* and @FT_TRUETYPE_TABLES_H are available. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IS_SFNT( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains a font
+ * whose format is based on the SFNT storage scheme. This usually
+ * means: TrueType fonts, OpenType fonts, as well as SFNT-based embedded
+ * bitmap fonts.
+ *
+ * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and
+ * @FT_TRUETYPE_TABLES_H are available.
+ *
+ */
#define FT_IS_SFNT( face ) \
( face->face_flags & FT_FACE_FLAG_SFNT )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_IS_FIXED_WIDTH( face ) */
- /* */
- /* @description: */
- /* A macro that returns true whenever a face object contains a font */
- /* face that contains fixed-width (or "monospace", "fixed-pitch", */
- /* etc.) glyphs. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_IS_FIXED_WIDTH( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains a font face
+ * that contains fixed-width (or `monospace', `fixed-pitch', etc.)
+ * glyphs.
+ *
+ */
#define FT_IS_FIXED_WIDTH( face ) \
( face->face_flags & FT_FACE_FLAG_FIXED_WIDTH )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_HAS_FIXED_SIZES( face ) */
- /* */
- /* @description: */
- /* A macro that returns true whenever a face object contains some */
- /* embedded bitmaps. See the `available_sizes' field of the */
- /* @FT_FaceRec structure. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_FIXED_SIZES( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains some
+ * embedded bitmaps. See the `available_sizes' field of the
+ * @FT_FaceRec structure.
+ *
+ */
#define FT_HAS_FIXED_SIZES( face ) \
( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
- /* */
+ /* */
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_HAS_FAST_GLYPHS( face ) */
- /* */
- /* @description: */
- /* Deprecated; indicates that the face contains so-called "fast" */
- /* glyph bitmaps. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_FAST_GLYPHS( face )
+ *
+ * @description:
+ * Deprecated; indicates that the face contains so-called `fast' glyph
+ * bitmaps.
+ *
+ */
#define FT_HAS_FAST_GLYPHS( face ) \
( face->face_flags & FT_FACE_FLAG_FAST_GLYPHS )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_HAS_GLYPH_NAMES( face ) */
- /* */
- /* @description: */
- /* A macro that returns true whenever a face object contains some */
- /* glyph names that can be accessed through @FT_Get_Glyph_Name. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_GLYPH_NAMES( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains some glyph
+ * names that can be accessed through @FT_Get_Glyph_Name.
+ *
+ */
#define FT_HAS_GLYPH_NAMES( face ) \
( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_HAS_MULTIPLE_MASTERS( face ) */
- /* */
- /* @description: */
- /* A macro that returns true whenever a face object contains some */
- /* multiple masters. The functions provided by */
- /* @FT_MULTIPLE_MASTERS_H are then available to choose the exact */
- /* design you want. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_HAS_MULTIPLE_MASTERS( face )
+ *
+ * @description:
+ * A macro that returns true whenever a face object contains some
+ * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H
+ * are then available to choose the exact design you want.
+ *
+ */
#define FT_HAS_MULTIPLE_MASTERS( face ) \
( face->face_flags & FT_FACE_FLAG_MULTIPLE_MASTERS )
@@ -2770,21 +2779,23 @@
FT_CharMap charmap );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Get_Charmap_Index */
- /* */
- /* @description: */
- /* Retrieve index of a given charmap. */
- /* */
- /* @input: */
- /* charmap :: A handle to a charmap. */
- /* */
- /* @return: */
- /* The index into the array of character maps within the face to */
- /* which `charmap' belongs. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Get_Charmap_Index
+ *
+ * @description:
+ * Retrieve index of a given charmap.
+ *
+ * @input:
+ * charmap ::
+ * A handle to a charmap.
+ *
+ * @return:
+ * The index into the array of character maps within the face to which
+ * `charmap' belongs.
+ *
+ */
FT_EXPORT( FT_Int )
FT_Get_Charmap_Index( FT_CharMap charmap );
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -473,65 +473,74 @@
/* */
/*************************************************************************/
- /************************************************************************
+ /*************************************************************************
*
* @type:
- * FTC_CMapCache
+ * FTC_CMapCache
*
* @description:
- * An opaque handle used to manager a charmap cache. This cache is
- * to hold character codes -> glyph indices mappings.
+ * An opaque handle used to manager a charmap cache. This cache is to
+ * hold character codes -> glyph indices mappings.
+ *
*/
typedef struct FTC_CMapCacheRec_* FTC_CMapCache;
- /*************************************************************************/
- /* */
- /* @function: */
- /* FTC_CMapCache_New */
- /* */
- /* @description: */
- /* Create a new charmap cache. */
- /* */
- /* @input: */
- /* manager :: A handle to the cache manager. */
- /* */
- /* @output: */
- /* acache :: A new cache handle. NULL in case of error. */
- /* */
- /* @return: */
- /* FreeType error code. 0 means success. */
- /* */
- /* @note: */
- /* Like all other caches, this one will be destroyed with the cache */
- /* manager. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FTC_CMapCache_New
+ *
+ * @description:
+ * Create a new charmap cache.
+ *
+ * @input:
+ * manager ::
+ * A handle to the cache manager.
+ *
+ * @output:
+ * acache ::
+ * A new cache handle. NULL in case of error.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * Like all other caches, this one will be destroyed with the cache
+ * manager.
+ *
+ */
FT_EXPORT( FT_Error )
FTC_CMapCache_New( FTC_Manager manager,
FTC_CMapCache *acache );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FTC_CMapCache_Lookup */
- /* */
- /* @description: */
- /* Translate a character code into a glyph index, using the charmap */
- /* cache. */
- /* */
- /* @input: */
- /* cache :: A charmap cache handle. */
- /* */
- /* face_id :: The source face ID. */
- /* */
- /* cmap_index :: The index of the charmap in the source face. */
- /* */
- /* char_code :: The character code (in the corresponding charmap). */
- /* */
- /* @return: */
- /* Glyph index. 0 means `no glyph'. */
- /* */
+ /************************************************************************
+ *
+ * @function:
+ * FTC_CMapCache_Lookup
+ *
+ * @description:
+ * Translate a character code into a glyph index, using the charmap
+ * cache.
+ *
+ * @input:
+ * cache ::
+ * A charmap cache handle.
+ *
+ * face_id ::
+ * The source face ID.
+ *
+ * cmap_index ::
+ * The index of the charmap in the source face.
+ *
+ * char_code ::
+ * The character code (in the corresponding charmap).
+ *
+ * @return:
+ * Glyph index. 0 means `no glyph'.
+ *
+ */
FT_EXPORT( FT_UInt )
FTC_CMapCache_Lookup( FTC_CMapCache cache,
FTC_FaceID face_id,
@@ -559,10 +568,10 @@
typedef struct FTC_ImageTypeRec_
{
- FTC_FaceID face_id;
- FT_Int width;
- FT_Int height;
- FT_Int32 flags;
+ FTC_FaceID face_id;
+ FT_Int width;
+ FT_Int height;
+ FT_Int32 flags;
} FTC_ImageTypeRec;
--- a/include/freetype/ftsysio.h
+++ /dev/null
@@ -1,195 +1,0 @@
-#ifndef __FT_SYSTEM_IO_H__
-#define __FT_SYSTEM_IO_H__
-
- /************************************************************************/
- /************************************************************************/
- /***** *****/
- /***** NOTE: THE CONTENT OF THIS FILE IS NOT CURRENTLY USED *****/
- /***** IN NORMAL BUILDS. CONSIDER IT EXPERIMENTAL. *****/
- /***** *****/
- /************************************************************************/
- /************************************************************************/
-
-
- /********************************************************************
- *
- * designing custom streams is a bit different now
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- */
-
-#include <ft2build.h>
-#include FT_INTERNAL_OBJECT_H
-
-FT_BEGIN_HEADER
-
- /*@*******************************************************************
- *
- * @type: FT_Stream
- *
- * @description:
- * handle to an input stream object. These are also @FT_Object handles
- */
- typedef struct FT_StreamRec_* FT_Stream;
-
-
- /*@*******************************************************************
- *
- * @type: FT_Stream_Class
- *
- * @description:
- * opaque handle to a @FT_Stream_ClassRec class structure describing
- * the methods of input streams
- */
- typedef const struct FT_Stream_ClassRec_* FT_Stream_Class;
-
-
- /*@*******************************************************************
- *
- * @functype: FT_Stream_ReadFunc
- *
- * @description:
- * a method used to read bytes from an input stream into memory
- *
- * @input:
- * stream :: target stream handle
- * buffer :: target buffer address
- * size :: number of bytes to read
- *
- * @return:
- * number of bytes effectively read. Must be <= 'size'.
- */
- typedef FT_ULong (*FT_Stream_ReadFunc)( FT_Stream stream,
- FT_Byte* buffer,
- FT_ULong size );
-
-
- /*@*******************************************************************
- *
- * @functype: FT_Stream_SeekFunc
- *
- * @description:
- * a method used to seek to a new position within a stream
- *
- * @input:
- * stream :: target stream handle
- * pos :: new read position, from start of stream
- *
- * @return:
- * error code. 0 means success
- */
- typedef FT_Error (*FT_Stream_SeekFunc)( FT_Stream stream,
- FT_ULong pos );
-
-
- /*@*******************************************************************
- *
- * @struct: FT_Stream_ClassRec
- *
- * @description:
- * a structure used to describe an input stream class
- *
- * @input:
- * clazz :: root @FT_ClassRec fields
- * stream_read :: stream byte read method
- * stream_seek :: stream seek method
- */
- typedef struct FT_Stream_ClassRec_
- {
- FT_ClassRec clazz;
- FT_Stream_ReadFunc stream_read;
- FT_Stream_SeekFunc stream_seek;
-
- } FT_Stream_ClassRec;
-
- /* */
-
-#define FT_STREAM_CLASS(x) ((FT_Stream_Class)(x))
-#define FT_STREAM_CLASS__READ(x) FT_STREAM_CLASS(x)->stream_read
-#define FT_STREAM_CLASS__SEEK(x) FT_STREAM_CLASS(x)->stream_seek;
-
- /*@*******************************************************************
- *
- * @struct: FT_StreamRec
- *
- * @description:
- * the input stream object structure. See @FT_Stream_ClassRec for
- * its class descriptor
- *
- * @fields:
- * object :: root @FT_ObjectRec fields
- * size :: size of stream in bytes (0 if unknown)
- * pos :: current position within stream
- * base :: for memory-based streams, the address of the stream's
- * first data byte in memory. NULL otherwise
- *
- * cursor :: the current cursor position within an input stream
- * frame. Only valid within a FT_FRAME_ENTER .. FT_FRAME_EXIT
- * block; NULL otherwise
- *
- * limit :: the current frame limit within a FT_FRAME_ENTER ..
- * FT_FRAME_EXIT block. NULL otherwise
- */
- typedef struct FT_StreamRec_
- {
- FT_ObjectRec object;
- FT_ULong size;
- FT_ULong pos;
- const FT_Byte* base;
- const FT_Byte* cursor;
- const FT_Byte* limit;
-
- } FT_StreamRec;
-
- /* some useful macros */
-#define FT_STREAM(x) ((FT_Stream)(x))
-#define FT_STREAM_P(x) ((FT_Stream*)(x))
-
-#define FT_STREAM__READ(x) FT_STREAM_CLASS__READ(FT_OBJECT__CLASS(x))
-#define FT_STREAM__SEEK(x) FT_STREAM_CLASS__SEEK(FT_OBJECT__CLASS(x))
-
-#define FT_STREAM_IS_BASED(x) ( FT_STREAM(x)->base != NULL )
-
- /* */
-
- /* create new memory-based stream */
- FT_BASE( FT_Error ) ft_stream_new_memory( const FT_Byte* stream_base,
- FT_ULong stream_size,
- FT_Memory memory,
- FT_Stream *astream );
-
- FT_BASE( FT_Error ) ft_stream_new_iso( const char* pathanme,
- FT_Memory memory,
- FT_Stream *astream );
-
-
- /* handle to default stream class implementation for a given build */
- /* this is used by "FT_New_Face" */
- /* */
- FT_APIVAR( FT_Type ) ft_stream_default_type;
-
-FT_END_HEADER
-
-#endif /* __FT_SYSTEM_STREAM_H__ */
--- a/include/freetype/ftsysmem.h
+++ /dev/null
@@ -1,202 +1,0 @@
-#ifndef __FT_SYSTEM_MEMORY_H__
-#define __FT_SYSTEM_MEMORY_H__
-
-#include <ft2build.h>
-
-FT_BEGIN_HEADER
-
- /************************************************************************/
- /************************************************************************/
- /***** *****/
- /***** NOTE: THE CONTENT OF THIS FILE IS NOT CURRENTLY USED *****/
- /***** IN NORMAL BUILDS. CONSIDER IT EXPERIMENTAL. *****/
- /***** *****/
- /************************************************************************/
- /************************************************************************/
-
-
- /*@**********************************************************************
- *
- * @type: FT_Memory
- *
- * @description:
- * opaque handle to a memory manager handle. Note that since FreeType
- * 2.2, the memory manager structure FT_MemoryRec is hidden to client
- * applications.
- *
- * however, you can still define custom allocators easily using the
- * @ft_memory_new API
- */
- typedef struct FT_MemoryRec_* FT_Memory;
-
-
- /*@**********************************************************************
- *
- * @functype: FT_Memory_AllocFunc
- *
- * @description:
- * a function used to allocate a block of memory.
- *
- * @input:
- * size :: size of blocks in bytes. Always > 0 !!
- * mem_data :: memory-manager specific optional argument
- * (see @ft_memory_new)
- *
- * @return:
- * address of new block. NULL in case of memory exhaustion
- */
- typedef FT_Pointer (*FT_Memory_AllocFunc)( FT_ULong size,
- FT_Pointer mem_data );
-
-
- /*@**********************************************************************
- *
- * @functype: FT_Memory_FreeFunc
- *
- * @description:
- * a function used to release a block of memory created through
- * @FT_Memory_AllocFunc or @FT_Memory_ReallocFunc
- *
- * @input:
- * block :: address of target memory block. cannot be NULL !!
- * mem_data :: memory-manager specific optional argument
- * (see @ft_memory_new)
- */
- typedef void (*FT_Memory_FreeFunc) ( FT_Pointer block,
- FT_Pointer mem_data );
-
-
- /*@**********************************************************************
- *
- * @functype: FT_Memory_ReallocFunc
- *
- * @description:
- * a function used to reallocate a memory block.
- *
- * @input:
- * block :: address of target memory block. cannot be NULL !!
- * new_size :: new requested size in bytes
- * cur_size :: current block size in bytes
- * mem_data :: memory-manager specific optional argument
- * (see @ft_memory_new)
- */
- typedef FT_Pointer (*FT_Memory_ReallocFunc)( FT_Pointer block,
- FT_ULong new_size,
- FT_ULong cur_size,
- FT_Pointer mem_data );
-
-
- /*@**********************************************************************
- *
- * @functype: FT_Memory_CreateFunc
- *
- * @description:
- * a function used to create a @FT_Memory object to model a
- * memory manager
- *
- * @input:
- * size :: size of memory manager structure in bytes
- * init_data :: optional initialisation argument
- *
- * @output:
- * amem_data :: memory-manager specific argument to block management
- * routines.
- *
- * @return:
- * handle to new memory manager object. NULL in case of failure
- */
- typedef FT_Pointer (*FT_Memory_CreateFunc)( FT_UInt size,
- FT_Pointer init_data,
- FT_Pointer *amem_data );
-
-
- /*@**********************************************************************
- *
- * @functype: FT_Memory_DestroyFunc
- *
- * @description:
- * a function used to destroy a given @FT_Memory manager
- *
- * @input:
- * memory :: target memory manager handle
- * mem_data :: option manager-specific argument
- */
- typedef void (*FT_Memory_DestroyFunc)( FT_Memory memory,
- FT_Pointer mem_data );
-
-
- /*@**********************************************************************
- *
- * @struct: FT_Memory_FuncsRec
- *
- * @description:
- * a function used to hold all methods of a given memory manager
- * implementation.
- *
- * @fields:
- * mem_alloc :: block allocation routine
- * mem_free :: block release routine
- * mem_realloc :: block re-allocation routine
- * mem_create :: manager creation routine
- * mem_destroy :: manager destruction routine
- */
- typedef struct FT_Memory_FuncsRec_
- {
- FT_Memory_AllocFunc mem_alloc;
- FT_Memory_FreeFunc mem_free;
- FT_Memory_ReallocFunc mem_realloc;
- FT_Memory_CreateFunc mem_create;
- FT_Memory_DestroyFunc mem_destroy;
-
- } FT_Memory_FuncsRec, *FT_Memory_Funcs;
-
-
- /*@**********************************************************************
- *
- * @type: FT_Memory_Funcs
- *
- * @description:
- * a pointer to a constant @FT_Memory_FuncsRec structure used to
- * describe a given memory manager implementation.
- */
- typedef const FT_Memory_FuncsRec* FT_Memory_Funcs;
-
-
- /*@**********************************************************************
- *
- * @function: ft_memory_new
- *
- * @description:
- * create a new memory manager, given a set of memory methods
- *
- * @input:
- * mem_funcs :: handle to memory manager implementation descriptor
- * mem_init_data :: optional initialisation argument, passed to
- * @FT_Memory_CreateFunc
- *
- * @return:
- * new memory manager handle. NULL in case of failure
- */
- FT_BASE( FT_Memory )
- ft_memory_new( FT_Memory_Funcs mem_funcs,
- FT_Pointer mem_init_data );
-
-
- /*@**********************************************************************
- *
- * @function: ft_memory_destroy
- *
- * @description:
- * destroy a given memory manager
- *
- * @input:
- * memory :: handle to target memory manager
- */
- FT_BASE( void )
- ft_memory_destroy( FT_Memory memory );
-
-/* */
-
-FT_END_HEADER
-
-#endif /* __FT_SYSTEM_MEMORY_H__ */
--- a/include/freetype/ftsystem.h
+++ b/include/freetype/ftsystem.h
@@ -4,7 +4,7 @@
/* */
/* FreeType low-level system interface definition (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,19 +29,19 @@
/*************************************************************************/
/* */
/* <Section> */
- /* system_interface */
+ /* system_interface */
/* */
/* <Title> */
- /* System Interface */
+ /* System Interface */
/* */
/* <Abstract> */
- /* How FreeType manages memory and i/o. */
+ /* How FreeType manages memory and i/o. */
/* */
/* <Description> */
- /* This section contains various definitions related to memory */
- /* management and i/o access. You need to understand this */
- /* information if you want to use a custom memory manager or you own */
- /* input i/o streams. */
+ /* This section contains various definitions related to memory */
+ /* management and i/o access. You need to understand this */
+ /* information if you want to use a custom memory manager or you own */
+ /* input i/o streams. */
/* */
/*************************************************************************/
@@ -53,80 +53,92 @@
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* @type: */
- /* FT_Memory */
- /* */
- /* @description: */
- /* A handle to a given memory manager object, defined with a */
- /* @FT_MemoryRec structure. */
- /* */
+ /*************************************************************************
+ *
+ * @type:
+ * FT_Memory
+ *
+ * @description:
+ * A handle to a given memory manager object, defined with a
+ * @FT_MemoryRec structure.
+ *
+ */
typedef struct FT_MemoryRec_* FT_Memory;
- /*************************************************************************/
- /* */
- /* @functype: */
- /* FT_Alloc_Func */
- /* */
- /* @description: */
- /* A function used to allocate `size' bytes from `memory'. */
- /* */
- /* @input: */
- /* memory :: A handle to the source memory manager. */
- /* */
- /* size :: The size in bytes to allocate. */
- /* */
- /* @return: */
- /* Address of new memory block. 0 in case of failure. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * FT_Alloc_Func
+ *
+ * @description:
+ * A function used to allocate `size' bytes from `memory'.
+ *
+ * @input:
+ * memory ::
+ * A handle to the source memory manager.
+ *
+ * size ::
+ * The size in bytes to allocate.
+ *
+ * @return:
+ * Address of new memory block. 0 in case of failure.
+ *
+ */
typedef void*
(*FT_Alloc_Func)( FT_Memory memory,
long size );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* FT_Free_Func */
- /* */
- /* @description: */
- /* A function used to release a given block of memory. */
- /* */
- /* @input: */
- /* memory :: A handle to the source memory manager. */
- /* */
- /* block :: The address of the target memory block. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * FT_Free_Func
+ *
+ * @description:
+ * A function used to release a given block of memory.
+ *
+ * @input:
+ * memory ::
+ * A handle to the source memory manager.
+ *
+ * block ::
+ * The address of the target memory block.
+ *
+ */
typedef void
(*FT_Free_Func)( FT_Memory memory,
void* block );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* FT_Realloc_Func */
- /* */
- /* @description: */
- /* a function used to re-allocate a given block of memory. */
- /* */
- /* @input: */
- /* memory :: A handle to the source memory manager. */
- /* */
- /* cur_size :: The block's current size in bytes. */
- /* */
- /* new_size :: The block's requested new size. */
- /* */
- /* block :: The block's current address. */
- /* */
- /* @return: */
- /* New block address. 0 in case of memory shortage. */
- /* */
- /* @note: */
- /* In case of error, the old block must still be available. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * FT_Realloc_Func
+ *
+ * @description:
+ * A function used to re-allocate a given block of memory.
+ *
+ * @input:
+ * memory ::
+ * A handle to the source memory manager.
+ *
+ * cur_size ::
+ * The block's current size in bytes.
+ *
+ * new_size ::
+ * The block's requested new size.
+ *
+ * block ::
+ * The block's current address.
+ *
+ * @return:
+ * New block address. 0 in case of memory shortage.
+ *
+ * @note:
+ * In case of error, the old block must still be available.
+ *
+ */
typedef void*
(*FT_Realloc_Func)( FT_Memory memory,
long cur_size,
@@ -134,23 +146,28 @@
void* block );
- /*************************************************************************/
- /* */
- /* @struct: */
- /* FT_MemoryRec */
- /* */
- /* @description: */
- /* A structure used to describe a given memory manager to FreeType 2. */
- /* */
- /* @fields: */
- /* user :: A generic typeless pointer for user data. */
- /* */
- /* alloc :: A pointer type to an allocation function. */
- /* */
- /* free :: A pointer type to an memory freeing function. */
- /* */
- /* realloc :: A pointer type to a reallocation function. */
- /* */
+ /*************************************************************************
+ *
+ * @struct:
+ * FT_MemoryRec
+ *
+ * @description:
+ * A structure used to describe a given memory manager to FreeType 2.
+ *
+ * @fields:
+ * user ::
+ * A generic typeless pointer for user data.
+ *
+ * alloc ::
+ * A pointer type to an allocation function.
+ *
+ * free ::
+ * A pointer type to an memory freeing function.
+ *
+ * realloc ::
+ * A pointer type to a reallocation function.
+ *
+ */
struct FT_MemoryRec_
{
void* user;
@@ -167,26 +184,28 @@
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* @type: */
- /* FT_Stream */
- /* */
- /* @description: */
- /* A handle to an input stream. */
- /* */
+ /*************************************************************************
+ *
+ * @type:
+ * FT_Stream
+ *
+ * @description:
+ * A handle to an input stream.
+ *
+ */
typedef struct FT_StreamRec_* FT_Stream;
- /*************************************************************************/
- /* */
- /* @struct: */
- /* FT_StreamDesc */
- /* */
- /* @description: */
- /* A union type used to store either a long or a pointer. This is */
- /* used to store a file descriptor or a FILE* in an input stream. */
- /* */
+ /*************************************************************************
+ *
+ * @struct:
+ * FT_StreamDesc
+ *
+ * @description:
+ * A union type used to store either a long or a pointer. This is used
+ * to store a file descriptor or a FILE* in an input stream.
+ *
+ */
typedef union FT_StreamDesc_
{
long value;
@@ -195,30 +214,35 @@
} FT_StreamDesc;
- /*************************************************************************/
- /* */
- /* @functype: */
- /* FT_Stream_IoFunc */
- /* */
- /* @description: */
- /* A function used to seek and read data from a given input stream. */
- /* */
- /* @input: */
- /* stream :: A handle to the source stream. */
- /* */
- /* offset :: The offset of read in stream (always from start). */
- /* */
- /* buffer :: The address of the read buffer. */
- /* */
- /* count :: The number of bytes to read from the stream. */
- /* */
- /* @return: */
- /* The number of bytes effectively read by the stream. */
- /* */
- /* @note: */
- /* This function might be called to perform a seek or skip operation */
- /* with a `count' of 0. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * FT_Stream_IoFunc
+ *
+ * @description:
+ * A function used to seek and read data from a given input stream.
+ *
+ * @input:
+ * stream ::
+ * A handle to the source stream.
+ *
+ * offset ::
+ * The offset of read in stream (always from start).
+ *
+ * buffer ::
+ * The address of the read buffer.
+ *
+ * count ::
+ * The number of bytes to read from the stream.
+ *
+ * @return:
+ * The number of bytes effectively read by the stream.
+ *
+ * @note:
+ * This function might be called to perform a seek or skip operation
+ * with a `count' of 0.
+ *
+ */
typedef unsigned long
(*FT_Stream_IoFunc)( FT_Stream stream,
unsigned long offset,
@@ -226,60 +250,73 @@
unsigned long count );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* FT_Stream_CloseFunc */
- /* */
- /* @description: */
- /* A function used to close a given input stream. */
- /* */
- /* @input: */
- /* stream :: A handle to the target stream. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * FT_Stream_CloseFunc
+ *
+ * @description:
+ * A function used to close a given input stream.
+ *
+ * @input:
+ * stream ::
+ * A handle to the target stream.
+ *
+ */
typedef void
(*FT_Stream_CloseFunc)( FT_Stream stream );
- /*************************************************************************/
- /* */
- /* @struct: */
- /* FT_StreamRec */
- /* */
- /* @description: */
- /* A structure used to describe an input stream. */
- /* */
- /* @input: */
- /* base :: For memory-based streams, this is the address of the */
- /* first stream byte in memory. This field should */
- /* always be set to NULL for disk-based streams. */
- /* */
- /* size :: The stream size in bytes. */
- /* */
- /* pos :: The current position within the stream. */
- /* */
- /* descriptor :: This field is a union that can hold an integer or a */
- /* pointer. It is used by stream implementations to */
- /* store file descriptors or FILE* pointers. */
- /* */
- /* pathname :: This field is completely ignored by FreeType. */
- /* However, it is often useful during debugging to use */
- /* it to store the stream's filename (where available). */
- /* */
- /* read :: The stream's input function. */
- /* */
- /* close :: The stream;s close function. */
- /* */
- /* memory :: The memory manager to use to preload frames. This is */
- /* set internally by FreeType and shouldn't be touched */
- /* by stream implementations. */
- /* */
- /* cursor :: This field is set and used internally by FreeType */
- /* when parsing frames. */
- /* */
- /* limit :: This field is set and used internally by FreeType */
- /* when parsing frames. */
- /* */
+ /*************************************************************************
+ *
+ * @struct:
+ * FT_StreamRec
+ *
+ * @description:
+ * A structure used to describe an input stream.
+ *
+ * @input:
+ * base ::
+ * For memory-based streams, this is the address of the first stream
+ * byte in memory. This field should always be set to NULL for
+ * disk-based streams.
+ *
+ * size ::
+ * The stream size in bytes.
+ *
+ * pos ::
+ * The current position within the stream.
+ *
+ * descriptor ::
+ * This field is a union that can hold an integer or a pointer. It is
+ * used by stream implementations to store file descriptors or FILE*
+ * pointers.
+ *
+ * pathname ::
+ * This field is completely ignored by FreeType. However, it is often
+ * useful during debugging to use it to store the stream's filename
+ * (where available).
+ *
+ * read ::
+ * The stream's input function.
+ *
+ * close ::
+ * The stream;s close function.
+ *
+ * memory ::
+ * The memory manager to use to preload frames. This is set
+ * internally by FreeType and shouldn't be touched by stream
+ * implementations.
+ *
+ * cursor ::
+ * This field is set and used internally by FreeType when parsing
+ * frames.
+ *
+ * limit ::
+ * This field is set and used internally by FreeType when parsing
+ * frames.
+ *
+ */
typedef struct FT_StreamRec_
{
unsigned char* base;
--- a/include/freetype/fttrigon.h
+++ b/include/freetype/fttrigon.h
@@ -4,7 +4,7 @@
/* */
/* FreeType trigonometric functions (specification). */
/* */
-/* Copyright 2001, 2003 by */
+/* Copyright 2001, 2003, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -33,251 +33,281 @@
/*************************************************************************/
/* */
- /* @section: */
+ /* <Section> */
/* computations */
/* */
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* @type: */
- /* FT_Angle */
- /* */
- /* @description: */
- /* This type is used to model angle values in FreeType. Note that */
- /* the angle is a 16.16 fixed float value expressed in degrees. */
- /* */
+ /*************************************************************************
+ *
+ * @type:
+ * FT_Angle
+ *
+ * @description:
+ * This type is used to model angle values in FreeType. Note that the
+ * angle is a 16.16 fixed float value expressed in degrees.
+ *
+ */
typedef FT_Fixed FT_Angle;
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_ANGLE_PI */
- /* */
- /* @description: */
- /* The angle pi expressed in @FT_Angle units. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_ANGLE_PI
+ *
+ * @description:
+ * The angle pi expressed in @FT_Angle units.
+ *
+ */
#define FT_ANGLE_PI ( 180L << 16 )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_ANGLE_2PI */
- /* */
- /* @description: */
- /* The angle 2*pi expressed in @FT_Angle units. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_ANGLE_2PI
+ *
+ * @description:
+ * The angle 2*pi expressed in @FT_Angle units.
+ *
+ */
#define FT_ANGLE_2PI ( FT_ANGLE_PI * 2 )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_ANGLE_PI2 */
- /* */
- /* @description: */
- /* The angle pi/2 expressed in @FT_Angle units. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_ANGLE_PI2
+ *
+ * @description:
+ * The angle pi/2 expressed in @FT_Angle units.
+ *
+ */
#define FT_ANGLE_PI2 ( FT_ANGLE_PI / 2 )
- /*************************************************************************/
- /* */
- /* @macro: */
- /* FT_ANGLE_PI4 */
- /* */
- /* @description: */
- /* The angle pi/4 expressed in @FT_Angle units. */
- /* */
+ /*************************************************************************
+ *
+ * @macro:
+ * FT_ANGLE_PI4
+ *
+ * @description:
+ * The angle pi/4 expressed in @FT_Angle units.
+ *
+ */
#define FT_ANGLE_PI4 ( FT_ANGLE_PI / 4 )
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Sin */
- /* */
- /* @description: */
- /* Return the sinus of a given angle in fixed point format. */
- /* */
- /* @input: */
- /* angle :: The input angle. */
- /* */
- /* @return: */
- /* The sinus value. */
- /* */
- /* @note: */
- /* If you need both the sinus and cosinus for a given angle, use the */
- /* function @FT_Vector_Unit. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Sin
+ *
+ * @description:
+ * Return the sinus of a given angle in fixed point format.
+ *
+ * @input:
+ * angle ::
+ * The input angle.
+ *
+ * @return:
+ * The sinus value.
+ *
+ * @note:
+ * If you need both the sinus and cosinus for a given angle, use the
+ * function @FT_Vector_Unit.
+ *
+ */
FT_EXPORT( FT_Fixed )
FT_Sin( FT_Angle angle );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Cos */
- /* */
- /* @description: */
- /* Return the cosinus of a given angle in fixed point format. */
- /* */
- /* @input: */
- /* angle :: The input angle. */
- /* */
- /* @return: */
- /* The cosinus value. */
- /* */
- /* @note: */
- /* If you need both the sinus and cosinus for a given angle, use the */
- /* function @FT_Vector_Unit. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Cos
+ *
+ * @description:
+ * Return the cosinus of a given angle in fixed point format.
+ *
+ * @input:
+ * angle ::
+ * The input angle.
+ *
+ * @return:
+ * The cosinus value.
+ *
+ * @note:
+ * If you need both the sinus and cosinus for a given angle, use the
+ * function @FT_Vector_Unit.
+ *
+ */
FT_EXPORT( FT_Fixed )
FT_Cos( FT_Angle angle );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Tan */
- /* */
- /* @description: */
- /* Return the tangent of a given angle in fixed point format. */
- /* */
- /* @input: */
- /* angle :: The input angle. */
- /* */
- /* @return: */
- /* The tangent value. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Tan
+ *
+ * @description:
+ * Return the tangent of a given angle in fixed point format.
+ *
+ * @input:
+ * angle ::
+ * The input angle.
+ *
+ * @return:
+ * The tangent value.
+ *
+ */
FT_EXPORT( FT_Fixed )
FT_Tan( FT_Angle angle );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Atan2 */
- /* */
- /* @description: */
- /* Return the arc-tangent corresponding to a given vector (x,y) in */
- /* the 2d plane. */
- /* */
- /* @input: */
- /* x :: The horizontal vector coordinate. */
- /* */
- /* y :: The vertical vector coordinate. */
- /* */
- /* @return: */
- /* The arc-tangent value (i.e. angle). */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Atan2
+ *
+ * @description:
+ * Return the arc-tangent corresponding to a given vector (x,y) in
+ * the 2d plane.
+ *
+ * @input:
+ * x ::
+ * The horizontal vector coordinate.
+ *
+ * y ::
+ * The vertical vector coordinate.
+ *
+ * @return:
+ * The arc-tangent value (i.e. angle).
+ *
+ */
FT_EXPORT( FT_Angle )
FT_Atan2( FT_Fixed x,
FT_Fixed y );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Angle_Diff */
- /* */
- /* @description: */
- /* Return the difference between two angles. The result is always */
- /* constrained to the ]-PI..PI] interval. */
- /* */
- /* @input: */
- /* angle1 :: First angle. */
- /* */
- /* angle2 :: Second angle. */
- /* */
- /* @return: */
- /* Contrainted value of `value2-value1'. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Angle_Diff
+ *
+ * @description:
+ * Return the difference between two angles. The result is always
+ * constrained to the ]-PI..PI] interval.
+ *
+ * @input:
+ * angle1 ::
+ * First angle.
+ *
+ * angle2 ::
+ * Second angle.
+ *
+ * @return:
+ * Contrainted value of `value2-value1'.
+ *
+ */
FT_EXPORT( FT_Angle )
FT_Angle_Diff( FT_Angle angle1,
FT_Angle angle2 );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Vector_Unit */
- /* */
- /* @description: */
- /* Return the unit vector corresponding to a given angle. After the */
- /* call, the value of `vec.x' will be `sin(angle)', and the value of */
- /* `vec.y' will be `cos(angle)'. */
- /* */
- /* This function is useful to retrieve both the sinus and cosinus of */
- /* a given angle quickly. */
- /* */
- /* @output: */
- /* vec :: The address of target vector. */
- /* */
- /* @input: */
- /* angle :: The address of angle. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Vector_Unit
+ *
+ * @description:
+ * Return the unit vector corresponding to a given angle. After the
+ * call, the value of `vec.x' will be `sin(angle)', and the value of
+ * `vec.y' will be `cos(angle)'.
+ *
+ * This function is useful to retrieve both the sinus and cosinus of a
+ * given angle quickly.
+ *
+ * @output:
+ * vec ::
+ * The address of target vector.
+ *
+ * @input:
+ * angle ::
+ * The address of angle.
+ *
+ */
FT_EXPORT( void )
FT_Vector_Unit( FT_Vector* vec,
FT_Angle angle );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Vector_Rotate */
- /* */
- /* @description: */
- /* Rotate a vector by a given angle. */
- /* */
- /* @inout: */
- /* vec :: The address of target vector. */
- /* */
- /* @input: */
- /* angle :: The address of angle. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Vector_Rotate
+ *
+ * @description:
+ * Rotate a vector by a given angle.
+ *
+ * @inout:
+ * vec ::
+ * The address of target vector.
+ *
+ * @input:
+ * angle ::
+ * The address of angle.
+ *
+ */
FT_EXPORT( void )
FT_Vector_Rotate( FT_Vector* vec,
FT_Angle angle );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Vector_Length */
- /* */
- /* @description: */
- /* Return the length of a given vector. */
- /* */
- /* @input: */
- /* vec :: The address of target vector. */
- /* */
- /* @return: */
- /* The vector length, expressed in the same units that the original */
- /* vector coordinates. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Vector_Length
+ *
+ * @description:
+ * Return the length of a given vector.
+ *
+ * @input:
+ * vec ::
+ * The address of target vector.
+ *
+ * @return:
+ * The vector length, expressed in the same units that the original
+ * vector coordinates.
+ *
+ */
FT_EXPORT( FT_Fixed )
FT_Vector_Length( FT_Vector* vec );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Vector_Polarize */
- /* */
- /* @description: */
- /* Compute both the length and angle of a given vector. */
- /* */
- /* @input: */
- /* vec :: The address of source vector. */
- /* */
- /* @output: */
- /* length :: The vector length. */
- /* angle :: The vector angle. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Vector_Polarize
+ *
+ * @description:
+ * Compute both the length and angle of a given vector.
+ *
+ * @input:
+ * vec ::
+ * The address of source vector.
+ *
+ * @output:
+ * length ::
+ * The vector length.
+ *
+ * angle ::
+ * The vector angle.
+ *
+ */
FT_EXPORT( void )
FT_Vector_Polarize( FT_Vector* vec,
FT_Fixed *length,
@@ -284,21 +314,26 @@
FT_Angle *angle );
- /*************************************************************************/
- /* */
- /* @function: */
- /* FT_Vector_From_Polar */
- /* */
- /* @description: */
- /* Compute vector coordinates from a length and angle. */
- /* */
- /* @output: */
- /* vec :: The address of source vector. */
- /* */
- /* @input: */
- /* length :: The vector length. */
- /* angle :: The vector angle. */
- /* */
+ /*************************************************************************
+ *
+ * @function:
+ * FT_Vector_From_Polar
+ *
+ * @description:
+ * Compute vector coordinates from a length and angle.
+ *
+ * @output:
+ * vec ::
+ * The address of source vector.
+ *
+ * @input:
+ * length ::
+ * The vector length.
+ *
+ * angle ::
+ * The vector angle.
+ *
+ */
FT_EXPORT( void )
FT_Vector_From_Polar( FT_Vector* vec,
FT_Fixed length,
--- a/include/freetype/internal/pshints.h
+++ b/include/freetype/internal/pshints.h
@@ -4,9 +4,9 @@
/* */
/* Interface to Postscript-specific (Type 1 and Type 2) hints */
/* recorders (specification only). These are used to support native */
-/* T1/T2 hints in the "type1", "cid" and "cff" font drivers. */
+/* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */
/* */
-/* Copyright 2001, 2002, 2003 by */
+/* Copyright 2001, 2002, 2003, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -73,101 +73,107 @@
/*************************************************************************/
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* @type: */
- /* T1_Hints */
- /* */
- /* @description: */
- /* This is a handle to an opaque structure used to record glyph hints */
- /* from a Type 1 character glyph character string. */
- /* */
- /* The methods used to operate on this object are defined by the */
- /* @T1_Hints_FuncsRec structure. Recording glyph hints is normally */
- /* achieved through the following scheme: */
- /* */
- /* - Open a new hint recording session by calling the "open" method. */
- /* This will rewind the recorder and prepare it for new input. */
- /* */
- /* - For each hint found in the glyph charstring, call the */
- /* corresponding method ("stem", "stem3", or "reset"). Note that */
- /* these functions do not return an error code. */
- /* */
- /* - Close the recording session by calling the "close" method. It */
- /* will return an error code if the hints were invalid or something */
- /* strange happened (e.g. memory shortage). */
- /* */
- /* The hints accumulated in the object can later be used by the */
- /* PostScript hinter. */
- /* */
+ /*************************************************************************
+ *
+ * @type:
+ * T1_Hints
+ *
+ * @description:
+ * This is a handle to an opaque structure used to record glyph hints
+ * from a Type 1 character glyph character string.
+ *
+ * The methods used to operate on this object are defined by the
+ * @T1_Hints_FuncsRec structure. Recording glyph hints is normally
+ * achieved through the following scheme:
+ *
+ * - Open a new hint recording session by calling the `open' method.
+ * This rewinds the recorder and prepare it for new input.
+ *
+ * - For each hint found in the glyph charstring, call the corresponding
+ * method (`stem', `stem3', or `reset'). Note that these functions do
+ * not return an error code.
+ *
+ * - Close the recording session by calling the `close' method. It
+ * returns an error code if the hints were invalid or something
+ * strange happened (e.g., memory shortage).
+ *
+ * The hints accumulated in the object can later be used by the
+ * PostScript hinter.
+ *
+ */
typedef struct T1_HintsRec_* T1_Hints;
- /*************************************************************************/
- /* */
- /* @type: */
- /* T1_Hints_Funcs */
- /* */
- /* @description: */
- /* A pointer to the @T1_Hints_FuncsRec structure that defines the */
- /* API of a given @T1_Hints object. */
- /* */
+ /*************************************************************************
+ *
+ * @type:
+ * T1_Hints_Funcs
+ *
+ * @description:
+ * A pointer to the @T1_Hints_FuncsRec structure that defines the API of
+ * a given @T1_Hints object.
+ *
+ */
typedef const struct T1_Hints_FuncsRec_* T1_Hints_Funcs;
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T1_Hints_OpenFunc */
- /* */
- /* @description: */
- /* A method of the @T1_Hints class used to prepare it for a new */
- /* Type 1 hints recording session. */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 1 hints recorder. */
- /* */
- /* @note: */
- /* You should always call the @T1_Hints_CloseFunc method in order to */
- /* close an opened recording session. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T1_Hints_OpenFunc
+ *
+ * @description:
+ * A method of the @T1_Hints class used to prepare it for a new Type 1
+ * hints recording session.
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 1 hints recorder.
+ *
+ * @note:
+ * You should always call the @T1_Hints_CloseFunc method in order to
+ * close an opened recording session.
+ *
+ */
typedef void
(*T1_Hints_OpenFunc)( T1_Hints hints );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T1_Hints_SetStemFunc */
- /* */
- /* @description: */
- /* A method of the @T1_Hints class used to record a new horizontal or */
- /* vertical stem. This corresponds to the Type 1 "hstem" and "vstem" */
- /* operators. */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 1 hints recorder. */
- /* */
- /* dimension :: 0 for horizontal stems (hstem), 1 for vertical ones */
- /* (vstem). */
- /* */
- /* coords :: Array of 2 integers, used as (position,length) stem */
- /* descriptor. */
- /* */
- /* @note: */
- /* Use vertical coordinates (y) for horizontal stems (dim=0). Use */
- /* horizontal coordinates (x) for vertical stems (dim=1). */
- /* */
- /* "coords[0]" is the absolute stem position (lowest coordinate); */
- /* "coords[1]" is the length. */
- /* */
- /* The length can be negative, in which case it must be either -20 or */
- /* -21. It will be interpreted as a "ghost" stem, according to */
- /* Type 1 specification. */
- /* */
- /* If the length is -21 (corresponding to a bottom ghost stem), then */
- /* the real stem position is "coords[0]+coords[1]". */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T1_Hints_SetStemFunc
+ *
+ * @description:
+ * A method of the @T1_Hints class used to record a new horizontal or
+ * vertical stem. This corresponds to the Type 1 `hstem' and `vstem'
+ * operators.
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 1 hints recorder.
+ *
+ * dimension ::
+ * 0 for horizontal stems (hstem), 1 for vertical ones (vstem).
+ *
+ * coords ::
+ * Array of 2 integers, used as (position,length) stem descriptor.
+ *
+ * @note:
+ * Use vertical coordinates (y) for horizontal stems (dim=0). Use
+ * horizontal coordinates (x) for vertical stems (dim=1).
+ *
+ * `coords[0]' is the absolute stem position (lowest coordinate);
+ * `coords[1]' is the length.
+ *
+ * The length can be negative, in which case it must be either -20 or
+ * -21. It is interpreted as a `ghost' stem, according to the Type 1
+ * specification.
+ *
+ * If the length is -21 (corresponding to a bottom ghost stem), then
+ * the real stem position is `coords[0]+coords[1]'.
+ *
+ */
typedef void
(*T1_Hints_SetStemFunc)( T1_Hints hints,
FT_UInt dimension,
@@ -174,30 +180,34 @@
FT_Long* coords );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T1_Hints_SetStem3Func */
- /* */
- /* @description: */
- /* A method of the @T1_Hints class used to record three */
- /* counter-controlled horizontal or vertical stems at once. */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 1 hints recorder. */
- /* */
- /* dimension :: 0 for horizontal stems, 1 for vertical ones. */
- /* */
- /* coords :: An array of 6 integers, holding 3 (position,length) */
- /* pairs for the counter-controlled stems. */
- /* */
- /* @note: */
- /* Use vertical coordinates (y) for horizontal stems (dim=0). Use */
- /* horizontal coordinates (x) for vertical stems (dim=1). */
- /* */
- /* The lengths cannot be negative (ghost stems are never */
- /* counter-controlled). */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T1_Hints_SetStem3Func
+ *
+ * @description:
+ * A method of the @T1_Hints class used to record three
+ * counter-controlled horizontal or vertical stems at once.
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 1 hints recorder.
+ *
+ * dimension ::
+ * 0 for horizontal stems, 1 for vertical ones.
+ *
+ * coords ::
+ * An array of 6 integers, holding 3 (position,length) pairs for the
+ * counter-controlled stems.
+ *
+ * @note:
+ * Use vertical coordinates (y) for horizontal stems (dim=0). Use
+ * horizontal coordinates (x) for vertical stems (dim=1).
+ *
+ * The lengths cannot be negative (ghost stems are never
+ * counter-controlled).
+ *
+ */
typedef void
(*T1_Hints_SetStem3Func)( T1_Hints hints,
FT_UInt dimension,
@@ -204,81 +214,92 @@
FT_Long* coords );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T1_Hints_ResetFunc */
- /* */
- /* @description: */
- /* A method of the @T1_Hints class used to reset the stems hints in a */
- /* recording session. */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 1 hints recorder. */
- /* */
- /* end_point :: The index of the last point in the input glyph in */
- /* which the previously defined hints apply. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T1_Hints_ResetFunc
+ *
+ * @description:
+ * A method of the @T1_Hints class used to reset the stems hints in a
+ * recording session.
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 1 hints recorder.
+ *
+ * end_point ::
+ * The index of the last point in the input glyph in which the
+ * previously defined hints apply.
+ *
+ */
typedef void
(*T1_Hints_ResetFunc)( T1_Hints hints,
FT_UInt end_point );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T1_Hints_CloseFunc */
- /* */
- /* @description: */
- /* A method of the @T1_Hints class used to close a hint recording */
- /* session. */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 1 hints recorder. */
- /* */
- /* end_point :: The index of the last point in the input glyph. */
- /* */
- /* @return: */
- /* FreeType error code. 0 means success. */
- /* */
- /* @note: */
- /* The error code will be set to indicate that an error occured */
- /* during the recording session. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T1_Hints_CloseFunc
+ *
+ * @description:
+ * A method of the @T1_Hints class used to close a hint recording
+ * session.
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 1 hints recorder.
+ *
+ * end_point ::
+ * The index of the last point in the input glyph.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * The error code is set to indicate that an error occurred during the
+ * recording session.
+ *
+ */
typedef FT_Error
(*T1_Hints_CloseFunc)( T1_Hints hints,
FT_UInt end_point );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T1_Hints_ApplyFunc */
- /* */
- /* @description: */
- /* A method of the @T1_Hints class used to apply hints to the */
- /* corresponding glyph outline. Must be called once all hints have */
- /* been recorded. */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 1 hints recorder. */
- /* */
- /* outline :: A pointer to the target outline descriptor. */
- /* */
- /* globals :: The hinter globals for this font. */
- /* */
- /* hint_mode :: Hinting information. */
- /* */
- /* @return: */
- /* FreeType error code. 0 means success. */
- /* */
- /* @note: */
- /* On input, all points within the outline are in font coordinates. */
- /* On output, they are in 1/64th of pixels. */
- /* */
- /* The scaling transformation is taken from the "globals" object */
- /* which must correspond to the same font as the glyph. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T1_Hints_ApplyFunc
+ *
+ * @description:
+ * A method of the @T1_Hints class used to apply hints to the
+ * corresponding glyph outline. Must be called once all hints have been
+ * recorded.
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 1 hints recorder.
+ *
+ * outline ::
+ * A pointer to the target outline descriptor.
+ *
+ * globals ::
+ * The hinter globals for this font.
+ *
+ * hint_mode ::
+ * Hinting information.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * On input, all points within the outline are in font coordinates. On
+ * output, they are in 1/64th of pixels.
+ *
+ * The scaling transformation is taken from the `globals' object which
+ * must correspond to the same font as the glyph.
+ *
+ */
typedef FT_Error
(*T1_Hints_ApplyFunc)( T1_Hints hints,
FT_Outline* outline,
@@ -286,30 +307,37 @@
FT_Render_Mode hint_mode );
- /*************************************************************************/
- /* */
- /* @struct: */
- /* T1_Hints_FuncsRec */
- /* */
- /* @description: */
- /* The structure used to provide the API to @T1_Hints objects. */
- /* */
- /* @fields: */
- /* hints :: A handle to the T1 Hints recorder. */
- /* */
- /* open :: The function to open a recording session. */
- /* */
- /* close :: The function to close a recording session. */
- /* */
- /* stem :: The function to set a simple stem. */
- /* */
- /* stem3 :: The function to set counter-controlled stems. */
- /* */
- /* reset :: The function to reset stem hints. */
- /* */
- /* apply :: The function to apply the hints to the corresponding */
- /* glyph outline. */
- /* */
+ /*************************************************************************
+ *
+ * @struct:
+ * T1_Hints_FuncsRec
+ *
+ * @description:
+ * The structure used to provide the API to @T1_Hints objects.
+ *
+ * @fields:
+ * hints ::
+ * A handle to the T1 Hints recorder.
+ *
+ * open ::
+ * The function to open a recording session.
+ *
+ * close ::
+ * The function to close a recording session.
+ *
+ * stem ::
+ * The function to set a simple stem.
+ *
+ * stem3 ::
+ * The function to set counter-controlled stems.
+ *
+ * reset ::
+ * The function to reset stem hints.
+ *
+ * apply ::
+ * The function to apply the hints to the corresponding glyph outline.
+ *
+ */
typedef struct T1_Hints_FuncsRec_
{
T1_Hints hints;
@@ -331,100 +359,108 @@
/*************************************************************************/
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* @type: */
- /* T2_Hints */
- /* */
- /* @description: */
- /* This is a handle to an opaque structure used to record glyph hints */
- /* from a Type 2 character glyph character string. */
- /* */
- /* The methods used to operate on this object are defined by the */
- /* @T2_Hints_FuncsRec structure. Recording glyph hints is normally */
- /* achieved through the following scheme: */
- /* */
- /* - Open a new hint recording session by calling the "open" method. */
- /* This will rewind the recorder and prepare it for new input. */
- /* */
- /* - For each hint found in the glyph charstring, call the */
- /* corresponding method ("stems", "hintmask", "counters"). Note */
- /* that these functions do not return an error code. */
- /* */
- /* - Close the recording session by calling the "close" method. It */
- /* will return an error code if the hints were invalid or something */
- /* strange happened (e.g. memory shortage). */
- /* */
- /* The hints accumulated in the object can later be used by the */
- /* Postscript hinter. */
- /* */
+ /*************************************************************************
+ *
+ * @type:
+ * T2_Hints
+ *
+ * @description:
+ * This is a handle to an opaque structure used to record glyph hints
+ * from a Type 2 character glyph character string.
+ *
+ * The methods used to operate on this object are defined by the
+ * @T2_Hints_FuncsRec structure. Recording glyph hints is normally
+ * achieved through the following scheme:
+ *
+ * - Open a new hint recording session by calling the `open' method.
+ * This rewinds the recorder and prepare it for new input.
+ *
+ * - For each hint found in the glyph charstring, call the corresponding
+ * method (`stems', `hintmask', `counters'). Note that these
+ * functions do not return an error code.
+ *
+ * - Close the recording session by calling the `close' method. It
+ * returns an error code if the hints were invalid or something
+ * strange happened (e.g., memory shortage).
+ *
+ * The hints accumulated in the object can later be used by the
+ * Postscript hinter.
+ *
+ */
typedef struct T2_HintsRec_* T2_Hints;
- /*************************************************************************/
- /* */
- /* @type: */
- /* T2_Hints_Funcs */
- /* */
- /* @description: */
- /* A pointer to the @T2_Hints_FuncsRec structure that defines the API */
- /* of a given @T2_Hints object. */
- /* */
+ /*************************************************************************
+ *
+ * @type:
+ * T2_Hints_Funcs
+ *
+ * @description:
+ * A pointer to the @T2_Hints_FuncsRec structure that defines the API of
+ * a given @T2_Hints object.
+ *
+ */
typedef const struct T2_Hints_FuncsRec_* T2_Hints_Funcs;
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T2_Hints_OpenFunc */
- /* */
- /* @description: */
- /* A method of the @T2_Hints class used to prepare it for a new */
- /* Type 2 hints recording session. */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 2 hints recorder. */
- /* */
- /* @note: */
- /* You should always call the @T2_Hints_CloseFunc method in order to */
- /* close an opened recording session. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T2_Hints_OpenFunc
+ *
+ * @description:
+ * A method of the @T2_Hints class used to prepare it for a new Type 2
+ * hints recording session.
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 2 hints recorder.
+ *
+ * @note:
+ * You should always call the @T2_Hints_CloseFunc method in order to
+ * close an opened recording session.
+ *
+ */
typedef void
(*T2_Hints_OpenFunc)( T2_Hints hints );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T2_Hints_StemsFunc */
- /* */
- /* @description: */
- /* A method of the @T2_Hints class used to set the table of stems in */
- /* either the vertical or horizontal dimension. Equivalent to the */
- /* "hstem", "vstem", "hstemhm", and "vstemhm" Type 2 operators. */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 2 hints recorder. */
- /* */
- /* dimension :: 0 for horizontal stems (hstem), 1 for vertical ones */
- /* (vstem). */
- /* */
- /* count :: The number of stems. */
- /* */
- /* coords :: An array of "count" (position,length) pairs. */
- /* */
- /* @note: */
- /* Use vertical coordinates (y) for horizontal stems (dim=0). Use */
- /* horizontal coordinates (x) for vertical stems (dim=1). */
- /* */
- /* There are "2*count" elements in the "coords" aray. Each even */
- /* element is an absolute position in font units, each odd element is */
- /* a length in font units. */
- /* */
- /* A length can be negative, in which case it must be either -20 or */
- /* -21. It will be interpreted as a "ghost" stem, according to the */
- /* Type 1 specification. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T2_Hints_StemsFunc
+ *
+ * @description:
+ * A method of the @T2_Hints class used to set the table of stems in
+ * either the vertical or horizontal dimension. Equivalent to the
+ * `hstem', `vstem', `hstemhm', and `vstemhm' Type 2 operators.
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 2 hints recorder.
+ *
+ * dimension ::
+ * 0 for horizontal stems (hstem), 1 for vertical ones (vstem).
+ *
+ * count ::
+ * The number of stems.
+ *
+ * coords ::
+ * An array of `count' (position,length) pairs.
+ *
+ * @note:
+ * Use vertical coordinates (y) for horizontal stems (dim=0). Use
+ * horizontal coordinates (x) for vertical stems (dim=1).
+ *
+ * There are `2*count' elements in the `coords' aray. Each even element
+ * is an absolute position in font units, each odd element is a length
+ * in font units.
+ *
+ * A length can be negative, in which case it must be either -20 or
+ * -21. It is interpreted as a `ghost' stem, according to the Type 1
+ * specification.
+ *
+ */
typedef void
(*T2_Hints_StemsFunc)( T2_Hints hints,
FT_UInt dimension,
@@ -432,36 +468,41 @@
FT_Fixed* coordinates );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T2_Hints_MaskFunc */
- /* */
- /* @description: */
- /* A method of the @T2_Hints class used to set a given hintmask */
- /* (this corresponds to the "hintmask" Type 2 operator). */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 2 hints recorder. */
- /* */
- /* end_point :: The glyph index of the last point to which the */
- /* previously defined/activated hints apply. */
- /* */
- /* bit_count :: The number of bits in the hint mask. */
- /* */
- /* bytes :: An array of bytes modelling the hint mask. */
- /* */
- /* @note: */
- /* If the hintmask starts the charstring (before any glyph point */
- /* definition), the value of "end_point" should be 0. */
- /* */
- /* "bit_count" is the number of meaningful bits in the "bytes" array; */
- /* it must be equal to the total number of hints defined so far */
- /* (i.e. horizontal+verticals). */
- /* */
- /* The "bytes" array can come directly from the Type 2 charstring and */
- /* respects the same format. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T2_Hints_MaskFunc
+ *
+ * @description:
+ * A method of the @T2_Hints class used to set a given hintmask (this
+ * corresponds to the `hintmask' Type 2 operator).
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 2 hints recorder.
+ *
+ * end_point ::
+ * The glyph index of the last point to which the previously defined
+ * or activated hints apply.
+ *
+ * bit_count ::
+ * The number of bits in the hint mask.
+ *
+ * bytes ::
+ * An array of bytes modelling the hint mask.
+ *
+ * @note:
+ * If the hintmask starts the charstring (before any glyph point
+ * definition), the value of `end_point' should be 0.
+ *
+ * `bit_count' is the number of meaningful bits in the `bytes' array; it
+ * must be equal to the total number of hints defined so far (i.e.,
+ * horizontal+verticals).
+ *
+ * The `bytes' array can come directly from the Type 2 charstring and
+ * respects the same format.
+ *
+ */
typedef void
(*T2_Hints_MaskFunc)( T2_Hints hints,
FT_UInt end_point,
@@ -469,36 +510,41 @@
const FT_Byte* bytes );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T2_Hints_CounterFunc */
- /* */
- /* @description: */
- /* A method of the @T2_Hints class used to set a given counter mask */
- /* (this corresponds to the "hintmask" Type 2 operator). */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 2 hints recorder. */
- /* */
- /* end_point :: A glyph index of the last point to which the */
- /* previously defined/active hints apply. */
- /* */
- /* bit_count :: The number of bits in the hint mask. */
- /* */
- /* bytes :: An array of bytes modelling the hint mask. */
- /* */
- /* @note: */
- /* If the hintmask starts the charstring (before any glyph point */
- /* definition), the value of "end_point" should be 0. */
- /* */
- /* "bit_count" is the number of meaningful bits in the "bytes" array; */
- /* it must be equal to the total number of hints defined so far */
- /* (i.e. horizontal+verticals). */
- /* */
- /* The "bytes" array can come directly from the Type 2 charstring and */
- /* respects the same format. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T2_Hints_CounterFunc
+ *
+ * @description:
+ * A method of the @T2_Hints class used to set a given counter mask
+ * (this corresponds to the `hintmask' Type 2 operator).
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 2 hints recorder.
+ *
+ * end_point ::
+ * A glyph index of the last point to which the previously defined or
+ * active hints apply.
+ *
+ * bit_count ::
+ * The number of bits in the hint mask.
+ *
+ * bytes ::
+ * An array of bytes modelling the hint mask.
+ *
+ * @note:
+ * If the hintmask starts the charstring (before any glyph point
+ * definition), the value of `end_point' should be 0.
+ *
+ * `bit_count' is the number of meaningful bits in the `bytes' array; it
+ * must be equal to the total number of hints defined so far (i.e.,
+ * horizontal+verticals).
+ *
+ * The "bytes" array can come directly from the Type 2 charstring and
+ * respects the same format.
+ *
+ */
typedef void
(*T2_Hints_CounterFunc)( T2_Hints hints,
FT_UInt bit_count,
@@ -505,61 +551,69 @@
const FT_Byte* bytes );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T2_Hints_CloseFunc */
- /* */
- /* @description: */
- /* A method of the @T2_Hints class used to close a hint recording */
- /* session. */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 2 hints recorder. */
- /* */
- /* end_point :: The index of the last point in the input glyph. */
- /* */
- /* @return: */
- /* FreeType error code. 0 means success. */
- /* */
- /* @note: */
- /* The error code will be set to indicate that an error occured */
- /* during the recording session. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T2_Hints_CloseFunc
+ *
+ * @description:
+ * A method of the @T2_Hints class used to close a hint recording
+ * session.
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 2 hints recorder.
+ *
+ * end_point ::
+ * The index of the last point in the input glyph.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * The error code is set to indicate that an error occurred during the
+ * recording session.
+ *
+ */
typedef FT_Error
(*T2_Hints_CloseFunc)( T2_Hints hints,
FT_UInt end_point );
- /*************************************************************************/
- /* */
- /* @functype: */
- /* T2_Hints_ApplyFunc */
- /* */
- /* @description: */
- /* A method of the @T2_Hints class used to apply hints to the */
- /* corresponding glyph outline. Must be called after the "close" */
- /* method. */
- /* */
- /* @input: */
- /* hints :: A handle to the Type 2 hints recorder. */
- /* */
- /* outline :: A pointer to the target outline descriptor. */
- /* */
- /* globals :: The hinter globals for this font. */
- /* */
- /* hint_mode :: Hinting information. */
- /* */
- /* @return: */
- /* FreeType error code. 0 means success. */
- /* */
- /* @note: */
- /* On input, all points within the outline are in font coordinates. */
- /* On output, they are in 1/64th of pixels. */
- /* */
- /* The scaling transformation is taken from the "globals" object */
- /* which must correspond to the same font than the glyph. */
- /* */
+ /*************************************************************************
+ *
+ * @functype:
+ * T2_Hints_ApplyFunc
+ *
+ * @description:
+ * A method of the @T2_Hints class used to apply hints to the
+ * corresponding glyph outline. Must be called after the `close'
+ * method.
+ *
+ * @input:
+ * hints ::
+ * A handle to the Type 2 hints recorder.
+ *
+ * outline ::
+ * A pointer to the target outline descriptor.
+ *
+ * globals ::
+ * The hinter globals for this font.
+ *
+ * hint_mode ::
+ * Hinting information.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * On input, all points within the outline are in font coordinates. On
+ * output, they are in 1/64th of pixels.
+ *
+ * The scaling transformation is taken from the `globals' object which
+ * must correspond to the same font than the glyph.
+ *
+ */
typedef FT_Error
(*T2_Hints_ApplyFunc)( T2_Hints hints,
FT_Outline* outline,
@@ -567,30 +621,37 @@
FT_Render_Mode hint_mode );
- /*************************************************************************/
- /* */
- /* @struct: */
- /* T2_Hints_FuncsRec */
- /* */
- /* @description: */
- /* The structure used to provide the API to @T2_Hints objects. */
- /* */
- /* @fields: */
- /* hints :: A handle to the T2 hints recorder object. */
- /* */
- /* open :: The function to open a recording session. */
- /* */
- /* close :: The function to close a recording session. */
- /* */
- /* stems :: The function to set the dimension's stems table. */
- /* */
- /* hintmask :: The function to set hint masks. */
- /* */
- /* counter :: The function to set counter masks. */
- /* */
- /* apply :: The function to apply the hints on the corresponding */
- /* glyph outline. */
- /* */
+ /*************************************************************************
+ *
+ * @struct:
+ * T2_Hints_FuncsRec
+ *
+ * @description:
+ * The structure used to provide the API to @T2_Hints objects.
+ *
+ * @fields:
+ * hints ::
+ * A handle to the T2 hints recorder object.
+ *
+ * open ::
+ * The function to open a recording session.
+ *
+ * close ::
+ * The function to close a recording session.
+ *
+ * stems ::
+ * The function to set the dimension's stems table.
+ *
+ * hintmask ::
+ * The function to set hint masks.
+ *
+ * counter ::
+ * The function to set counter masks.
+ *
+ * apply ::
+ * The function to apply the hints on the corresponding glyph outline.
+ *
+ */
typedef struct T2_Hints_FuncsRec_
{
T2_Hints hints;