* include/*.*: Convert comments to markdown.

This commit was created by applying scripts `markify.py' and
`markdown-format.bash' to all C header files, followed by minor
clean-up.

No change in functionality, of course.

Scripts used:
https://github.com/nikramakrishnan/freetype-docs.git: Commit dfce31e.

http://lists.nongnu.org/archive/html/freetype-devel/2018-08/msg00013.html:
With patches applied.
This commit is contained in:
Nikhil Ramakrishnan 2018-08-24 22:22:30 +05:30
parent 77f0814a31
commit ae5d1a4cec
69 changed files with 4016 additions and 4534 deletions

View File

@ -18,20 +18,19 @@
/************************************************************************** /**************************************************************************
* *
* This header file contains a number of macro definitions that are used * This header file contains a number of macro definitions that are used by
* by the rest of the engine. Most of the macros here are automatically * the rest of the engine. Most of the macros here are automatically
* determined at compile time, and you should not need to change it to * determined at compile time, and you should not need to change it to port
* port FreeType, except to compile the library with a non-ANSI * FreeType, except to compile the library with a non-ANSI compiler.
* compiler.
* *
* Note however that if some specific modifications are needed, we * Note however that if some specific modifications are needed, we advise
* advise you to place a modified copy in your build directory. * you to place a modified copy in your build directory.
* *
* The build directory is usually `builds/<system>', and contains * The build directory is usually 'builds/<system>', and contains
* system-specific files that are always included first when building * system-specific files that are always included first when building the
* the library. * library.
* *
* This ANSI version should stay in `include/config/'. * This ANSI version should stay in 'include/config/'.
* *
*/ */
@ -50,10 +49,10 @@ FT_BEGIN_HEADER
* *
* PLATFORM-SPECIFIC CONFIGURATION MACROS * PLATFORM-SPECIFIC CONFIGURATION MACROS
* *
* These macros can be toggled to suit a specific system. The current * These macros can be toggled to suit a specific system. The current ones
* ones are defaults used to compile FreeType in an ANSI C environment * are defaults used to compile FreeType in an ANSI C environment (16bit
* (16bit compilers are also supported). Copy this file to your own * compilers are also supported). Copy this file to your own
* `builds/<system>' directory, and edit it to port the engine. * 'builds/<system>' directory, and edit it to port the engine.
* *
*/ */
@ -192,8 +191,8 @@ FT_BEGIN_HEADER
* FT_Int32 * FT_Int32
* *
* @description: * @description:
* A typedef for a 32bit signed integer type. The size depends on * A typedef for a 32bit signed integer type. The size depends on the
* the configuration. * configuration.
*/ */
typedef signed XXX FT_Int32; typedef signed XXX FT_Int32;
@ -203,8 +202,8 @@ FT_BEGIN_HEADER
* @type: * @type:
* FT_UInt32 * FT_UInt32
* *
* A typedef for a 32bit unsigned integer type. The size depends on * A typedef for a 32bit unsigned integer type. The size depends on the
* the configuration. * configuration.
*/ */
typedef unsigned XXX FT_UInt32; typedef unsigned XXX FT_UInt32;
@ -214,8 +213,8 @@ FT_BEGIN_HEADER
* @type: * @type:
* FT_Int64 * FT_Int64
* *
* A typedef for a 64bit signed integer type. The size depends on * A typedef for a 64bit signed integer type. The size depends on the
* the configuration. Only defined if there is real 64bit support; * configuration. Only defined if there is real 64bit support;
* otherwise, it gets emulated with a structure (if necessary). * otherwise, it gets emulated with a structure (if necessary).
*/ */
typedef signed XXX FT_Int64; typedef signed XXX FT_Int64;
@ -226,8 +225,8 @@ FT_BEGIN_HEADER
* @type: * @type:
* FT_UInt64 * FT_UInt64
* *
* A typedef for a 64bit unsigned integer type. The size depends on * A typedef for a 64bit unsigned integer type. The size depends on the
* the configuration. Only defined if there is real 64bit support; * configuration. Only defined if there is real 64bit support;
* otherwise, it gets emulated with a structure (if necessary). * otherwise, it gets emulated with a structure (if necessary).
*/ */
typedef unsigned XXX FT_UInt64; typedef unsigned XXX FT_UInt64;
@ -276,10 +275,10 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* A 64-bit data type may create compilation problems if you compile * A 64-bit data type may create compilation problems if you compile in
* in strict ANSI mode. To avoid them, we disable other 64-bit data * strict ANSI mode. To avoid them, we disable other 64-bit data types if
* types if __STDC__ is defined. You can however ignore this rule * __STDC__ is defined. You can however ignore this rule by defining the
* by defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. * FT_CONFIG_OPTION_FORCE_INT64 configuration macro.
*/ */
#elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 ) #elif !defined( __STDC__ ) || defined( FT_CONFIG_OPTION_FORCE_INT64 )

View File

@ -73,23 +73,22 @@
* Macro definitions used to #include specific header files. * Macro definitions used to #include specific header files.
* *
* @description: * @description:
* The following macros are defined to the name of specific * The following macros are defined to the name of specific FreeType~2
* FreeType~2 header files. They can be used directly in #include * header files. They can be used directly in #include statements as in:
* statements as in:
* *
* { * ```
* #include FT_FREETYPE_H * #include FT_FREETYPE_H
* #include FT_MULTIPLE_MASTERS_H * #include FT_MULTIPLE_MASTERS_H
* #include FT_GLYPH_H * #include FT_GLYPH_H
* } * ```
* *
* There are several reasons why we are now using macros to name * There are several reasons why we are now using macros to name public
* public header files. The first one is that such macros are not * header files. The first one is that such macros are not limited to
* limited to the infamous 8.3~naming rule required by DOS (and * the infamous 8.3~naming rule required by DOS (and
* `FT_MULTIPLE_MASTERS_H' is a lot more meaningful than `ftmm.h'). * `FT_MULTIPLE_MASTERS_H` is a lot more meaningful than `ftmm.h`).
* *
* The second reason is that it allows for more flexibility in the * The second reason is that it allows for more flexibility in the way
* way FreeType~2 is installed on a given system. * FreeType~2 is installed on a given system.
* *
*/ */
@ -436,7 +435,7 @@
* *
* @description: * @description:
* A macro used in #include statements to name the file containing the * A macro used in #include statements to name the file containing the
* definitions of TrueType four-byte `tags' which identify blocks in * definitions of TrueType four-byte 'tags' which identify blocks in
* SFNT-based font formats (i.e., TrueType and OpenType). * SFNT-based font formats (i.e., TrueType and OpenType).
* *
*/ */
@ -450,8 +449,7 @@
* *
* @description: * @description:
* A macro used in #include statements to name the file containing the * A macro used in #include statements to name the file containing the
* definitions of an API which accesses BDF-specific strings from a * definitions of an API which accesses BDF-specific strings from a face.
* face.
* *
*/ */
#define FT_BDF_H <freetype/ftbdf.h> #define FT_BDF_H <freetype/ftbdf.h>
@ -464,8 +462,7 @@
* *
* @description: * @description:
* A macro used in #include statements to name the file containing the * A macro used in #include statements to name the file containing the
* definitions of an API which access CID font information from a * definitions of an API which access CID font information from a face.
* face.
* *
*/ */
#define FT_CID_H <freetype/ftcid.h> #define FT_CID_H <freetype/ftcid.h>
@ -582,8 +579,8 @@
* *
* @description: * @description:
* A macro used in #include statements to name the file containing the * A macro used in #include statements to name the file containing the
* Macintosh-specific FreeType~2 API. The latter is used to access * Macintosh-specific FreeType~2 API. The latter is used to access fonts
* fonts embedded in resource forks. * embedded in resource forks.
* *
* This header file must be explicitly included by client applications * This header file must be explicitly included by client applications
* compiled on the Mac (note that the base API still works though). * compiled on the Mac (note that the base API still works though).
@ -612,7 +609,7 @@
* *
* @description: * @description:
* A macro used in #include statements to name the file containing the * A macro used in #include statements to name the file containing the
* optional FreeType~2 API which accesses embedded `name' strings in * optional FreeType~2 API which accesses embedded 'name' strings in
* SFNT-based font formats (i.e., TrueType and OpenType). * SFNT-based font formats (i.e., TrueType and OpenType).
* *
*/ */
@ -801,8 +798,8 @@
/* /*
* Include internal headers definitions from <internal/...> * Include internal headers definitions from <internal/...> only when
* only when building the library. * building the library.
*/ */
#ifdef FT2_BUILD_LIBRARY #ifdef FT2_BUILD_LIBRARY
#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h> #define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>

View File

@ -29,33 +29,33 @@ FT_BEGIN_HEADER
* *
* USER-SELECTABLE CONFIGURATION MACROS * USER-SELECTABLE CONFIGURATION MACROS
* *
* This file contains the default configuration macro definitions for * This file contains the default configuration macro definitions for a
* a standard build of the FreeType library. There are three ways to * standard build of the FreeType library. There are three ways to use
* use this file to build project-specific versions of the library: * this file to build project-specific versions of the library:
* *
* - You can modify this file by hand, but this is not recommended in * - You can modify this file by hand, but this is not recommended in
* cases where you would like to build several versions of the * cases where you would like to build several versions of the library
* library from a single source directory. * from a single source directory.
* *
* - You can put a copy of this file in your build directory, more * - You can put a copy of this file in your build directory, more
* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' * precisely in '$BUILD/freetype/config/ftoption.h', where '$BUILD' is
* is the name of a directory that is included _before_ the FreeType * the name of a directory that is included _before_ the FreeType include
* include path during compilation. * path during compilation.
* *
* The default FreeType Makefiles and Jamfiles use the build * The default FreeType Makefiles and Jamfiles use the build directory
* directory `builds/<system>' by default, but you can easily change * 'builds/<system>' by default, but you can easily change that for your
* that for your own projects. * own projects.
* *
* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it * - Copy the file <ft2build.h> to '$BUILD/ft2build.h' and modify it
* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to * slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to locate
* locate this file during the build. For example, * this file during the build. For example,
* *
* { * ```
* #define FT_CONFIG_OPTIONS_H <myftoptions.h> * #define FT_CONFIG_OPTIONS_H <myftoptions.h>
* #include <freetype/config/ftheader.h> * #include <freetype/config/ftheader.h>
* } * ```
* *
* will use `$BUILD/myftoptions.h' instead of this file for macro * will use '$BUILD/myftoptions.h' instead of this file for macro
* definitions. * definitions.
* *
* Note also that you can similarly pre-define the macro * Note also that you can similarly pre-define the macro
@ -117,35 +117,34 @@ FT_BEGIN_HEADER
* *
* Uncomment the line below if you want to activate LCD rendering * Uncomment the line below if you want to activate LCD rendering
* technology similar to ClearType in this build of the library. This * technology similar to ClearType in this build of the library. This
* technology triples the resolution in the direction color subpixels. * technology triples the resolution in the direction color subpixels. To
* To mitigate color fringes inherent to this technology, you also need * mitigate color fringes inherent to this technology, you also need to
* to explicitly set up LCD filtering. * explicitly set up LCD filtering.
* *
* Note that this feature is covered by several Microsoft patents * Note that this feature is covered by several Microsoft patents and
* and should not be activated in any default build of the library. * should not be activated in any default build of the library. When this
* When this macro is not defined, FreeType offers alternative LCD * macro is not defined, FreeType offers alternative LCD rendering
* rendering technology that produces excellent output without LCD * technology that produces excellent output without LCD filtering.
* filtering.
*/ */
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ /* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
/************************************************************************** /**************************************************************************
* *
* Many compilers provide a non-ANSI 64-bit data type that can be used * Many compilers provide a non-ANSI 64-bit data type that can be used by
* by FreeType to speed up some computations. However, this will create * FreeType to speed up some computations. However, this will create some
* some problems when compiling the library in strict ANSI mode. * problems when compiling the library in strict ANSI mode.
* *
* For this reason, the use of 64-bit integers is normally disabled when * For this reason, the use of 64-bit integers is normally disabled when
* the __STDC__ macro is defined. You can however disable this by * the __STDC__ macro is defined. You can however disable this by defining
* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. * the macro FT_CONFIG_OPTION_FORCE_INT64 here.
* *
* For most compilers, this will only create compilation warnings when * For most compilers, this will only create compilation warnings when
* building the library. * building the library.
* *
* ObNote: The compiler-specific 64-bit integers are detected in the * ObNote: The compiler-specific 64-bit integers are detected in the
* file `ftconfig.h' either statically or through the * file `ftconfig.h` either statically or through the 'configure'
* `configure' script on supported platforms. * script on supported platforms.
*/ */
#undef FT_CONFIG_OPTION_FORCE_INT64 #undef FT_CONFIG_OPTION_FORCE_INT64
@ -154,20 +153,20 @@ FT_BEGIN_HEADER
* *
* If this macro is defined, do not try to use an assembler version of * If this macro is defined, do not try to use an assembler version of
* performance-critical functions (e.g. FT_MulFix). You should only do * performance-critical functions (e.g. FT_MulFix). You should only do
* that to verify that the assembler function works properly, or to * that to verify that the assembler function works properly, or to execute
* execute benchmark tests of the various implementations. * benchmark tests of the various implementations.
*/ */
/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */ /* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
/************************************************************************** /**************************************************************************
* *
* If this macro is defined, try to use an inlined assembler version of * If this macro is defined, try to use an inlined assembler version of the
* the `FT_MulFix' function, which is a `hotspot' when loading and * `FT_MulFix` function, which is a 'hotspot' when loading and hinting
* hinting glyphs, and which should be executed as fast as possible. * glyphs, and which should be executed as fast as possible.
* *
* Note that if your compiler or CPU is not supported, this will default * Note that if your compiler or CPU is not supported, this will default to
* to the standard and portable implementation found in `ftcalc.c'. * the standard and portable implementation found in `ftcalc.c`.
*/ */
#define FT_CONFIG_OPTION_INLINE_MULFIX #define FT_CONFIG_OPTION_INLINE_MULFIX
@ -177,12 +176,12 @@ FT_BEGIN_HEADER
* LZW-compressed file support. * LZW-compressed file support.
* *
* FreeType now handles font files that have been compressed with the * FreeType now handles font files that have been compressed with the
* `compress' program. This is mostly used to parse many of the PCF * 'compress' program. This is mostly used to parse many of the PCF
* files that come with various X11 distributions. The implementation * files that come with various X11 distributions. The implementation
* uses NetBSD's `zopen' to partially uncompress the file on the fly * uses NetBSD's 'zopen' to partially uncompress the file on the fly (see
* (see src/lzw/ftgzip.c). * src/lzw/ftgzip.c).
* *
* Define this macro if you want to enable this `feature'. * Define this macro if you want to enable this 'feature'.
*/ */
#define FT_CONFIG_OPTION_USE_LZW #define FT_CONFIG_OPTION_USE_LZW
@ -192,12 +191,12 @@ FT_BEGIN_HEADER
* Gzip-compressed file support. * Gzip-compressed file support.
* *
* FreeType now handles font files that have been compressed with the * FreeType now handles font files that have been compressed with the
* `gzip' program. This is mostly used to parse many of the PCF files * 'gzip' program. This is mostly used to parse many of the PCF files
* that come with XFree86. The implementation uses `zlib' to * that come with XFree86. The implementation uses 'zlib' to partially
* partially uncompress the file on the fly (see src/gzip/ftgzip.c). * uncompress the file on the fly (see src/gzip/ftgzip.c).
* *
* Define this macro if you want to enable this `feature'. See also * Define this macro if you want to enable this 'feature'. See also the
* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. * macro FT_CONFIG_OPTION_SYSTEM_ZLIB below.
*/ */
#define FT_CONFIG_OPTION_USE_ZLIB #define FT_CONFIG_OPTION_USE_ZLIB
@ -206,23 +205,23 @@ FT_BEGIN_HEADER
* *
* ZLib library selection * ZLib library selection
* *
* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. * This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. It
* It allows FreeType's `ftgzip' component to link to the system's * allows FreeType's 'ftgzip' component to link to the system's
* installation of the ZLib library. This is useful on systems like * installation of the ZLib library. This is useful on systems like Unix
* Unix or VMS where it generally is already available. * or VMS where it generally is already available.
* *
* If you let it undefined, the component will use its own copy * If you let it undefined, the component will use its own copy of the
* of the zlib sources instead. These have been modified to be * zlib sources instead. These have been modified to be included
* included directly within the component and *not* export external * directly within the component and **not** export external function
* function names. This allows you to link any program with FreeType * names. This allows you to link any program with FreeType _and_ ZLib
* _and_ ZLib without linking conflicts. * without linking conflicts.
* *
* Do not #undef this macro here since the build system might define * Do not #undef this macro here since the build system might define it
* it for certain configurations only. * for certain configurations only.
* *
* If you use a build system like cmake or the `configure' script, * If you use a build system like cmake or the 'configure' script,
* options set by those programs have precendence, overwriting the * options set by those programs have precendence, overwriting the value
* value here with the configured one. * here with the configured one.
*/ */
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
@ -232,17 +231,17 @@ FT_BEGIN_HEADER
* Bzip2-compressed file support. * Bzip2-compressed file support.
* *
* FreeType now handles font files that have been compressed with the * FreeType now handles font files that have been compressed with the
* `bzip2' program. This is mostly used to parse many of the PCF * 'bzip2' program. This is mostly used to parse many of the PCF files
* files that come with XFree86. The implementation uses `libbz2' to * that come with XFree86. The implementation uses 'libbz2' to partially
* partially uncompress the file on the fly (see src/bzip2/ftbzip2.c). * uncompress the file on the fly (see src/bzip2/ftbzip2.c). Contrary to
* Contrary to gzip, bzip2 currently is not included and need to use * gzip, bzip2 currently is not included and need to use the system
* the system available bzip2 implementation. * available bzip2 implementation.
* *
* Define this macro if you want to enable this `feature'. * Define this macro if you want to enable this 'feature'.
* *
* If you use a build system like cmake or the `configure' script, * If you use a build system like cmake or the 'configure' script,
* options set by those programs have precendence, overwriting the * options set by those programs have precendence, overwriting the value
* value here with the configured one. * here with the configured one.
*/ */
/* #define FT_CONFIG_OPTION_USE_BZIP2 */ /* #define FT_CONFIG_OPTION_USE_BZIP2 */
@ -251,9 +250,9 @@ FT_BEGIN_HEADER
* *
* Define to disable the use of file stream functions and types, FILE, * Define to disable the use of file stream functions and types, FILE,
* fopen() etc. Enables the use of smaller system libraries on embedded * fopen() etc. Enables the use of smaller system libraries on embedded
* systems that have multiple system libraries, some with or without * systems that have multiple system libraries, some with or without file
* file stream support, in the cases where file stream support is not * stream support, in the cases where file stream support is not necessary
* necessary such as memory loading of font files. * such as memory loading of font files.
*/ */
/* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */ /* #define FT_CONFIG_OPTION_DISABLE_STREAM_SUPPORT */
@ -264,14 +263,14 @@ FT_BEGIN_HEADER
* *
* FreeType now handles loading color bitmap glyphs in the PNG format. * FreeType now handles loading color bitmap glyphs in the PNG format.
* This requires help from the external libpng library. Uncompressed * This requires help from the external libpng library. Uncompressed
* color bitmaps do not need any external libraries and will be * color bitmaps do not need any external libraries and will be supported
* supported regardless of this configuration. * regardless of this configuration.
* *
* Define this macro if you want to enable this `feature'. * Define this macro if you want to enable this 'feature'.
* *
* If you use a build system like cmake or the `configure' script, * If you use a build system like cmake or the 'configure' script,
* options set by those programs have precendence, overwriting the * options set by those programs have precendence, overwriting the value
* value here with the configured one. * here with the configured one.
*/ */
/* #define FT_CONFIG_OPTION_USE_PNG */ /* #define FT_CONFIG_OPTION_USE_PNG */
@ -280,15 +279,15 @@ FT_BEGIN_HEADER
* *
* HarfBuzz support. * HarfBuzz support.
* *
* FreeType uses the HarfBuzz library to improve auto-hinting of * FreeType uses the HarfBuzz library to improve auto-hinting of OpenType
* OpenType fonts. If available, many glyphs not directly addressable * fonts. If available, many glyphs not directly addressable by a font's
* by a font's character map will be hinted also. * character map will be hinted also.
* *
* Define this macro if you want to enable this `feature'. * Define this macro if you want to enable this 'feature'.
* *
* If you use a build system like cmake or the `configure' script, * If you use a build system like cmake or the 'configure' script,
* options set by those programs have precendence, overwriting the * options set by those programs have precendence, overwriting the value
* value here with the configured one. * here with the configured one.
*/ */
/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */ /* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
@ -297,23 +296,23 @@ FT_BEGIN_HEADER
* *
* Glyph Postscript Names handling * Glyph Postscript Names handling
* *
* By default, FreeType 2 is compiled with the `psnames' module. This * By default, FreeType 2 is compiled with the 'psnames' module. This
* module is in charge of converting a glyph name string into a * module is in charge of converting a glyph name string into a Unicode
* Unicode value, or return a Macintosh standard glyph name for the * value, or return a Macintosh standard glyph name for the use with the
* use with the TrueType `post' table. * TrueType 'post' table.
* *
* Undefine this macro if you do not want `psnames' compiled in your * Undefine this macro if you do not want 'psnames' compiled in your
* build of FreeType. This has the following effects: * build of FreeType. This has the following effects:
* *
* - The TrueType driver will provide its own set of glyph names, * - The TrueType driver will provide its own set of glyph names,
* if you build it to support postscript names in the TrueType * if you build it to support postscript names in the TrueType 'post'
* `post' table, but will not synthesize a missing Unicode charmap. * table, but will not synthesize a missing Unicode charmap.
* *
* - The Type 1 driver will not be able to synthesize a Unicode * - The Type 1 driver will not be able to synthesize a Unicode
* charmap out of the glyphs found in the fonts. * charmap out of the glyphs found in the fonts.
* *
* You would normally undefine this configuration macro when building * You would normally undefine this configuration macro when building a
* a version of FreeType that doesn't contain a Type 1 or CFF driver. * version of FreeType that doesn't contain a Type 1 or CFF driver.
*/ */
#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES #define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
@ -322,16 +321,15 @@ FT_BEGIN_HEADER
* *
* Postscript Names to Unicode Values support * Postscript Names to Unicode Values support
* *
* By default, FreeType 2 is built with the `PSNames' module compiled * By default, FreeType 2 is built with the 'PSNames' module compiled in.
* in. Among other things, the module is used to convert a glyph name * Among other things, the module is used to convert a glyph name into a
* into a Unicode value. This is especially useful in order to * Unicode value. This is especially useful in order to synthesize on
* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver * the fly a Unicode charmap from the CFF/Type 1 driver through a big
* through a big table named the `Adobe Glyph List' (AGL). * table named the 'Adobe Glyph List' (AGL).
* *
* Undefine this macro if you do not want the Adobe Glyph List * Undefine this macro if you do not want the Adobe Glyph List compiled
* compiled in your `PSNames' module. The Type 1 driver will not be * in your 'PSNames' module. The Type 1 driver will not be able to
* able to synthesize a Unicode charmap out of the glyphs found in the * synthesize a Unicode charmap out of the glyphs found in the fonts.
* fonts.
*/ */
#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
@ -340,11 +338,11 @@ FT_BEGIN_HEADER
* *
* Support for Mac fonts * Support for Mac fonts
* *
* Define this macro if you want support for outline fonts in Mac * Define this macro if you want support for outline fonts in Mac format
* format (mac dfont, mac resource, macbinary containing a mac * (mac dfont, mac resource, macbinary containing a mac resource) on
* resource) on non-Mac platforms. * non-Mac platforms.
* *
* Note that the `FOND' resource isn't checked. * Note that the 'FOND' resource isn't checked.
*/ */
#define FT_CONFIG_OPTION_MAC_FONTS #define FT_CONFIG_OPTION_MAC_FONTS
@ -358,10 +356,9 @@ FT_BEGIN_HEADER
* Resource forks which include fonts data are stored sometimes in * Resource forks which include fonts data are stored sometimes in
* locations which users or developers don't expected. In some cases, * locations which users or developers don't expected. In some cases,
* resource forks start with some offset from the head of a file. In * resource forks start with some offset from the head of a file. In
* other cases, the actual resource fork is stored in file different * other cases, the actual resource fork is stored in file different from
* from what the user specifies. If this option is activated, * what the user specifies. If this option is activated, FreeType tries
* FreeType tries to guess whether such offsets or different file * to guess whether such offsets or different file names must be used.
* names must be used.
* *
* Note that normal, direct access of resource forks is controlled via * Note that normal, direct access of resource forks is controlled via
* the FT_CONFIG_OPTION_MAC_FONTS option. * the FT_CONFIG_OPTION_MAC_FONTS option.
@ -373,19 +370,19 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Allow the use of FT_Incremental_Interface to load typefaces that * Allow the use of FT_Incremental_Interface to load typefaces that contain
* contain no glyph data, but supply it via a callback function. * no glyph data, but supply it via a callback function. This is required
* This is required by clients supporting document formats which * by clients supporting document formats which supply font data
* supply font data incrementally as the document is parsed, such * incrementally as the document is parsed, such as the Ghostscript
* as the Ghostscript interpreter for the PostScript language. * interpreter for the PostScript language.
*/ */
#define FT_CONFIG_OPTION_INCREMENTAL #define FT_CONFIG_OPTION_INCREMENTAL
/************************************************************************** /**************************************************************************
* *
* The size in bytes of the render pool used by the scan-line converter * The size in bytes of the render pool used by the scan-line converter to
* to do all of its work. * do all of its work.
*/ */
#define FT_RENDER_POOL_SIZE 16384L #define FT_RENDER_POOL_SIZE 16384L
@ -405,14 +402,13 @@ FT_BEGIN_HEADER
* Debug level * Debug level
* *
* FreeType can be compiled in debug or trace mode. In debug mode, * FreeType can be compiled in debug or trace mode. In debug mode,
* errors are reported through the `ftdebug' component. In trace * errors are reported through the 'ftdebug' component. In trace mode,
* mode, additional messages are sent to the standard output during * additional messages are sent to the standard output during execution.
* execution.
* *
* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. * Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode.
* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. * Define FT_DEBUG_LEVEL_TRACE to build it in trace mode.
* *
* Don't define any of these macros to compile in `release' mode! * Don't define any of these macros to compile in 'release' mode!
* *
* Do not #undef these macros here since the build system might define * Do not #undef these macros here since the build system might define
* them for certain configurations only. * them for certain configurations only.
@ -427,33 +423,33 @@ FT_BEGIN_HEADER
* *
* If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to * If FT_DEBUG_AUTOFIT is defined, FreeType provides some means to
* control the autofitter behaviour for debugging purposes with global * control the autofitter behaviour for debugging purposes with global
* boolean variables (consequently, you should *never* enable this * boolean variables (consequently, you should **never** enable this
* while compiling in `release' mode): * while compiling in 'release' mode):
* *
* { * ```
* _af_debug_disable_horz_hints * _af_debug_disable_horz_hints
* _af_debug_disable_vert_hints * _af_debug_disable_vert_hints
* _af_debug_disable_blue_hints * _af_debug_disable_blue_hints
* } * ```
* *
* Additionally, the following functions provide dumps of various * Additionally, the following functions provide dumps of various
* internal autofit structures to stdout (using `printf'): * internal autofit structures to stdout (using 'printf'):
* *
* { * ```
* af_glyph_hints_dump_points * af_glyph_hints_dump_points
* af_glyph_hints_dump_segments * af_glyph_hints_dump_segments
* af_glyph_hints_dump_edges * af_glyph_hints_dump_edges
* af_glyph_hints_get_num_segments * af_glyph_hints_get_num_segments
* af_glyph_hints_get_segment_offset * af_glyph_hints_get_segment_offset
* } * ```
* *
* As an argument, they use another global variable: * As an argument, they use another global variable:
* *
* { * ```
* _af_debug_hints * _af_debug_hints
* } * ```
* *
* Please have a look at the `ftgrid' demo program to see how those * Please have a look at the 'ftgrid' demo program to see how those
* variables and macros should be used. * variables and macros should be used.
* *
* Do not #undef these macros here since the build system might define * Do not #undef these macros here since the build system might define
@ -466,16 +462,16 @@ FT_BEGIN_HEADER
* *
* Memory Debugging * Memory Debugging
* *
* FreeType now comes with an integrated memory debugger that is * FreeType now comes with an integrated memory debugger that is capable
* capable of detecting simple errors like memory leaks or double * of detecting simple errors like memory leaks or double deletes. To
* deletes. To compile it within your build of the library, you * compile it within your build of the library, you should define
* should define FT_DEBUG_MEMORY here. * FT_DEBUG_MEMORY here.
* *
* Note that the memory debugger is only activated at runtime when * Note that the memory debugger is only activated at runtime when when
* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! * the _environment_ variable `FT2_DEBUG_MEMORY` is defined also!
* *
* Do not #undef this macro here since the build system might define * Do not #undef this macro here since the build system might define it
* it for certain configurations only. * for certain configurations only.
*/ */
/* #define FT_DEBUG_MEMORY */ /* #define FT_DEBUG_MEMORY */
@ -484,13 +480,13 @@ FT_BEGIN_HEADER
* *
* Module errors * Module errors
* *
* If this macro is set (which is _not_ the default), the higher byte * If this macro is set (which is _not_ the default), the higher byte of
* of an error code gives the module in which the error has occurred, * an error code gives the module in which the error has occurred, while
* while the lower byte is the real error code. * the lower byte is the real error code.
* *
* Setting this macro makes sense for debugging purposes only, since * Setting this macro makes sense for debugging purposes only, since it
* it would break source compatibility of certain programs that use * would break source compatibility of certain programs that use FreeType
* FreeType 2. * 2.
* *
* More details can be found in the files ftmoderr.h and fterrors.h. * More details can be found in the files ftmoderr.h and fterrors.h.
*/ */
@ -508,9 +504,9 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support * Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support embedded
* embedded bitmaps in all formats using the SFNT module (namely * bitmaps in all formats using the SFNT module (namely TrueType &
* TrueType & OpenType). * OpenType).
*/ */
#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS
@ -526,29 +522,28 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to * Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to load
* load and enumerate the glyph Postscript names in a TrueType or * and enumerate the glyph Postscript names in a TrueType or OpenType file.
* OpenType file.
* *
* Note that when you do not compile the `PSNames' module by undefining * Note that when you do not compile the 'PSNames' module by undefining the
* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will * above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the 'sfnt' module will contain
* contain additional code used to read the PS Names table from a font. * additional code used to read the PS Names table from a font.
* *
* (By default, the module uses `PSNames' to extract glyph names.) * (By default, the module uses 'PSNames' to extract glyph names.)
*/ */
#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES #define TT_CONFIG_OPTION_POSTSCRIPT_NAMES
/************************************************************************** /**************************************************************************
* *
* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to * Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to access
* access the internal name table in a SFNT-based format like TrueType * the internal name table in a SFNT-based format like TrueType or
* or OpenType. The name table contains various strings used to * OpenType. The name table contains various strings used to describe the
* describe the font, like family name, copyright, version, etc. It * font, like family name, copyright, version, etc. It does not contain
* does not contain any glyph name though. * any glyph name though.
* *
* Accessing SFNT names is done through the functions declared in * Accessing SFNT names is done through the functions declared in
* `ftsnames.h'. * `ftsnames.h`.
*/ */
#define TT_CONFIG_OPTION_SFNT_NAMES #define TT_CONFIG_OPTION_SFNT_NAMES
@ -581,54 +576,52 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile * Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile a
* a bytecode interpreter in the TrueType driver. * bytecode interpreter in the TrueType driver.
* *
* By undefining this, you will only compile the code necessary to load * By undefining this, you will only compile the code necessary to load
* TrueType glyphs without hinting. * TrueType glyphs without hinting.
* *
* Do not #undef this macro here, since the build system might * Do not #undef this macro here, since the build system might define it
* define it for certain configurations only. * for certain configurations only.
*/ */
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/************************************************************************** /**************************************************************************
* *
* Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile * Define TT_CONFIG_OPTION_SUBPIXEL_HINTING if you want to compile subpixel
* subpixel hinting support into the TrueType driver. This modifies the * hinting support into the TrueType driver. This modifies the TrueType
* TrueType hinting mechanism when anything but FT_RENDER_MODE_MONO is * hinting mechanism when anything but FT_RENDER_MODE_MONO is requested.
* requested.
* *
* In particular, it modifies the bytecode interpreter to interpret (or * In particular, it modifies the bytecode interpreter to interpret (or
* not) instructions in a certain way so that all TrueType fonts look * not) instructions in a certain way so that all TrueType fonts look like
* like they do in a Windows ClearType (DirectWrite) environment. See * they do in a Windows ClearType (DirectWrite) environment. See [1] for a
* [1] for a technical overview on what this means. See `ttinterp.h' * technical overview on what this means. See `ttinterp.h` for more
* for more details on the LEAN option. * details on the LEAN option.
* *
* There are three possible values. * There are three possible values.
* *
* Value 1: * Value 1:
* This value is associated with the `Infinality' moniker, * This value is associated with the 'Infinality' moniker, contributed by
* contributed by an individual nicknamed Infinality with the goal of * an individual nicknamed Infinality with the goal of making TrueType
* making TrueType fonts render better than on Windows. A high * fonts render better than on Windows. A high amount of configurability
* amount of configurability and flexibility, down to rules for * and flexibility, down to rules for single glyphs in fonts, but also
* single glyphs in fonts, but also very slow. Its experimental and * very slow. Its experimental and slow nature and the original
* slow nature and the original developer losing interest meant that * developer losing interest meant that this option was never enabled in
* this option was never enabled in default builds. * default builds.
* *
* The corresponding interpreter version is v38. * The corresponding interpreter version is v38.
* *
* Value 2: * Value 2:
* The new default mode for the TrueType driver. The Infinality code * The new default mode for the TrueType driver. The Infinality code
* base was stripped to the bare minimum and all configurability * base was stripped to the bare minimum and all configurability removed
* removed in the name of speed and simplicity. The configurability * in the name of speed and simplicity. The configurability was mainly
* was mainly aimed at legacy fonts like Arial, Times New Roman, or * aimed at legacy fonts like Arial, Times New Roman, or Courier. Legacy
* Courier. Legacy fonts are fonts that modify vertical stems to * fonts are fonts that modify vertical stems to achieve clean
* achieve clean black-and-white bitmaps. The new mode focuses on * black-and-white bitmaps. The new mode focuses on applying a minimal
* applying a minimal set of rules to all fonts indiscriminately so * set of rules to all fonts indiscriminately so that modern and web
* that modern and web fonts render well while legacy fonts render * fonts render well while legacy fonts render okay.
* okay.
* *
* The corresponding interpreter version is v40. * The corresponding interpreter version is v40.
* *
@ -636,18 +629,18 @@ FT_BEGIN_HEADER
* Compile both, making both v38 and v40 available (the latter is the * Compile both, making both v38 and v40 available (the latter is the
* default). * default).
* *
* By undefining these, you get rendering behavior like on Windows * By undefining these, you get rendering behavior like on Windows without
* without ClearType, i.e., Windows XP without ClearType enabled and * ClearType, i.e., Windows XP without ClearType enabled and Win9x
* Win9x (interpreter version v35). Or not, depending on how much * (interpreter version v35). Or not, depending on how much hinting blood
* hinting blood and testing tears the font designer put into a given * and testing tears the font designer put into a given font. If you
* font. If you define one or both subpixel hinting options, you can * define one or both subpixel hinting options, you can switch between
* switch between between v35 and the ones you define (using * between v35 and the ones you define (using `FT_Property_Set`).
* `FT_Property_Set').
* *
* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be * This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be
* defined. * defined.
* *
* [1] https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx * [1]
* https://www.microsoft.com/typography/cleartype/truetypecleartype.aspx
*/ */
/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */ /* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 1 */
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2 #define TT_CONFIG_OPTION_SUBPIXEL_HINTING 2
@ -656,16 +649,16 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the * Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the TrueType
* TrueType glyph loader to use Apple's definition of how to handle * glyph loader to use Apple's definition of how to handle component
* component offsets in composite glyphs. * offsets in composite glyphs.
* *
* Apple and MS disagree on the default behavior of component offsets * Apple and MS disagree on the default behavior of component offsets in
* in composites. Apple says that they should be scaled by the scaling * composites. Apple says that they should be scaled by the scaling
* factors in the transformation matrix (roughly, it's more complex) * factors in the transformation matrix (roughly, it's more complex) while
* while MS says they should not. OpenType defines two bits in the * MS says they should not. OpenType defines two bits in the composite
* composite flags array which can be used to disambiguate, but old * flags array which can be used to disambiguate, but old fonts will not
* fonts will not have them. * have them.
* *
* https://www.microsoft.com/typography/otspec/glyf.htm * https://www.microsoft.com/typography/otspec/glyf.htm
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html
@ -675,34 +668,33 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include * Define TT_CONFIG_OPTION_GX_VAR_SUPPORT if you want to include support
* support for Apple's distortable font technology (fvar, gvar, cvar, * for Apple's distortable font technology (fvar, gvar, cvar, and avar
* and avar tables). This has many similarities to Type 1 Multiple * tables). This has many similarities to Type 1 Multiple Masters support.
* Masters support.
*/ */
#define TT_CONFIG_OPTION_GX_VAR_SUPPORT #define TT_CONFIG_OPTION_GX_VAR_SUPPORT
/************************************************************************** /**************************************************************************
* *
* Define TT_CONFIG_OPTION_BDF if you want to include support for * Define TT_CONFIG_OPTION_BDF if you want to include support for an
* an embedded `BDF ' table within SFNT-based bitmap formats. * embedded 'BDF ' table within SFNT-based bitmap formats.
*/ */
#define TT_CONFIG_OPTION_BDF #define TT_CONFIG_OPTION_BDF
/************************************************************************** /**************************************************************************
* *
* Option TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES controls the maximum * Option TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES controls the maximum number
* number of bytecode instructions executed for a single run of the * of bytecode instructions executed for a single run of the bytecode
* bytecode interpreter, needed to prevent infinite loops. You don't * interpreter, needed to prevent infinite loops. You don't want to change
* want to change this except for very special situations (e.g., making * this except for very special situations (e.g., making a library fuzzer
* a library fuzzer spend less time to handle broken fonts). * spend less time to handle broken fonts).
* *
* It is not expected that this value is ever modified by a configuring * It is not expected that this value is ever modified by a configuring
* script; instead, it gets surrounded with #ifndef ... #endif so that * script; instead, it gets surrounded with #ifndef ... #endif so that the
* the value can be set as a preprocessor option on the compiler's * value can be set as a preprocessor option on the compiler's command
* command line. * line.
*/ */
#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES #ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L #define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L
@ -720,9 +712,8 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and * T1_MAX_DICT_DEPTH is the maximum depth of nest dictionaries and arrays
* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is * in the Type 1 stream (see t1load.c). A minimum of 4 is required.
* required.
*/ */
#define T1_MAX_DICT_DEPTH 5 #define T1_MAX_DICT_DEPTH 5
@ -747,29 +738,28 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Define this configuration macro if you want to prevent the * Define this configuration macro if you want to prevent the compilation
* compilation of `t1afm', which is in charge of reading Type 1 AFM * of 't1afm', which is in charge of reading Type 1 AFM files into an
* files into an existing face. Note that if set, the T1 driver will be * existing face. Note that if set, the T1 driver will be unable to
* unable to produce kerning distances. * produce kerning distances.
*/ */
#undef T1_CONFIG_OPTION_NO_AFM #undef T1_CONFIG_OPTION_NO_AFM
/************************************************************************** /**************************************************************************
* *
* Define this configuration macro if you want to prevent the * Define this configuration macro if you want to prevent the compilation
* compilation of the Multiple Masters font support in the Type 1 * of the Multiple Masters font support in the Type 1 driver.
* driver.
*/ */
#undef T1_CONFIG_OPTION_NO_MM_SUPPORT #undef T1_CONFIG_OPTION_NO_MM_SUPPORT
/************************************************************************** /**************************************************************************
* *
* T1_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe Type 1 * T1_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe Type 1 engine
* engine gets compiled into FreeType. If defined, it is possible to * gets compiled into FreeType. If defined, it is possible to switch
* switch between the two engines using the `hinting-engine' property of * between the two engines using the 'hinting-engine' property of the type1
* the type1 driver module. * driver module.
*/ */
/* #define T1_CONFIG_OPTION_OLD_ENGINE */ /* #define T1_CONFIG_OPTION_OLD_ENGINE */
@ -787,12 +777,11 @@ FT_BEGIN_HEADER
* *
* Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is * Using CFF_CONFIG_OPTION_DARKENING_PARAMETER_{X,Y}{1,2,3,4} it is
* possible to set up the default values of the four control points that * possible to set up the default values of the four control points that
* define the stem darkening behaviour of the (new) CFF engine. For * define the stem darkening behaviour of the (new) CFF engine. For more
* more details please read the documentation of the * details please read the documentation of the 'darkening-parameters'
* `darkening-parameters' property (file `ftdriver.h'), which allows the * property (file `ftdriver.h`), which allows the control at run-time.
* control at run-time.
* *
* Do *not* undefine these macros! * Do **not** undefine these macros!
*/ */
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500 #define CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 500
#define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400 #define CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 400
@ -809,10 +798,10 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF * CFF_CONFIG_OPTION_OLD_ENGINE controls whether the pre-Adobe CFF engine
* engine gets compiled into FreeType. If defined, it is possible to * gets compiled into FreeType. If defined, it is possible to switch
* switch between the two engines using the `hinting-engine' property of * between the two engines using the 'hinting-engine' property of the cff
* the cff driver module. * driver module.
*/ */
/* #define CFF_CONFIG_OPTION_OLD_ENGINE */ /* #define CFF_CONFIG_OPTION_OLD_ENGINE */
@ -828,18 +817,18 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* There are many PCF fonts just called `Fixed' which look completely * There are many PCF fonts just called 'Fixed' which look completely
* different, and which have nothing to do with each other. When * different, and which have nothing to do with each other. When selecting
* selecting `Fixed' in KDE or Gnome one gets results that appear rather * 'Fixed' in KDE or Gnome one gets results that appear rather random, the
* random, the style changes often if one changes the size and one * style changes often if one changes the size and one cannot select some
* cannot select some fonts at all. This option makes the PCF module * fonts at all. This option makes the PCF module prepend the foundry name
* prepend the foundry name (plus a space) to the family name. * (plus a space) to the family name.
* *
* We also check whether we have `wide' characters; all put together, we * We also check whether we have 'wide' characters; all put together, we
* get family names like `Sony Fixed' or `Misc Fixed Wide'. * get family names like 'Sony Fixed' or 'Misc Fixed Wide'.
* *
* If this option is activated, it can be controlled with the * If this option is activated, it can be controlled with the
* `no-long-family-names' property of the pcf driver module. * 'no-long-family-names' property of the pcf driver module.
*/ */
/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ /* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
@ -862,44 +851,44 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Compile autofit module with fallback Indic script support, covering * Compile autofit module with fallback Indic script support, covering some
* some scripts that the `latin' submodule of the autofit module doesn't * scripts that the 'latin' submodule of the autofit module doesn't (yet)
* (yet) handle. * handle.
*/ */
#define AF_CONFIG_OPTION_INDIC #define AF_CONFIG_OPTION_INDIC
/************************************************************************** /**************************************************************************
* *
* Compile autofit module with warp hinting. The idea of the warping * Compile autofit module with warp hinting. The idea of the warping code
* code is to slightly scale and shift a glyph within a single dimension * is to slightly scale and shift a glyph within a single dimension so that
* so that as much of its segments are aligned (more or less) on the * as much of its segments are aligned (more or less) on the grid. To find
* grid. To find out the optimal scaling and shifting value, various * out the optimal scaling and shifting value, various parameter
* parameter combinations are tried and scored. * combinations are tried and scored.
* *
* This experimental option is active only if the rendering mode is * This experimental option is active only if the rendering mode is
* FT_RENDER_MODE_LIGHT; you can switch warping on and off with the * FT_RENDER_MODE_LIGHT; you can switch warping on and off with the
* `warping' property of the auto-hinter (see file `ftdriver.h' for more * 'warping' property of the auto-hinter (see file `ftdriver.h` for more
* information; by default it is switched off). * information; by default it is switched off).
*/ */
#define AF_CONFIG_OPTION_USE_WARPER #define AF_CONFIG_OPTION_USE_WARPER
/************************************************************************** /**************************************************************************
* *
* Use TrueType-like size metrics for `light' auto-hinting. * Use TrueType-like size metrics for 'light' auto-hinting.
* *
* It is strongly recommended to avoid this option, which exists only to * It is strongly recommended to avoid this option, which exists only to
* help some legacy applications retain its appearance and behaviour * help some legacy applications retain its appearance and behaviour with
* with respect to auto-hinted TrueType fonts. * respect to auto-hinted TrueType fonts.
* *
* The very reason this option exists at all are GNU/Linux distributions * The very reason this option exists at all are GNU/Linux distributions
* like Fedora that did not un-patch the following change (which was * like Fedora that did not un-patch the following change (which was
* present in FreeType between versions 2.4.6 and 2.7.1, inclusive). * present in FreeType between versions 2.4.6 and 2.7.1, inclusive).
* *
* { * ```
* 2011-07-16 Steven Chu <steven.f.chu@gmail.com> * 2011-07-16 Steven Chu <steven.f.chu@gmail.com>
* *
* [truetype] Fix metrics on size request for scalable fonts. * [truetype] Fix metrics on size request for scalable fonts.
* } * ```
* *
* This problematic commit is now reverted (more or less). * This problematic commit is now reverted (more or less).
*/ */
@ -909,8 +898,8 @@ FT_BEGIN_HEADER
/* /*
* This macro is obsolete. Support has been removed in FreeType * This macro is obsolete. Support has been removed in FreeType version
* version 2.5. * 2.5.
*/ */
/* #define FT_CONFIG_OPTION_OLD_INTERNALS */ /* #define FT_CONFIG_OPTION_OLD_INTERNALS */

View File

@ -41,17 +41,17 @@
* *
* integer limits * integer limits
* *
* UINT_MAX and ULONG_MAX are used to automatically compute the size * UINT_MAX and ULONG_MAX are used to automatically compute the size of
* of `int' and `long' in bytes at compile-time. So far, this works * 'int' and 'long' in bytes at compile-time. So far, this works for all
* for all platforms the library has been tested on. * platforms the library has been tested on.
* *
* Note that on the extremely rare platforms that do not provide * Note that on the extremely rare platforms that do not provide integer
* integer types that are _exactly_ 16 and 32 bits wide (e.g. some * types that are _exactly_ 16 and 32 bits wide (e.g. some old Crays where
* old Crays where `int' is 36 bits), we do not make any guarantee * 'int' is 36 bits), we do not make any guarantee about the correct
* about the correct behaviour of FT2 with all fonts. * behaviour of FT2 with all fonts.
* *
* In these case, `ftconfig.h' will refuse to compile anyway with a * In these case, `ftconfig.h` will refuse to compile anyway with a message
* message like `couldn't find 32-bit type' or something similar. * like 'couldn't find 32-bit type' or something similar.
* *
*/ */

File diff suppressed because it is too large Load Diff

View File

@ -62,20 +62,18 @@ FT_BEGIN_HEADER
* FT_ADVANCE_FLAG_FAST_ONLY * FT_ADVANCE_FLAG_FAST_ONLY
* *
* @description: * @description:
* A bit-flag to be OR-ed with the `flags' parameter of the * A bit-flag to be OR-ed with the 'flags' parameter of the
* @FT_Get_Advance and @FT_Get_Advances functions. * @FT_Get_Advance and @FT_Get_Advances functions.
* *
* If set, it indicates that you want these functions to fail if the * If set, it indicates that you want these functions to fail if the
* corresponding hinting mode or font driver doesn't allow for very * corresponding hinting mode or font driver doesn't allow for very quick
* quick advance computation. * advance computation.
* *
* Typically, glyphs that are either unscaled, unhinted, bitmapped, * Typically, glyphs that are either unscaled, unhinted, bitmapped, or
* or light-hinted can have their advance width computed very * light-hinted can have their advance width computed very quickly.
* quickly.
* *
* Normal and bytecode hinted modes that require loading, scaling, * Normal and bytecode hinted modes that require loading, scaling, and
* and hinting of the glyph outline, are extremely slow by * hinting of the glyph outline, are extremely slow by comparison.
* comparison.
*/ */
#define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000L #define FT_ADVANCE_FLAG_FAST_ONLY 0x20000000L
@ -86,8 +84,7 @@ FT_BEGIN_HEADER
* FT_Get_Advance * FT_Get_Advance
* *
* @description: * @description:
* Retrieve the advance value of a given glyph outline in an * Retrieve the advance value of a given glyph outline in an @FT_Face.
* @FT_Face.
* *
* @input: * @input:
* face :: * face ::
@ -97,30 +94,28 @@ FT_BEGIN_HEADER
* The glyph index. * The glyph index.
* *
* load_flags :: * load_flags ::
* A set of bit flags similar to those used when * A set of bit flags similar to those used when calling
* calling @FT_Load_Glyph, used to determine what kind * @FT_Load_Glyph, used to determine what kind of advances you need.
* of advances you need.
* @output: * @output:
* padvance :: * padvance ::
* The advance value. If scaling is performed (based on * The advance value. If scaling is performed (based on the value of
* the value of `load_flags'), the advance value is in * `load_flags`), the advance value is in 16.16 format. Otherwise, it
* 16.16 format. Otherwise, it is in font units. * is in font units.
* *
* If @FT_LOAD_VERTICAL_LAYOUT is set, this is the * If @FT_LOAD_VERTICAL_LAYOUT is set, this is the vertical advance
* vertical advance corresponding to a vertical layout. * corresponding to a vertical layout. Otherwise, it is the horizontal
* Otherwise, it is the horizontal advance in a * advance in a horizontal layout.
* horizontal layout.
* *
* @return: * @return:
* FreeType error code. 0 means success. * FreeType error code. 0 means success.
* *
* @note: * @note:
* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and * This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and if
* if the corresponding font backend doesn't have a quick way to * the corresponding font backend doesn't have a quick way to retrieve
* retrieve the advances. * the advances.
* *
* A scaled advance is returned in 16.16 format but isn't transformed * A scaled advance is returned in 16.16 format but isn't transformed by
* by the affine transformation specified by @FT_Set_Transform. * the affine transformation specified by @FT_Set_Transform.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Get_Advance( FT_Face face, FT_Get_Advance( FT_Face face,
@ -135,8 +130,7 @@ FT_BEGIN_HEADER
* FT_Get_Advances * FT_Get_Advances
* *
* @description: * @description:
* Retrieve the advance values of several glyph outlines in an * Retrieve the advance values of several glyph outlines in an @FT_Face.
* @FT_Face.
* *
* @input: * @input:
* face :: * face ::
@ -149,34 +143,32 @@ FT_BEGIN_HEADER
* The number of advance values you want to retrieve. * The number of advance values you want to retrieve.
* *
* load_flags :: * load_flags ::
* A set of bit flags similar to those used when * A set of bit flags similar to those used when calling
* calling @FT_Load_Glyph. * @FT_Load_Glyph.
* *
* @output: * @output:
* padvance :: * padvance ::
* The advance values. This array, to be provided by the * The advance values. This array, to be provided by the caller, must
* caller, must contain at least `count' elements. * contain at least 'count' elements.
* *
* If scaling is performed (based on the value of * If scaling is performed (based on the value of `load_flags`), the
* `load_flags'), the advance values are in 16.16 format. * advance values are in 16.16 format. Otherwise, they are in font
* Otherwise, they are in font units. * units.
* *
* If @FT_LOAD_VERTICAL_LAYOUT is set, these are the * If @FT_LOAD_VERTICAL_LAYOUT is set, these are the vertical advances
* vertical advances corresponding to a vertical layout. * corresponding to a vertical layout. Otherwise, they are the
* Otherwise, they are the horizontal advances in a * horizontal advances in a horizontal layout.
* horizontal layout.
* *
* @return: * @return:
* FreeType error code. 0 means success. * FreeType error code. 0 means success.
* *
* @note: * @note:
* This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and * This function may fail if you use @FT_ADVANCE_FLAG_FAST_ONLY and if
* if the corresponding font backend doesn't have a quick way to * the corresponding font backend doesn't have a quick way to retrieve
* retrieve the advances. * the advances.
* *
* Scaled advances are returned in 16.16 format but aren't * Scaled advances are returned in 16.16 format but aren't transformed by
* transformed by the affine transformation specified by * the affine transformation specified by @FT_Set_Transform.
* @FT_Set_Transform.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Get_Advances( FT_Face face, FT_Get_Advances( FT_Face face,

View File

@ -22,7 +22,7 @@
* boxes. * boxes.
* *
* It is separated from the rest of the engine for various technical * It is separated from the rest of the engine for various technical
* reasons. It may well be integrated in `ftoutln' later. * reasons. It may well be integrated in 'ftoutln' later.
* *
*/ */
@ -58,11 +58,10 @@ FT_BEGIN_HEADER
* FT_Outline_Get_BBox * FT_Outline_Get_BBox
* *
* @description: * @description:
* Compute the exact bounding box of an outline. This is slower * Compute the exact bounding box of an outline. This is slower than
* than computing the control box. However, it uses an advanced * computing the control box. However, it uses an advanced algorithm
* algorithm that returns _very_ quickly when the two boxes * that returns _very_ quickly when the two boxes coincide. Otherwise,
* coincide. Otherwise, the outline Bezier arcs are traversed to * the outline Bezier arcs are traversed to extract their extrema.
* extract their extrema.
* *
* @input: * @input:
* outline :: * outline ::
@ -78,10 +77,10 @@ FT_BEGIN_HEADER
* @note: * @note:
* If the font is tricky and the glyph has been loaded with * If the font is tricky and the glyph has been loaded with
* @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get * @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get
* reasonable values for the BBox it is necessary to load the glyph * reasonable values for the BBox it is necessary to load the glyph at a
* at a large ppem value (so that the hinting instructions can * large ppem value (so that the hinting instructions can properly shift
* properly shift and scale the subglyphs), then extracting the BBox, * and scale the subglyphs), then extracting the BBox, which can be
* which can be eventually converted back to font units. * eventually converted back to font units.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Get_BBox( FT_Outline* outline, FT_Outline_Get_BBox( FT_Outline* outline,

View File

@ -44,8 +44,8 @@ FT_BEGIN_HEADER
* BDF and PCF specific API. * BDF and PCF specific API.
* *
* @description: * @description:
* This section contains the declaration of functions specific to BDF * This section contains the declaration of functions specific to BDF and
* and PCF fonts. * PCF fonts.
* *
*/ */
@ -87,8 +87,8 @@ FT_BEGIN_HEADER
* BDF_Property * BDF_Property
* *
* @description: * @description:
* A handle to a @BDF_PropertyRec structure to model a given * A handle to a @BDF_PropertyRec structure to model a given BDF/PCF
* BDF/PCF property. * property.
*/ */
typedef struct BDF_PropertyRec_* BDF_Property; typedef struct BDF_PropertyRec_* BDF_Property;
@ -106,8 +106,8 @@ FT_BEGIN_HEADER
* The property type. * The property type.
* *
* u.atom :: * u.atom ::
* The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM. May be NULL,
* NULL, indicating an empty string. * indicating an empty string.
* *
* u.integer :: * u.integer ::
* A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER. * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
@ -134,8 +134,8 @@ FT_BEGIN_HEADER
* FT_Get_BDF_Charset_ID * FT_Get_BDF_Charset_ID
* *
* @description: * @description:
* Retrieve a BDF font character set identity, according to * Retrieve a BDF font character set identity, according to the BDF
* the BDF specification. * specification.
* *
* @input: * @input:
* face :: * face ::
@ -187,15 +187,15 @@ FT_BEGIN_HEADER
* otherwise. It also returns an error if the property is not in the * otherwise. It also returns an error if the property is not in the
* font. * font.
* *
* A `property' is a either key-value pair within the STARTPROPERTIES * A 'property' is a either key-value pair within the STARTPROPERTIES
* ... ENDPROPERTIES block of a BDF font or a key-value pair from the * ... ENDPROPERTIES block of a BDF font or a key-value pair from the
* `info->props' array within a `FontRec' structure of a PCF font. * `info->props` array within a 'FontRec' structure of a PCF font.
* *
* Integer properties are always stored as `signed' within PCF fonts; * Integer properties are always stored as 'signed' within PCF fonts;
* consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value * consequently, @BDF_PROPERTY_TYPE_CARDINAL is a possible return value
* for BDF fonts only. * for BDF fonts only.
* *
* In case of error, `aproperty->type' is always set to * In case of error, `aproperty->type` is always set to
* @BDF_PROPERTY_TYPE_NONE. * @BDF_PROPERTY_TYPE_NONE.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )

View File

@ -49,11 +49,11 @@ FT_BEGIN_HEADER
* This section contains functions for handling @FT_Bitmap objects, * This section contains functions for handling @FT_Bitmap objects,
* automatically adjusting the target's bitmap buffer size as needed. * automatically adjusting the target's bitmap buffer size as needed.
* *
* Note that none of the functions changes the bitmap's `flow' (as * Note that none of the functions changes the bitmap's 'flow' (as
* indicated by the sign of the `pitch' field in @FT_Bitmap). * indicated by the sign of the 'pitch' field in @FT_Bitmap).
* *
* To set the flow, assign an appropriate positive or negative value to * To set the flow, assign an appropriate positive or negative value to
* the `pitch' field of the target @FT_Bitmap object after calling * the 'pitch' field of the target @FT_Bitmap object after calling
* @FT_Bitmap_Init but before calling any of the other functions * @FT_Bitmap_Init but before calling any of the other functions
* described here. * described here.
*/ */
@ -72,7 +72,7 @@ FT_BEGIN_HEADER
* A pointer to the bitmap structure. * A pointer to the bitmap structure.
* *
* @note: * @note:
* A deprecated name for the same function is `FT_Bitmap_New'. * A deprecated name for the same function is `FT_Bitmap_New`.
*/ */
FT_EXPORT( void ) FT_EXPORT( void )
FT_Bitmap_Init( FT_Bitmap *abitmap ); FT_Bitmap_Init( FT_Bitmap *abitmap );
@ -106,7 +106,7 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* `source->buffer' and `target->buffer' must neither be equal nor * `source->buffer` and `target->buffer` must neither be equal nor
* overlap. * overlap.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
@ -121,21 +121,21 @@ FT_BEGIN_HEADER
* FT_Bitmap_Embolden * FT_Bitmap_Embolden
* *
* @description: * @description:
* Embolden a bitmap. The new bitmap will be about `xStrength' * Embolden a bitmap. The new bitmap will be about `xStrength` pixels
* pixels wider and `yStrength' pixels higher. The left and bottom * wider and `yStrength` pixels higher. The left and bottom borders are
* borders are kept unchanged. * kept unchanged.
* *
* @input: * @input:
* library :: * library ::
* A handle to a library object. * A handle to a library object.
* *
* xStrength :: * xStrength ::
* How strong the glyph is emboldened horizontally. * How strong the glyph is emboldened horizontally. Expressed in 26.6
* Expressed in 26.6 pixel format. * pixel format.
* *
* yStrength :: * yStrength ::
* How strong the glyph is emboldened vertically. * How strong the glyph is emboldened vertically. Expressed in 26.6
* Expressed in 26.6 pixel format. * pixel format.
* *
* @inout: * @inout:
* bitmap :: * bitmap ::
@ -145,14 +145,14 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The current implementation restricts `xStrength' to be less than * The current implementation restricts `xStrength` to be less than or
* or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. * equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO.
* *
* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, * If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, you
* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. * should call @FT_GlyphSlot_Own_Bitmap on the slot first.
* *
* Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format * Bitmaps in @FT_PIXEL_MODE_GRAY2 and @FT_PIXEL_MODE_GRAY@ format are
* are converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp). * converted to @FT_PIXEL_MODE_GRAY format (i.e., 8bpp).
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Bitmap_Embolden( FT_Library library, FT_Bitmap_Embolden( FT_Library library,
@ -167,9 +167,9 @@ FT_BEGIN_HEADER
* FT_Bitmap_Convert * FT_Bitmap_Convert
* *
* @description: * @description:
* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp * Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, 8bpp or 32bpp to
* to a bitmap object with depth 8bpp, making the number of used * a bitmap object with depth 8bpp, making the number of used bytes per
* bytes per line (a.k.a. the `pitch') a multiple of `alignment'. * line (a.k.a. the 'pitch') a multiple of 'alignment'.
* *
* @input: * @input:
* library :: * library ::
@ -179,8 +179,8 @@ FT_BEGIN_HEADER
* The source bitmap. * The source bitmap.
* *
* alignment :: * alignment ::
* The pitch of the bitmap is a multiple of this * The pitch of the bitmap is a multiple of this argument. Common
* argument. Common values are 1, 2, or 4. * values are 1, 2, or 4.
* *
* @output: * @output:
* target :: * target ::
@ -195,10 +195,10 @@ FT_BEGIN_HEADER
* *
* Use @FT_Bitmap_Done to finally remove the bitmap object. * Use @FT_Bitmap_Done to finally remove the bitmap object.
* *
* The `library' argument is taken to have access to FreeType's * The 'library' argument is taken to have access to FreeType's memory
* memory handling functions. * handling functions.
* *
* `source->buffer' and `target->buffer' must neither be equal nor * `source->buffer` and `target->buffer` must neither be equal nor
* overlap. * overlap.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
@ -228,11 +228,11 @@ FT_BEGIN_HEADER
* 26.6 pixel format. This can be a fractional pixel value. * 26.6 pixel format. This can be a fractional pixel value.
* *
* color :: * color ::
* The color used to draw `source' onto `target'. * The color used to draw 'source' onto 'target'.
* *
* @inout: * @inout:
* target :: * target ::
* A handle to an `FT_Bitmap' object. It should be either initialized * A handle to an `FT_Bitmap` object. It should be either initialized
* as empty with a call to @FT_Bitmap_Init, or it should be of type * as empty with a call to @FT_Bitmap_Init, or it should be of type
* @FT_PIXEL_MODE_BGRA. * @FT_PIXEL_MODE_BGRA.
* *
@ -247,14 +247,14 @@ FT_BEGIN_HEADER
* @note: * @note:
* This function doesn't perform clipping. * This function doesn't perform clipping.
* *
* The bitmap in `target' gets allocated or reallocated as needed; the * The bitmap in 'target' gets allocated or reallocated as needed; the
* vector `atarget_offset' is updated accordingly. * vector `atarget_offset` is updated accordingly.
* *
* In case of allocation or reallocation, the bitmap's pitch is set to * In case of allocation or reallocation, the bitmap's pitch is set to
* `4~*~width'. Both `source' and `target' must have the same bitmap * '4~*~width'. Both 'source' and 'target' must have the same bitmap
* flow (as indicated by the sign of the `pitch' field). * flow (as indicated by the sign of the 'pitch' field).
* *
* `source->buffer' and `target->buffer' must neither be equal nor * `source->buffer` and `target->buffer` must neither be equal nor
* overlap. * overlap.
* *
* @since: * @since:
@ -275,7 +275,7 @@ FT_BEGIN_HEADER
* FT_GlyphSlot_Own_Bitmap * FT_GlyphSlot_Own_Bitmap
* *
* @description: * @description:
* Make sure that a glyph slot owns `slot->bitmap'. * Make sure that a glyph slot owns `slot->bitmap`.
* *
* @input: * @input:
* slot :: * slot ::
@ -285,8 +285,7 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* This function is to be used in combination with * This function is to be used in combination with @FT_Bitmap_Embolden.
* @FT_Bitmap_Embolden.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot ); FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot );
@ -311,8 +310,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The `library' argument is taken to have access to FreeType's * The 'library' argument is taken to have access to FreeType's memory
* memory handling functions. * handling functions.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Bitmap_Done( FT_Library library, FT_Bitmap_Done( FT_Library library,

View File

@ -55,8 +55,8 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Open a new stream to parse bzip2-compressed font files. This is * Open a new stream to parse bzip2-compressed font files. This is
* mainly used to support the compressed `*.pcf.bz2' fonts that come * mainly used to support the compressed `*.pcf.bz2` fonts that come with
* with XFree86. * XFree86.
* *
* @input: * @input:
* stream :: * stream ::
@ -71,9 +71,9 @@ FT_BEGIN_HEADER
* @note: * @note:
* The source stream must be opened _before_ calling this function. * The source stream must be opened _before_ calling this function.
* *
* Calling the internal function `FT_Stream_Close' on the new stream will * Calling the internal function `FT_Stream_Close` on the new stream will
* *not* call `FT_Stream_Close' on the source stream. None of the stream * **not** call `FT_Stream_Close` on the source stream. None of the
* objects will be released to the heap. * stream objects will be released to the heap.
* *
* The stream implementation is very basic and resets the decompression * The stream implementation is very basic and resets the decompression
* process each time seeking backwards is needed within the stream. * process each time seeking backwards is needed within the stream.
@ -81,10 +81,10 @@ FT_BEGIN_HEADER
* In certain builds of the library, bzip2 compression recognition is * In certain builds of the library, bzip2 compression recognition is
* automatically handled when calling @FT_New_Face or @FT_Open_Face. * automatically handled when calling @FT_New_Face or @FT_Open_Face.
* This means that if no font driver is capable of handling the raw * This means that if no font driver is capable of handling the raw
* compressed file, the library will try to open a bzip2 compressed stream * compressed file, the library will try to open a bzip2 compressed
* from it and re-open the face with it. * stream from it and re-open the face with it.
* *
* This function may return `FT_Err_Unimplemented_Feature' if your build * This function may return `FT_Err_Unimplemented_Feature` if your build
* of FreeType was not compiled with bzip2 support. * of FreeType was not compiled with bzip2 support.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )

View File

@ -44,7 +44,7 @@ FT_BEGIN_HEADER
* objects, as well as caching information like character maps and glyph * objects, as well as caching information like character maps and glyph
* images while limiting their maximum memory usage. * images while limiting their maximum memory usage.
* *
* Note that all types and functions begin with the `FTC_' prefix. * Note that all types and functions begin with the 'FTC_' prefix.
* *
* The cache is highly portable and thus doesn't know anything about the * The cache is highly portable and thus doesn't know anything about the
* fonts installed on your system, or how to access them. This implies * fonts installed on your system, or how to access them. This implies
@ -59,7 +59,7 @@ FT_BEGIN_HEADER
* to convert an @FTC_FaceID into a new @FT_Face object. The latter is * to convert an @FTC_FaceID into a new @FT_Face object. The latter is
* then completely managed by the cache, including its termination * then completely managed by the cache, including its termination
* through @FT_Done_Face. To monitor termination of face objects, the * through @FT_Done_Face. To monitor termination of face objects, the
* finalizer callback in the `generic' field of the @FT_Face object can * finalizer callback in the 'generic' field of the @FT_Face object can
* be used, which might also be used to store the @FTC_FaceID of the * be used, which might also be used to store the @FTC_FaceID of the
* face. * face.
* *
@ -69,14 +69,14 @@ FT_BEGIN_HEADER
* possible. * possible.
* *
* Note that for the cache to work correctly, the face ID values must be * Note that for the cache to work correctly, the face ID values must be
* *persistent*, which means that the contents they point to should not * **persistent**, which means that the contents they point to should not
* change at runtime, or that their value should not become invalid. * change at runtime, or that their value should not become invalid.
* *
* If this is unavoidable (e.g., when a font is uninstalled at runtime), * If this is unavoidable (e.g., when a font is uninstalled at runtime),
* you should call @FTC_Manager_RemoveFaceID as soon as possible, to let * you should call @FTC_Manager_RemoveFaceID as soon as possible, to let
* the cache get rid of any references to the old @FTC_FaceID it may * the cache get rid of any references to the old @FTC_FaceID it may keep
* keep internally. Failure to do so will lead to incorrect behaviour * internally. Failure to do so will lead to incorrect behaviour or even
* or even crashes. * crashes.
* *
* To use the cache, start with calling @FTC_Manager_New to create a new * To use the cache, start with calling @FTC_Manager_New to create a new
* @FTC_Manager object, which models a single cache instance. You can * @FTC_Manager object, which models a single cache instance. You can
@ -91,11 +91,11 @@ FT_BEGIN_HEADER
* later use @FTC_ImageCache_Lookup to retrieve the corresponding * later use @FTC_ImageCache_Lookup to retrieve the corresponding
* @FT_Glyph objects from the cache. * @FT_Glyph objects from the cache.
* *
* If you need lots of small bitmaps, it is much more memory efficient * If you need lots of small bitmaps, it is much more memory efficient to
* to call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This * call @FTC_SBitCache_New followed by @FTC_SBitCache_Lookup. This
* returns @FTC_SBitRec structures, which are used to store small * returns @FTC_SBitRec structures, which are used to store small bitmaps
* bitmaps directly. (A small bitmap is one whose metrics and * directly. (A small bitmap is one whose metrics and dimensions all fit
* dimensions all fit into 8-bit integers). * into 8-bit integers).
* *
* We hope to also provide a kerning cache in the near future. * We hope to also provide a kerning cache in the near future.
* *
@ -151,8 +151,8 @@ FT_BEGIN_HEADER
* An opaque pointer type that is used to identity face objects. The * An opaque pointer type that is used to identity face objects. The
* contents of such objects is application-dependent. * contents of such objects is application-dependent.
* *
* These pointers are typically used to point to a user-defined * These pointers are typically used to point to a user-defined structure
* structure containing a font file path, and face index. * containing a font file path, and face index.
* *
* @note: * @note:
* Never use NULL as a valid @FTC_FaceID. * Never use NULL as a valid @FTC_FaceID.
@ -166,8 +166,8 @@ FT_BEGIN_HEADER
* immediately call @FTC_Manager_RemoveFaceID before any other cache * immediately call @FTC_Manager_RemoveFaceID before any other cache
* function. * function.
* *
* Failure to do so will result in incorrect behaviour or even * Failure to do so will result in incorrect behaviour or even memory
* memory leaks and crashes. * leaks and crashes.
*/ */
typedef FT_Pointer FTC_FaceID; typedef FT_Pointer FTC_FaceID;
@ -200,7 +200,7 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The third parameter `req_data' is the same as the one passed by the * The third parameter `req_data` is the same as the one passed by the
* client when @FTC_Manager_New is called. * client when @FTC_Manager_New is called.
* *
* The face requester should not perform funny things on the returned * The face requester should not perform funny things on the returned
@ -233,20 +233,20 @@ FT_BEGIN_HEADER
* FTC_Manager * FTC_Manager
* *
* @description: * @description:
* This object corresponds to one instance of the cache-subsystem. * This object corresponds to one instance of the cache-subsystem. It is
* It is used to cache one or more @FT_Face objects, along with * used to cache one or more @FT_Face objects, along with corresponding
* corresponding @FT_Size objects. * @FT_Size objects.
* *
* The manager intentionally limits the total number of opened * The manager intentionally limits the total number of opened @FT_Face
* @FT_Face and @FT_Size objects to control memory usage. See the * and @FT_Size objects to control memory usage. See the `max_faces` and
* `max_faces' and `max_sizes' parameters of @FTC_Manager_New. * `max_sizes` parameters of @FTC_Manager_New.
* *
* The manager is also used to cache `nodes' of various types while * The manager is also used to cache 'nodes' of various types while
* limiting their total memory usage. * limiting their total memory usage.
* *
* All limitations are enforced by keeping lists of managed objects * All limitations are enforced by keeping lists of managed objects in
* in most-recently-used order, and flushing old nodes to make room * most-recently-used order, and flushing old nodes to make room for new
* for new ones. * ones.
*/ */
typedef struct FTC_ManagerRec_* FTC_Manager; typedef struct FTC_ManagerRec_* FTC_Manager;
@ -258,13 +258,13 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* An opaque handle to a cache node object. Each cache node is * An opaque handle to a cache node object. Each cache node is
* reference-counted. A node with a count of~0 might be flushed * reference-counted. A node with a count of~0 might be flushed out of a
* out of a full cache whenever a lookup request is performed. * full cache whenever a lookup request is performed.
* *
* If you look up nodes, you have the ability to `acquire' them, * If you look up nodes, you have the ability to 'acquire' them, i.e., to
* i.e., to increment their reference count. This will prevent the * increment their reference count. This will prevent the node from
* node from being flushed out of the cache until you explicitly * being flushed out of the cache until you explicitly 'release' it (see
* `release' it (see @FTC_Node_Unref). * @FTC_Node_Unref).
* *
* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. * See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup.
*/ */
@ -284,30 +284,29 @@ FT_BEGIN_HEADER
* The parent FreeType library handle to use. * The parent FreeType library handle to use.
* *
* max_faces :: * max_faces ::
* Maximum number of opened @FT_Face objects managed by * Maximum number of opened @FT_Face objects managed by this cache
* this cache instance. Use~0 for defaults. * instance. Use~0 for defaults.
* *
* max_sizes :: * max_sizes ::
* Maximum number of opened @FT_Size objects managed by * Maximum number of opened @FT_Size objects managed by this cache
* this cache instance. Use~0 for defaults. * instance. Use~0 for defaults.
* *
* max_bytes :: * max_bytes ::
* Maximum number of bytes to use for cached data nodes. * Maximum number of bytes to use for cached data nodes. Use~0 for
* Use~0 for defaults. Note that this value does not * defaults. Note that this value does not account for managed
* account for managed @FT_Face and @FT_Size objects. * @FT_Face and @FT_Size objects.
* *
* requester :: * requester ::
* An application-provided callback used to translate * An application-provided callback used to translate face IDs into
* face IDs into real @FT_Face objects. * real @FT_Face objects.
* *
* req_data :: * req_data ::
* A generic pointer that is passed to the requester * A generic pointer that is passed to the requester each time it is
* each time it is called (see @FTC_Face_Requester). * called (see @FTC_Face_Requester).
* *
* @output: * @output:
* amanager :: * amanager ::
* A handle to a new manager object. 0~in case of * A handle to a new manager object. 0~in case of failure.
* failure.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -383,20 +382,20 @@ FT_BEGIN_HEADER
* should never try to discard it yourself. * should never try to discard it yourself.
* *
* The @FT_Face object doesn't necessarily have a current size object * The @FT_Face object doesn't necessarily have a current size object
* (i.e., face->size can be~0). If you need a specific `font size', * (i.e., face->size can be~0). If you need a specific 'font size', use
* use @FTC_Manager_LookupSize instead. * @FTC_Manager_LookupSize instead.
* *
* Never change the face's transformation matrix (i.e., never call * Never change the face's transformation matrix (i.e., never call the
* the @FT_Set_Transform function) on a returned face! If you need * @FT_Set_Transform function) on a returned face! If you need to
* to transform glyphs, do it yourself after glyph loading. * transform glyphs, do it yourself after glyph loading.
* *
* When you perform a lookup, out-of-memory errors are detected * When you perform a lookup, out-of-memory errors are detected _within_
* _within_ the lookup and force incremental flushes of the cache * the lookup and force incremental flushes of the cache until enough
* until enough memory is released for the lookup to succeed. * memory is released for the lookup to succeed.
* *
* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has * If a lookup fails with `FT_Err_Out_Of_Memory` the cache has already
* already been completely flushed, and still no memory was available * been completely flushed, and still no memory was available for the
* for the operation. * operation.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FTC_Manager_LookupFace( FTC_Manager manager, FTC_Manager_LookupFace( FTC_Manager manager,
@ -410,9 +409,8 @@ FT_BEGIN_HEADER
* FTC_ScalerRec * FTC_ScalerRec
* *
* @description: * @description:
* A structure used to describe a given character size in either * A structure used to describe a given character size in either pixels
* pixels or points to the cache manager. See * or points to the cache manager. See @FTC_Manager_LookupSize.
* @FTC_Manager_LookupSize.
* *
* @fields: * @fields:
* face_id :: * face_id ::
@ -425,17 +423,17 @@ FT_BEGIN_HEADER
* The character height. * The character height.
* *
* pixel :: * pixel ::
* A Boolean. If 1, the `width' and `height' fields are * A Boolean. If 1, the 'width' and 'height' fields are interpreted as
* interpreted as integer pixel character sizes. * integer pixel character sizes. Otherwise, they are expressed as
* Otherwise, they are expressed as 1/64th of points. * 1/64th of points.
* *
* x_res :: * x_res ::
* Only used when `pixel' is value~0 to indicate the * Only used when 'pixel' is value~0 to indicate the horizontal
* horizontal resolution in dpi. * resolution in dpi.
* *
* y_res :: * y_res ::
* Only used when `pixel' is value~0 to indicate the * Only used when 'pixel' is value~0 to indicate the vertical
* vertical resolution in dpi. * resolution in dpi.
* *
* @note: * @note:
* This type is mainly used to retrieve @FT_Size objects through the * This type is mainly used to retrieve @FT_Size objects through the
@ -491,18 +489,17 @@ FT_BEGIN_HEADER
* The returned @FT_Size object is always owned by the manager. You * The returned @FT_Size object is always owned by the manager. You
* should never try to discard it by yourself. * should never try to discard it by yourself.
* *
* You can access the parent @FT_Face object simply as `size->face' * You can access the parent @FT_Face object simply as `size->face` if
* if you need it. Note that this object is also owned by the * you need it. Note that this object is also owned by the manager.
* manager.
* *
* @note: * @note:
* When you perform a lookup, out-of-memory errors are detected * When you perform a lookup, out-of-memory errors are detected _within_
* _within_ the lookup and force incremental flushes of the cache * the lookup and force incremental flushes of the cache until enough
* until enough memory is released for the lookup to succeed. * memory is released for the lookup to succeed.
* *
* If a lookup fails with `FT_Err_Out_Of_Memory' the cache has * If a lookup fails with `FT_Err_Out_Of_Memory` the cache has already
* already been completely flushed, and still no memory is available * been completely flushed, and still no memory is available for the
* for the operation. * operation.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FTC_Manager_LookupSize( FTC_Manager manager, FTC_Manager_LookupSize( FTC_Manager manager,
@ -538,9 +535,9 @@ FT_BEGIN_HEADER
* FTC_Manager_RemoveFaceID * FTC_Manager_RemoveFaceID
* *
* @description: * @description:
* A special function used to indicate to the cache manager that * A special function used to indicate to the cache manager that a given
* a given @FTC_FaceID is no longer valid, either because its * @FTC_FaceID is no longer valid, either because its content changed, or
* content changed, or because it was deallocated or uninstalled. * because it was deallocated or uninstalled.
* *
* @input: * @input:
* manager :: * manager ::
@ -551,11 +548,11 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* This function flushes all nodes from the cache corresponding to this * This function flushes all nodes from the cache corresponding to this
* `face_id', with the exception of nodes with a non-null reference * `face_id`, with the exception of nodes with a non-null reference
* count. * count.
* *
* Such nodes are however modified internally so as to never appear * Such nodes are however modified internally so as to never appear in
* in later lookups with the same `face_id' value, and to be immediately * later lookups with the same `face_id` value, and to be immediately
* destroyed when released by all their users. * destroyed when released by all their users.
* *
*/ */
@ -570,8 +567,8 @@ FT_BEGIN_HEADER
* FTC_CMapCache * FTC_CMapCache
* *
* @description: * @description:
* An opaque handle used to model a charmap cache. This cache is to * An opaque handle used to model a charmap cache. This cache is to hold
* hold character codes -> glyph indices mappings. * character codes -> glyph indices mappings.
* *
*/ */
typedef struct FTC_CMapCacheRec_* FTC_CMapCache; typedef struct FTC_CMapCacheRec_* FTC_CMapCache;
@ -630,7 +627,7 @@ FT_BEGIN_HEADER
* The character code (in the corresponding charmap). * The character code (in the corresponding charmap).
* *
* @return: * @return:
* Glyph index. 0~means `no glyph'. * Glyph index. 0~means 'no glyph'.
* *
*/ */
FT_EXPORT( FT_UInt ) FT_EXPORT( FT_UInt )
@ -710,9 +707,9 @@ FT_BEGIN_HEADER
* FTC_ImageCache * FTC_ImageCache
* *
* @description: * @description:
* A handle to a glyph image cache object. They are designed to * A handle to a glyph image cache object. They are designed to hold
* hold many distinct glyph images while not exceeding a certain * many distinct glyph images while not exceeding a certain memory
* memory threshold. * threshold.
*/ */
typedef struct FTC_ImageCacheRec_* FTC_ImageCache; typedef struct FTC_ImageCacheRec_* FTC_ImageCache;
@ -761,32 +758,29 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* aglyph :: * aglyph ::
* The corresponding @FT_Glyph object. 0~in case of * The corresponding @FT_Glyph object. 0~in case of failure.
* failure.
* *
* anode :: * anode ::
* Used to return the address of the corresponding cache * Used to return the address of the corresponding cache node after
* node after incrementing its reference count (see note * incrementing its reference count (see note below).
* below).
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The returned glyph is owned and managed by the glyph image cache. * The returned glyph is owned and managed by the glyph image cache.
* Never try to transform or discard it manually! You can however * Never try to transform or discard it manually! You can however create
* create a copy with @FT_Glyph_Copy and modify the new one. * a copy with @FT_Glyph_Copy and modify the new one.
* *
* If `anode' is _not_ NULL, it receives the address of the cache * If 'anode' is _not_ NULL, it receives the address of the cache node
* node containing the glyph image, after increasing its reference * containing the glyph image, after increasing its reference count.
* count. This ensures that the node (as well as the @FT_Glyph) will * This ensures that the node (as well as the @FT_Glyph) will always be
* always be kept in the cache until you call @FTC_Node_Unref to * kept in the cache until you call @FTC_Node_Unref to 'release' it.
* `release' it.
* *
* If `anode' is NULL, the cache node is left unchanged, which means * If 'anode' is NULL, the cache node is left unchanged, which means that
* that the @FT_Glyph could be flushed out of the cache on the next * the @FT_Glyph could be flushed out of the cache on the next call to
* call to one of the caching sub-system APIs. Don't assume that it * one of the caching sub-system APIs. Don't assume that it is
* is persistent! * persistent!
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FTC_ImageCache_Lookup( FTC_ImageCache cache, FTC_ImageCache_Lookup( FTC_ImageCache cache,
@ -802,8 +796,8 @@ FT_BEGIN_HEADER
* FTC_ImageCache_LookupScaler * FTC_ImageCache_LookupScaler
* *
* @description: * @description:
* A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec * A variant of @FTC_ImageCache_Lookup that uses an @FTC_ScalerRec to
* to specify the face ID and its size. * specify the face ID and its size.
* *
* @input: * @input:
* cache :: * cache ::
@ -820,32 +814,29 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* aglyph :: * aglyph ::
* The corresponding @FT_Glyph object. 0~in case of * The corresponding @FT_Glyph object. 0~in case of failure.
* failure.
* *
* anode :: * anode ::
* Used to return the address of the corresponding * Used to return the address of the corresponding cache node after
* cache node after incrementing its reference count * incrementing its reference count (see note below).
* (see note below).
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The returned glyph is owned and managed by the glyph image cache. * The returned glyph is owned and managed by the glyph image cache.
* Never try to transform or discard it manually! You can however * Never try to transform or discard it manually! You can however create
* create a copy with @FT_Glyph_Copy and modify the new one. * a copy with @FT_Glyph_Copy and modify the new one.
* *
* If `anode' is _not_ NULL, it receives the address of the cache * If 'anode' is _not_ NULL, it receives the address of the cache node
* node containing the glyph image, after increasing its reference * containing the glyph image, after increasing its reference count.
* count. This ensures that the node (as well as the @FT_Glyph) will * This ensures that the node (as well as the @FT_Glyph) will always be
* always be kept in the cache until you call @FTC_Node_Unref to * kept in the cache until you call @FTC_Node_Unref to 'release' it.
* `release' it.
* *
* If `anode' is NULL, the cache node is left unchanged, which means * If 'anode' is NULL, the cache node is left unchanged, which means that
* that the @FT_Glyph could be flushed out of the cache on the next * the @FT_Glyph could be flushed out of the cache on the next call to
* call to one of the caching sub-system APIs. Don't assume that it * one of the caching sub-system APIs. Don't assume that it is
* is persistent! * persistent!
* *
* Calls to @FT_Set_Char_Size and friends have no effect on cached * Calls to @FT_Set_Char_Size and friends have no effect on cached
* glyphs; you should always use the FreeType cache API instead. * glyphs; you should always use the FreeType cache API instead.
@ -865,8 +856,8 @@ FT_BEGIN_HEADER
* FTC_SBit * FTC_SBit
* *
* @description: * @description:
* A handle to a small bitmap descriptor. See the @FTC_SBitRec * A handle to a small bitmap descriptor. See the @FTC_SBitRec structure
* structure for details. * for details.
*/ */
typedef struct FTC_SBitRec_* FTC_SBit; typedef struct FTC_SBitRec_* FTC_SBit;
@ -887,15 +878,13 @@ FT_BEGIN_HEADER
* The bitmap height in pixels. * The bitmap height in pixels.
* *
* left :: * left ::
* The horizontal distance from the pen position to the * The horizontal distance from the pen position to the left bitmap
* left bitmap border (a.k.a. `left side bearing', or * border (a.k.a. 'left side bearing', or 'lsb').
* `lsb').
* *
* top :: * top ::
* The vertical distance from the pen position (on the * The vertical distance from the pen position (on the baseline) to the
* baseline) to the upper bitmap border (a.k.a. `top * upper bitmap border (a.k.a. 'top side bearing'). The distance is
* side bearing'). The distance is positive for upwards * positive for upwards y~coordinates.
* y~coordinates.
* *
* format :: * format ::
* The format of the glyph bitmap (monochrome or gray). * The format of the glyph bitmap (monochrome or gray).
@ -904,8 +893,7 @@ FT_BEGIN_HEADER
* Maximum gray level value (in the range 1 to~255). * Maximum gray level value (in the range 1 to~255).
* *
* pitch :: * pitch ::
* The number of bytes per bitmap line. May be positive * The number of bytes per bitmap line. May be positive or negative.
* or negative.
* *
* xadvance :: * xadvance ::
* The horizontal advance width in pixels. * The horizontal advance width in pixels.
@ -941,9 +929,9 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A handle to a small bitmap cache. These are special cache objects * A handle to a small bitmap cache. These are special cache objects
* used to store small glyph bitmaps (and anti-aliased pixmaps) in a * used to store small glyph bitmaps (and anti-aliased pixmaps) in a much
* much more efficient way than the traditional glyph image cache * more efficient way than the traditional glyph image cache implemented
* implemented by @FTC_ImageCache. * by @FTC_ImageCache.
*/ */
typedef struct FTC_SBitCacheRec_* FTC_SBitCache; typedef struct FTC_SBitCacheRec_* FTC_SBitCache;
@ -978,8 +966,8 @@ FT_BEGIN_HEADER
* FTC_SBitCache_Lookup * FTC_SBitCache_Lookup
* *
* @description: * @description:
* Look up a given small glyph bitmap in a given sbit cache and * Look up a given small glyph bitmap in a given sbit cache and 'lock' it
* `lock' it to prevent its flushing from the cache until needed. * to prevent its flushing from the cache until needed.
* *
* @input: * @input:
* cache :: * cache ::
@ -996,31 +984,29 @@ FT_BEGIN_HEADER
* A handle to a small bitmap descriptor. * A handle to a small bitmap descriptor.
* *
* anode :: * anode ::
* Used to return the address of the corresponding cache * Used to return the address of the corresponding cache node after
* node after incrementing its reference count (see note * incrementing its reference count (see note below).
* below).
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The small bitmap descriptor and its bit buffer are owned by the * The small bitmap descriptor and its bit buffer are owned by the cache
* cache and should never be freed by the application. They might * and should never be freed by the application. They might as well
* as well disappear from memory on the next cache lookup, so don't * disappear from memory on the next cache lookup, so don't treat them as
* treat them as persistent data. * persistent data.
* *
* The descriptor's `buffer' field is set to~0 to indicate a missing * The descriptor's 'buffer' field is set to~0 to indicate a missing
* glyph bitmap. * glyph bitmap.
* *
* If `anode' is _not_ NULL, it receives the address of the cache * If 'anode' is _not_ NULL, it receives the address of the cache node
* node containing the bitmap, after increasing its reference count. * containing the bitmap, after increasing its reference count. This
* This ensures that the node (as well as the image) will always be * ensures that the node (as well as the image) will always be kept in
* kept in the cache until you call @FTC_Node_Unref to `release' it. * the cache until you call @FTC_Node_Unref to 'release' it.
* *
* If `anode' is NULL, the cache node is left unchanged, which means * If 'anode' is NULL, the cache node is left unchanged, which means that
* that the bitmap could be flushed out of the cache on the next * the bitmap could be flushed out of the cache on the next call to one
* call to one of the caching sub-system APIs. Don't assume that it * of the caching sub-system APIs. Don't assume that it is persistent!
* is persistent!
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FTC_SBitCache_Lookup( FTC_SBitCache cache, FTC_SBitCache_Lookup( FTC_SBitCache cache,
@ -1036,8 +1022,8 @@ FT_BEGIN_HEADER
* FTC_SBitCache_LookupScaler * FTC_SBitCache_LookupScaler
* *
* @description: * @description:
* A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec * A variant of @FTC_SBitCache_Lookup that uses an @FTC_ScalerRec to
* to specify the face ID and its size. * specify the face ID and its size.
* *
* @input: * @input:
* cache :: * cache ::
@ -1057,31 +1043,29 @@ FT_BEGIN_HEADER
* A handle to a small bitmap descriptor. * A handle to a small bitmap descriptor.
* *
* anode :: * anode ::
* Used to return the address of the corresponding * Used to return the address of the corresponding cache node after
* cache node after incrementing its reference count * incrementing its reference count (see note below).
* (see note below).
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The small bitmap descriptor and its bit buffer are owned by the * The small bitmap descriptor and its bit buffer are owned by the cache
* cache and should never be freed by the application. They might * and should never be freed by the application. They might as well
* as well disappear from memory on the next cache lookup, so don't * disappear from memory on the next cache lookup, so don't treat them as
* treat them as persistent data. * persistent data.
* *
* The descriptor's `buffer' field is set to~0 to indicate a missing * The descriptor's 'buffer' field is set to~0 to indicate a missing
* glyph bitmap. * glyph bitmap.
* *
* If `anode' is _not_ NULL, it receives the address of the cache * If 'anode' is _not_ NULL, it receives the address of the cache node
* node containing the bitmap, after increasing its reference count. * containing the bitmap, after increasing its reference count. This
* This ensures that the node (as well as the image) will always be * ensures that the node (as well as the image) will always be kept in
* kept in the cache until you call @FTC_Node_Unref to `release' it. * the cache until you call @FTC_Node_Unref to 'release' it.
* *
* If `anode' is NULL, the cache node is left unchanged, which means * If 'anode' is NULL, the cache node is left unchanged, which means that
* that the bitmap could be flushed out of the cache on the next * the bitmap could be flushed out of the cache on the next call to one
* call to one of the caching sub-system APIs. Don't assume that it * of the caching sub-system APIs. Don't assume that it is persistent!
* is persistent!
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FTC_SBitCache_LookupScaler( FTC_SBitCache cache, FTC_SBitCache_LookupScaler( FTC_SBitCache cache,

View File

@ -96,9 +96,9 @@ FT_BEGIN_HEADER
* FT_Get_CID_Is_Internally_CID_Keyed * FT_Get_CID_Is_Internally_CID_Keyed
* *
* @description: * @description:
* Retrieve the type of the input face, CID keyed or not. In * Retrieve the type of the input face, CID keyed or not. In contrast
* contrast to the @FT_IS_CID_KEYED macro this function returns * to the @FT_IS_CID_KEYED macro this function returns successfully also
* successfully also for CID-keyed fonts in an SFNT wrapper. * for CID-keyed fonts in an SFNT wrapper.
* *
* @input: * @input:
* face :: * face ::
@ -112,8 +112,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* This function only works with CID faces and OpenType fonts, * This function only works with CID faces and OpenType fonts, returning
* returning an error otherwise. * an error otherwise.
* *
* @since: * @since:
* 2.3.9 * 2.3.9
@ -146,8 +146,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* This function only works with CID faces and OpenType fonts, * This function only works with CID faces and OpenType fonts, returning
* returning an error otherwise. * an error otherwise.
* *
* @since: * @since:
* 2.3.9 * 2.3.9

View File

@ -41,11 +41,11 @@ FT_BEGIN_HEADER
* Glyph Color Management * Glyph Color Management
* *
* @abstract: * @abstract:
* Retrieving and manipulating OpenType's `CPAL' table data. * Retrieving and manipulating OpenType's 'CPAL' table data.
* *
* @description: * @description:
* The functions described here allow access and manipulation of color * The functions described here allow access and manipulation of color
* palette entries in OpenType's `CPAL' tables. * palette entries in OpenType's 'CPAL' tables.
*/ */
@ -55,7 +55,7 @@ FT_BEGIN_HEADER
* FT_Color * FT_Color
* *
* @description: * @description:
* This structure models a BGRA color value of a `CPAL' palette entry. * This structure models a BGRA color value of a 'CPAL' palette entry.
* *
* The used color space is sRGB; the colors are not pre-multiplied, and * The used color space is sRGB; the colors are not pre-multiplied, and
* alpha values must be explicitly set. * alpha values must be explicitly set.
@ -92,9 +92,9 @@ FT_BEGIN_HEADER
* FT_PALETTE_XXX * FT_PALETTE_XXX
* *
* @description: * @description:
* A list of bit field constants used in the `palette_flags' array of * A list of bit field constants used in the `palette_flags` array of the
* the @FT_Palette_Data structure to indicate for which background a * @FT_Palette_Data structure to indicate for which background a palette
* palette with a given index is usable. * with a given index is usable.
* *
* @values: * @values:
* FT_PALETTE_FOR_LIGHT_BACKGROUND :: * FT_PALETTE_FOR_LIGHT_BACKGROUND ::
@ -102,8 +102,8 @@ FT_BEGIN_HEADER
* light background such as white. * light background such as white.
* *
* FT_PALETTE_FOR_DARK_BACKGROUND :: * FT_PALETTE_FOR_DARK_BACKGROUND ::
* The palette is appropriate to use when displaying the font on a * The palette is appropriate to use when displaying the font on a dark
* dark background such as black. * background such as black.
* *
* @since: * @since:
* 2.10 * 2.10
@ -118,29 +118,29 @@ FT_BEGIN_HEADER
* FT_Palette_Data * FT_Palette_Data
* *
* @description: * @description:
* This structure holds the data of the `CPAL' table. * This structure holds the data of the 'CPAL' table.
* *
* @fields: * @fields:
* num_palettes :: * num_palettes ::
* The number of palettes. * The number of palettes.
* *
* palette_name_ids :: * palette_name_ids ::
* A read-only array of palette name IDs with `num_palettes' elements, * A read-only array of palette name IDs with `num_palettes` elements,
* corresponding to entries like `dark' or `light' in the font's * corresponding to entries like 'dark' or 'light' in the font's 'name'
* `name' table. * table.
* *
* An empty name ID in the `CPAL' table gets represented as value * An empty name ID in the 'CPAL' table gets represented as value
* 0xFFFF. * 0xFFFF.
* *
* NULL if the font's `CPAL' table doesn't contain appropriate data. * NULL if the font's 'CPAL' table doesn't contain appropriate data.
* *
* palette_flags :: * palette_flags ::
* A read-only array of palette flags with `num_palettes' elements. * A read-only array of palette flags with `num_palettes` elements.
* Possible values are an ORed combination of * Possible values are an ORed combination of
* @FT_PALETTE_FOR_LIGHT_BACKGROUND and * @FT_PALETTE_FOR_LIGHT_BACKGROUND and
* @FT_PALETTE_FOR_DARK_BACKGROUND. * @FT_PALETTE_FOR_DARK_BACKGROUND.
* *
* NULL if the font's `CPAL' table doesn't contain appropriate data. * NULL if the font's 'CPAL' table doesn't contain appropriate data.
* *
* num_palette_entries :: * num_palette_entries ::
* The number of entries in a single palette. All palettes have the * The number of entries in a single palette. All palettes have the
@ -148,17 +148,16 @@ FT_BEGIN_HEADER
* *
* palette_entry_name_ids :: * palette_entry_name_ids ::
* A read-only array of palette entry name IDs with * A read-only array of palette entry name IDs with
* `num_palette_entries'. In each palette, entries with the same * `num_palette_entries`. In each palette, entries with the same index
* index have the same function. For example, index~0 might * have the same function. For example, index~0 might correspond to
* correspond to string `outline' in the font's `name' table to * string 'outline' in the font's 'name' table to indicate that this
* indicate that this palette entry is used for outlines, index~1 * palette entry is used for outlines, index~1 might correspond to
* might correspond to `fill' to indicate the filling color palette * 'fill' to indicate the filling color palette entry, etc.
* entry, etc.
* *
* An empty entry name ID in the `CPAL' table gets represented as * An empty entry name ID in the 'CPAL' table gets represented as value
* value 0xFFFF. * 0xFFFF.
* *
* NULL if the font's `CPAL' table doesn't contain appropriate data. * NULL if the font's 'CPAL' table doesn't contain appropriate data.
* *
* @note: * @note:
* Use function @FT_Get_Sfnt_Name to map name IDs and entry name IDs to * Use function @FT_Get_Sfnt_Name to map name IDs and entry name IDs to
@ -201,7 +200,7 @@ FT_BEGIN_HEADER
* All arrays in the returned @FT_Palette_Data structure are read-only. * All arrays in the returned @FT_Palette_Data structure are read-only.
* *
* This function always returns an error if the config macro * This function always returns an error if the config macro
* `TT_CONFIG_OPTION_COLOR_LAYERS' is not defined in `ftoption.h'. * `TT_CONFIG_OPTION_COLOR_LAYERS` is not defined in `ftoption.h`.
* *
* @since: * @since:
* 2.10 * 2.10
@ -227,7 +226,7 @@ FT_BEGIN_HEADER
* *
* A corollary of (2) is that calling the function, then modifying some * A corollary of (2) is that calling the function, then modifying some
* values, then calling the function again with the same arguments resets * values, then calling the function again with the same arguments resets
* all color entries to the original `CPAL' values; all user modifications * all color entries to the original 'CPAL' values; all user modifications
* are lost. * are lost.
* *
* @input: * @input:
@ -239,8 +238,8 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* apalette :: * apalette ::
* An array of color entries for a palette with index `palette_index'. * An array of color entries for a palette with index `palette_index`.
* If `apalette' is set to NULL, no array gets returned (and no color * If 'apalette' is set to NULL, no array gets returned (and no color
* entries can be modified). * entries can be modified).
* *
* In case the font doesn't support color palettes, NULL is returned. * In case the font doesn't support color palettes, NULL is returned.
@ -249,14 +248,14 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The number of color entries is given by the `num_palette_entries' * The number of color entries is given by the `num_palette_entries`
* field in the @FT_Palette_Data structure. * field in the @FT_Palette_Data structure.
* *
* The array pointed to by `apalette_entries' is owned and managed by * The array pointed to by `apalette_entries` is owned and managed by
* FreeType. * FreeType.
* *
* This function always returns an error if the config macro * This function always returns an error if the config macro
* `TT_CONFIG_OPTION_COLOR_LAYERS' is not defined in `ftoption.h'. * `TT_CONFIG_OPTION_COLOR_LAYERS` is not defined in `ftoption.h`.
* *
* @since: * @since:
* 2.10 * 2.10
@ -273,7 +272,7 @@ FT_BEGIN_HEADER
* FT_Palette_Set_Foreground_Color * FT_Palette_Set_Foreground_Color
* *
* @description: * @description:
* `COLR' uses palette index 0xFFFF to indicate a `text foreground * 'COLR' uses palette index 0xFFFF to indicate a 'text foreground
* color'. This function sets this value. * color'. This function sets this value.
* *
* @input: * @input:
@ -281,7 +280,7 @@ FT_BEGIN_HEADER
* The source face handle. * The source face handle.
* *
* foreground_color :: * foreground_color ::
* An `FT_Color' structure to define the text foreground color. * An `FT_Color` structure to define the text foreground color.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -289,13 +288,12 @@ FT_BEGIN_HEADER
* @note: * @note:
* If this function isn't called, the text foreground color is set to * If this function isn't called, the text foreground color is set to
* white opaque (BGRA value 0xFFFFFFFF) if * white opaque (BGRA value 0xFFFFFFFF) if
* @FT_PALETTE_FOR_DARK_BACKGROUND is present for the current * @FT_PALETTE_FOR_DARK_BACKGROUND is present for the current palette,
* palette, and black opaque (BGRA value 0x000000FF) otherwise, * and black opaque (BGRA value 0x000000FF) otherwise, including the case
* including the case that no palette types are available in the `CPAL' * that no palette types are available in the 'CPAL' table.
* table.
* *
* This function always returns an error if the config macro * This function always returns an error if the config macro
* `TT_CONFIG_OPTION_COLOR_LAYERS' is not defined in `ftoption.h'. * `TT_CONFIG_OPTION_COLOR_LAYERS` is not defined in `ftoption.h`.
* *
* @since: * @since:
* 2.10 * 2.10

File diff suppressed because it is too large Load Diff

View File

@ -28,21 +28,20 @@
* All possible error codes returned by FreeType functions. * All possible error codes returned by FreeType functions.
* *
* @description: * @description:
* The list below is taken verbatim from the file `fterrdef.h' * The list below is taken verbatim from the file `fterrdef.h` (loaded
* (loaded automatically by including `FT_FREETYPE_H'). The first * automatically by including `FT_FREETYPE_H`). The first argument of the
* argument of the `FT_ERROR_DEF_' macro is the error label; by * `FT_ERROR_DEF_` macro is the error label; by default, the prefix
* default, the prefix `FT_Err_' gets added so that you get error * `FT_Err_` gets added so that you get error names like
* names like `FT_Err_Cannot_Open_Resource'. The second argument is * `FT_Err_Cannot_Open_Resource`. The second argument is the error code,
* the error code, and the last argument an error string, which is not * and the last argument an error string, which is not used by FreeType.
* used by FreeType.
* *
* Within your application you should *only* use error names and * Within your application you should **only** use error names and
* *never* its numeric values! The latter might (and actually do) * **never** its numeric values! The latter might (and actually do)
* change in forthcoming FreeType versions. * change in forthcoming FreeType versions.
* *
* Macro `FT_NOERRORDEF_' defines `FT_Err_Ok', which is always zero. * Macro `FT_NOERRORDEF_` defines `FT_Err_Ok`, which is always zero. See
* See the `Error Enumerations' subsection how to automatically * the 'Error Enumerations' subsection how to automatically generate a
* generate a list of error strings. * list of error strings.
* *
*/ */

View File

@ -28,56 +28,56 @@
* How to handle errors and error strings. * How to handle errors and error strings.
* *
* @description: * @description:
* The header file `fterrors.h' (which is automatically included by * The header file `fterrors.h` (which is automatically included by
* `freetype.h' defines the handling of FreeType's enumeration * `freetype.h` defines the handling of FreeType's enumeration constants.
* constants. It can also be used to generate error message strings * It can also be used to generate error message strings with a small
* with a small macro trick explained below. * macro trick explained below.
* *
* *Error* *Formats* * **Error Formats**
* *
* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be * The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be
* defined in `ftoption.h' in order to make the higher byte indicate * defined in `ftoption.h` in order to make the higher byte indicate the
* the module where the error has happened (this is not compatible * module where the error has happened (this is not compatible with
* with standard builds of FreeType~2, however). See the file * standard builds of FreeType~2, however). See the file `ftmoderr.h` for
* `ftmoderr.h' for more details. * more details.
* *
* *Error* *Message* *Strings* * **Error Message Strings**
* *
* Error definitions are set up with special macros that allow client * Error definitions are set up with special macros that allow client
* applications to build a table of error message strings. The * applications to build a table of error message strings. The strings
* strings are not included in a normal build of FreeType~2 to save * are not included in a normal build of FreeType~2 to save space (most
* space (most client applications do not use them). * client applications do not use them).
* *
* To do so, you have to define the following macros before including * To do so, you have to define the following macros before including this
* this file. * file.
* *
* { * ```
* FT_ERROR_START_LIST * FT_ERROR_START_LIST
* } * ```
* *
* This macro is called before anything else to define the start of * This macro is called before anything else to define the start of the
* the error list. It is followed by several FT_ERROR_DEF calls. * error list. It is followed by several FT_ERROR_DEF calls.
* *
* { * ```
* FT_ERROR_DEF( e, v, s ) * FT_ERROR_DEF( e, v, s )
* } * ```
* *
* This macro is called to define one single error. `e' is the error * This macro is called to define one single error. 'e' is the error code
* code identifier (e.g., `Invalid_Argument'), `v' is the error's * identifier (e.g., `Invalid_Argument`), 'v' is the error's numerical
* numerical value, and `s' is the corresponding error string. * value, and 's' is the corresponding error string.
* *
* { * ```
* FT_ERROR_END_LIST * FT_ERROR_END_LIST
* } * ```
* *
* This macro ends the list. * This macro ends the list.
* *
* Additionally, you have to undefine `FTERRORS_H_' before #including * Additionally, you have to undefine `FTERRORS_H_` before #including this
* this file. * file.
* *
* Here is a simple example. * Here is a simple example.
* *
* { * ```
* #undef FTERRORS_H_ * #undef FTERRORS_H_
* #define FT_ERRORDEF( e, v, s ) { e, s }, * #define FT_ERRORDEF( e, v, s ) { e, s },
* #define FT_ERROR_START_LIST { * #define FT_ERROR_START_LIST {
@ -90,10 +90,10 @@
* } ft_errors[] = * } ft_errors[] =
* *
* #include FT_ERRORS_H * #include FT_ERRORS_H
* } * ```
* *
* Note that `FT_Err_Ok' is _not_ defined with `FT_ERRORDEF' but with * Note that `FT_Err_Ok` is _not_ defined with `FT_ERRORDEF` but with
* `FT_NOERRORDEF'; it is always zero. * `FT_NOERRORDEF`; it is always zero.
* *
*/ */

View File

@ -44,10 +44,10 @@ FT_BEGIN_HEADER
* Getting the font format. * Getting the font format.
* *
* @description: * @description:
* The single function in this section can be used to get the font * The single function in this section can be used to get the font format.
* format. Note that this information is not needed normally; * Note that this information is not needed normally; however, there are
* however, there are special cases (like in PDF devices) where it is * special cases (like in PDF devices) where it is important to
* important to differentiate, in spite of FreeType's uniform API. * differentiate, in spite of FreeType's uniform API.
* *
*/ */
@ -58,9 +58,9 @@ FT_BEGIN_HEADER
* FT_Get_Font_Format * FT_Get_Font_Format
* *
* @description: * @description:
* Return a string describing the format of a given face. Possible * Return a string describing the format of a given face. Possible values
* values are `TrueType', `Type~1', `BDF', `PCF', `Type~42', * are 'TrueType', 'Type~1', 'BDF', 'PCF', 'Type~42', 'CID~Type~1', 'CFF',
* `CID~Type~1', `CFF', `PFR', and `Windows~FNT'. * 'PFR', and 'Windows~FNT'.
* *
* The return value is suitable to be used as an X11 FONT_PROPERTY. * The return value is suitable to be used as an X11 FONT_PROPERTY.
* *
@ -72,8 +72,7 @@ FT_BEGIN_HEADER
* Font format string. NULL in case of error. * Font format string. NULL in case of error.
* *
* @note: * @note:
* A deprecated name for the same function is * A deprecated name for the same function is `FT_Get_X11_Font_Format`.
* `FT_Get_X11_Font_Format'.
*/ */
FT_EXPORT( const char* ) FT_EXPORT( const char* )
FT_Get_Font_Format( FT_Face face ); FT_Get_Font_Format( FT_Face face );

View File

@ -2,7 +2,7 @@
* *
* ftgasp.h * ftgasp.h
* *
* Access of TrueType's `gasp' table (specification). * Access of TrueType's 'gasp' table (specification).
* *
* Copyright 2007-2018 by * Copyright 2007-2018 by
* David Turner, Robert Wilhelm, and Werner Lemberg. * David Turner, Robert Wilhelm, and Werner Lemberg.
@ -41,13 +41,13 @@ FT_BEGIN_HEADER
* Gasp Table * Gasp Table
* *
* @abstract: * @abstract:
* Retrieving TrueType `gasp' table entries. * Retrieving TrueType 'gasp' table entries.
* *
* @description: * @description:
* The function @FT_Get_Gasp can be used to query a TrueType or OpenType * The function @FT_Get_Gasp can be used to query a TrueType or OpenType
* font for specific entries in its `gasp' table, if any. This is * font for specific entries in its 'gasp' table, if any. This is mainly
* mainly useful when implementing native TrueType hinting with the * useful when implementing native TrueType hinting with the bytecode
* bytecode interpreter to duplicate the Windows text rendering results. * interpreter to duplicate the Windows text rendering results.
*/ */
/************************************************************************* /*************************************************************************
@ -66,7 +66,7 @@ FT_BEGIN_HEADER
* *
* FT_GASP_DO_GRIDFIT :: * FT_GASP_DO_GRIDFIT ::
* Grid-fitting and hinting should be performed at the specified ppem. * Grid-fitting and hinting should be performed at the specified ppem.
* This *really* means TrueType bytecode interpretation. If this bit * This **really** means TrueType bytecode interpretation. If this bit
* is not set, no hinting gets applied. * is not set, no hinting gets applied.
* *
* FT_GASP_DO_GRAY :: * FT_GASP_DO_GRAY ::
@ -80,13 +80,13 @@ FT_BEGIN_HEADER
* Grid-fitting must be used with ClearType's symmetric smoothing. * Grid-fitting must be used with ClearType's symmetric smoothing.
* *
* @note: * @note:
* The bit-flags `FT_GASP_DO_GRIDFIT' and `FT_GASP_DO_GRAY' are to be * The bit-flags `FT_GASP_DO_GRIDFIT` and `FT_GASP_DO_GRAY` are to be
* used for standard font rasterization only. Independently of that, * used for standard font rasterization only. Independently of that,
* `FT_GASP_SYMMETRIC_SMOOTHING' and `FT_GASP_SYMMETRIC_GRIDFIT' are to * `FT_GASP_SYMMETRIC_SMOOTHING` and `FT_GASP_SYMMETRIC_GRIDFIT` are to
* be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT' and * be used if ClearType is enabled (and `FT_GASP_DO_GRIDFIT` and
* `FT_GASP_DO_GRAY' are consequently ignored). * `FT_GASP_DO_GRAY` are consequently ignored).
* *
* `ClearType' is Microsoft's implementation of LCD rendering, partly * 'ClearType' is Microsoft's implementation of LCD rendering, partly
* protected by patents. * protected by patents.
* *
* @since: * @since:
@ -106,8 +106,8 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* For a TrueType or OpenType font file, return the rasterizer behaviour * For a TrueType or OpenType font file, return the rasterizer behaviour
* flags from the font's `gasp' table corresponding to a given * flags from the font's 'gasp' table corresponding to a given character
* character pixel size. * pixel size.
* *
* @input: * @input:
* face :: * face ::
@ -118,12 +118,12 @@ FT_BEGIN_HEADER
* *
* @return: * @return:
* Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no
* `gasp' table in the face. * 'gasp' table in the face.
* *
* @note: * @note:
* If you want to use the MM functionality of OpenType variation fonts * If you want to use the MM functionality of OpenType variation fonts
* (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this * (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this
* function *after* setting an instance since the return values can * function **after** setting an instance since the return values can
* change. * change.
* *
* @since: * @since:

View File

@ -18,13 +18,13 @@
/************************************************************************** /**************************************************************************
* *
* This file contains the definition of several convenience functions * This file contains the definition of several convenience functions that
* that can be used by client applications to easily retrieve glyph * can be used by client applications to easily retrieve glyph bitmaps and
* bitmaps and outlines from a given face. * outlines from a given face.
* *
* These functions should be optional if you are writing a font server * These functions should be optional if you are writing a font server or
* or text layout engine on top of FreeType. However, they are pretty * text layout engine on top of FreeType. However, they are pretty handy
* handy for many other simple uses of the library. * for many other simple uses of the library.
* *
*/ */
@ -58,9 +58,9 @@ FT_BEGIN_HEADER
* Generic interface to manage individual glyph data. * Generic interface to manage individual glyph data.
* *
* @description: * @description:
* This section contains definitions used to manage glyph data * This section contains definitions used to manage glyph data through
* through generic FT_Glyph objects. Each of them can contain a * generic FT_Glyph objects. Each of them can contain a bitmap, a vector
* bitmap, a vector outline, or even images in other formats. * outline, or even images in other formats.
* *
*/ */
@ -76,8 +76,8 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Handle to an object used to model generic glyph images. It is a * Handle to an object used to model generic glyph images. It is a
* pointer to the @FT_GlyphRec structure and can contain a glyph * pointer to the @FT_GlyphRec structure and can contain a glyph bitmap
* bitmap or pointer. * or pointer.
* *
* @note: * @note:
* Glyph objects are not owned by the library. You must thus release * Glyph objects are not owned by the library. You must thus release
@ -93,8 +93,8 @@ FT_BEGIN_HEADER
* FT_GlyphRec * FT_GlyphRec
* *
* @description: * @description:
* The root glyph structure contains a given glyph image plus its * The root glyph structure contains a given glyph image plus its advance
* advance width in 16.16 fixed-point format. * width in 16.16 fixed-point format.
* *
* @fields: * @fields:
* library :: * library ::
@ -125,8 +125,8 @@ FT_BEGIN_HEADER
* FT_BitmapGlyph * FT_BitmapGlyph
* *
* @description: * @description:
* A handle to an object used to model a bitmap glyph image. This is * A handle to an object used to model a bitmap glyph image. This is a
* a sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec. * sub-class of @FT_Glyph, and a pointer to @FT_BitmapGlyphRec.
*/ */
typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph; typedef struct FT_BitmapGlyphRec_* FT_BitmapGlyph;
@ -138,32 +138,31 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A structure used for bitmap glyph images. This really is a * A structure used for bitmap glyph images. This really is a
* `sub-class' of @FT_GlyphRec. * 'sub-class' of @FT_GlyphRec.
* *
* @fields: * @fields:
* root :: * root ::
* The root @FT_Glyph fields. * The root @FT_Glyph fields.
* *
* left :: * left ::
* The left-side bearing, i.e., the horizontal distance * The left-side bearing, i.e., the horizontal distance from the
* from the current pen position to the left border of the * current pen position to the left border of the glyph bitmap.
* glyph bitmap.
* *
* top :: * top ::
* The top-side bearing, i.e., the vertical distance from * The top-side bearing, i.e., the vertical distance from the current
* the current pen position to the top border of the glyph * pen position to the top border of the glyph bitmap. This distance
* bitmap. This distance is positive for upwards~y! * is positive for upwards~y!
* *
* bitmap :: * bitmap ::
* A descriptor for the bitmap. * A descriptor for the bitmap.
* *
* @note: * @note:
* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have * You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have
* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access * `glyph->format == FT_GLYPH_FORMAT_BITMAP`. This lets you access the
* the bitmap's contents easily. * bitmap's contents easily.
* *
* The corresponding pixel buffer is always owned by @FT_BitmapGlyph * The corresponding pixel buffer is always owned by @FT_BitmapGlyph and
* and is thus created and destroyed with it. * is thus created and destroyed with it.
*/ */
typedef struct FT_BitmapGlyphRec_ typedef struct FT_BitmapGlyphRec_
{ {
@ -181,8 +180,8 @@ FT_BEGIN_HEADER
* FT_OutlineGlyph * FT_OutlineGlyph
* *
* @description: * @description:
* A handle to an object used to model an outline glyph image. This * A handle to an object used to model an outline glyph image. This is a
* is a sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec. * sub-class of @FT_Glyph, and a pointer to @FT_OutlineGlyphRec.
*/ */
typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph; typedef struct FT_OutlineGlyphRec_* FT_OutlineGlyph;
@ -193,8 +192,8 @@ FT_BEGIN_HEADER
* FT_OutlineGlyphRec * FT_OutlineGlyphRec
* *
* @description: * @description:
* A structure used for outline (vectorial) glyph images. This * A structure used for outline (vectorial) glyph images. This really is
* really is a `sub-class' of @FT_GlyphRec. * a 'sub-class' of @FT_GlyphRec.
* *
* @fields: * @fields:
* root :: * root ::
@ -205,15 +204,15 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have * You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have
* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access * `glyph->format == FT_GLYPH_FORMAT_OUTLINE`. This lets you access the
* the outline's content easily. * outline's content easily.
* *
* As the outline is extracted from a glyph slot, its coordinates are * As the outline is extracted from a glyph slot, its coordinates are
* expressed normally in 26.6 pixels, unless the flag * expressed normally in 26.6 pixels, unless the flag @FT_LOAD_NO_SCALE
* @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). * was used in @FT_Load_Glyph() or @FT_Load_Char().
* *
* The outline's tables are always owned by the object and are * The outline's tables are always owned by the object and are destroyed
* destroyed with it. * with it.
*/ */
typedef struct FT_OutlineGlyphRec_ typedef struct FT_OutlineGlyphRec_
{ {
@ -261,8 +260,8 @@ FT_BEGIN_HEADER
* FT_Get_Glyph * FT_Get_Glyph
* *
* @description: * @description:
* A function used to extract a glyph image from a slot. Note that * A function used to extract a glyph image from a slot. Note that the
* the created @FT_Glyph object must be released with @FT_Done_Glyph. * created @FT_Glyph object must be released with @FT_Done_Glyph.
* *
* @input: * @input:
* slot :: * slot ::
@ -276,10 +275,9 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* Because `*aglyph->advance.x' and `*aglyph->advance.y' are 16.16 * Because `*aglyph->advance.x` and `*aglyph->advance.y` are 16.16
* fixed-point numbers, `slot->advance.x' and `slot->advance.y' * fixed-point numbers, `slot->advance.x` and `slot->advance.y` (which
* (which are in 26.6 fixed-point format) must be in the range * are in 26.6 fixed-point format) must be in the range ]-32768;32768[.
* ]-32768;32768[.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Get_Glyph( FT_GlyphSlot slot, FT_Get_Glyph( FT_GlyphSlot slot,
@ -301,8 +299,7 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* target :: * target ::
* A handle to the target glyph object. 0~in case of * A handle to the target glyph object. 0~in case of error.
* error.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -329,15 +326,15 @@ FT_BEGIN_HEADER
* A pointer to a 2x2 matrix to apply. * A pointer to a 2x2 matrix to apply.
* *
* delta :: * delta ::
* A pointer to a 2d vector to apply. Coordinates are * A pointer to a 2d vector to apply. Coordinates are expressed in
* expressed in 1/64th of a pixel. * 1/64th of a pixel.
* *
* @return: * @return:
* FreeType error code (if not 0, the glyph format is not scalable). * FreeType error code (if not 0, the glyph format is not scalable).
* *
* @note: * @note:
* The 2x2 transformation matrix is also applied to the glyph's * The 2x2 transformation matrix is also applied to the glyph's advance
* advance vector. * vector.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Glyph_Transform( FT_Glyph glyph, FT_Glyph_Transform( FT_Glyph glyph,
@ -395,71 +392,71 @@ FT_BEGIN_HEADER
* FT_Glyph_Get_CBox * FT_Glyph_Get_CBox
* *
* @description: * @description:
* Return a glyph's `control box'. The control box encloses all the * Return a glyph's 'control box'. The control box encloses all the
* outline's points, including Bezier control points. Though it * outline's points, including Bezier control points. Though it
* coincides with the exact bounding box for most glyphs, it can be * coincides with the exact bounding box for most glyphs, it can be
* slightly larger in some situations (like when rotating an outline * slightly larger in some situations (like when rotating an outline that
* that contains Bezier outside arcs). * contains Bezier outside arcs).
* *
* Computing the control box is very fast, while getting the bounding * Computing the control box is very fast, while getting the bounding box
* box can take much more time as it needs to walk over all segments * can take much more time as it needs to walk over all segments and arcs
* and arcs in the outline. To get the latter, you can use the * in the outline. To get the latter, you can use the 'ftbbox'
* `ftbbox' component, which is dedicated to this single task. * component, which is dedicated to this single task.
* *
* @input: * @input:
* glyph :: * glyph ::
* A handle to the source glyph object. * A handle to the source glyph object.
* *
* mode :: * mode ::
* The mode that indicates how to interpret the returned * The mode that indicates how to interpret the returned bounding box
* bounding box values. * values.
* *
* @output: * @output:
* acbox :: * acbox ::
* The glyph coordinate bounding box. Coordinates are * The glyph coordinate bounding box. Coordinates are expressed in
* expressed in 1/64th of pixels if it is grid-fitted. * 1/64th of pixels if it is grid-fitted.
* *
* @note: * @note:
* Coordinates are relative to the glyph origin, using the y~upwards * Coordinates are relative to the glyph origin, using the y~upwards
* convention. * convention.
* *
* If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode' * If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode` must
* must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font * be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font units in 26.6
* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS * pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS is another name for
* is another name for this constant. * this constant.
* *
* If the font is tricky and the glyph has been loaded with * If the font is tricky and the glyph has been loaded with
* @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get * @FT_LOAD_NO_SCALE, the resulting CBox is meaningless. To get
* reasonable values for the CBox it is necessary to load the glyph * reasonable values for the CBox it is necessary to load the glyph at a
* at a large ppem value (so that the hinting instructions can * large ppem value (so that the hinting instructions can properly shift
* properly shift and scale the subglyphs), then extracting the CBox, * and scale the subglyphs), then extracting the CBox, which can be
* which can be eventually converted back to font units. * eventually converted back to font units.
* *
* Note that the maximum coordinates are exclusive, which means that * Note that the maximum coordinates are exclusive, which means that one
* one can compute the width and height of the glyph image (be it in * can compute the width and height of the glyph image (be it in integer
* integer or 26.6 pixels) as: * or 26.6 pixels) as:
* *
* { * ```
* width = bbox.xMax - bbox.xMin; * width = bbox.xMax - bbox.xMin;
* height = bbox.yMax - bbox.yMin; * height = bbox.yMax - bbox.yMin;
* } * ```
* *
* Note also that for 26.6 coordinates, if `bbox_mode' is set to * Note also that for 26.6 coordinates, if `bbox_mode` is set to
* @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, * @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted,
* which corresponds to: * which corresponds to:
* *
* { * ```
* bbox.xMin = FLOOR(bbox.xMin); * bbox.xMin = FLOOR(bbox.xMin);
* bbox.yMin = FLOOR(bbox.yMin); * bbox.yMin = FLOOR(bbox.yMin);
* bbox.xMax = CEILING(bbox.xMax); * bbox.xMax = CEILING(bbox.xMax);
* bbox.yMax = CEILING(bbox.yMax); * bbox.yMax = CEILING(bbox.yMax);
* } * ```
* *
* To get the bbox in pixel coordinates, set `bbox_mode' to * To get the bbox in pixel coordinates, set `bbox_mode` to
* @FT_GLYPH_BBOX_TRUNCATE. * @FT_GLYPH_BBOX_TRUNCATE.
* *
* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' * To get the bbox in grid-fitted pixel coordinates, set `bbox_mode` to
* to @FT_GLYPH_BBOX_PIXELS. * @FT_GLYPH_BBOX_PIXELS.
*/ */
FT_EXPORT( void ) FT_EXPORT( void )
FT_Glyph_Get_CBox( FT_Glyph glyph, FT_Glyph_Get_CBox( FT_Glyph glyph,
@ -481,19 +478,16 @@ FT_BEGIN_HEADER
* *
* @input: * @input:
* render_mode :: * render_mode ::
* An enumeration that describes how the data is * An enumeration that describes how the data is rendered.
* rendered.
* *
* origin :: * origin ::
* A pointer to a vector used to translate the glyph * A pointer to a vector used to translate the glyph image before
* image before rendering. Can be~0 (if no * rendering. Can be~0 (if no translation). The origin is expressed
* translation). The origin is expressed in * in 26.6 pixels.
* 26.6 pixels.
* *
* destroy :: * destroy ::
* A boolean that indicates that the original glyph * A boolean that indicates that the original glyph image should be
* image should be destroyed by this function. It is * destroyed by this function. It is never destroyed in case of error.
* never destroyed in case of error.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -501,14 +495,14 @@ FT_BEGIN_HEADER
* @note: * @note:
* This function does nothing if the glyph format isn't scalable. * This function does nothing if the glyph format isn't scalable.
* *
* The glyph image is translated with the `origin' vector before * The glyph image is translated with the 'origin' vector before
* rendering. * rendering.
* *
* The first parameter is a pointer to an @FT_Glyph handle, that will * The first parameter is a pointer to an @FT_Glyph handle, that will be
* be _replaced_ by this function (with newly allocated data). * _replaced_ by this function (with newly allocated data). Typically,
* Typically, you would use (omitting error handling): * you would use (omitting error handling):
* *
* { * ```
* FT_Glyph glyph; * FT_Glyph glyph;
* FT_BitmapGlyph glyph_bitmap; * FT_BitmapGlyph glyph_bitmap;
* *
@ -536,11 +530,11 @@ FT_BEGIN_HEADER
* *
* // discard glyph image (bitmap or not) * // discard glyph image (bitmap or not)
* FT_Done_Glyph( glyph ); * FT_Done_Glyph( glyph );
* } * ```
* *
* Here another example, again without error handling: * Here another example, again without error handling:
* *
* { * ```
* FT_Glyph glyphs[MAX_GLYPHS] * FT_Glyph glyphs[MAX_GLYPHS]
* *
* *
@ -572,7 +566,7 @@ FT_BEGIN_HEADER
* *
* for ( idx = 0; i < MAX_GLYPHS; i++ ) * for ( idx = 0; i < MAX_GLYPHS; i++ )
* FT_Done_Glyph( glyphs[idx] ); * FT_Done_Glyph( glyphs[idx] );
* } * ```
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
@ -615,18 +609,18 @@ FT_BEGIN_HEADER
* FT_Matrix_Multiply * FT_Matrix_Multiply
* *
* @description: * @description:
* Perform the matrix operation `b = a*b'. * Perform the matrix operation 'b = a*b'.
* *
* @input: * @input:
* a :: * a ::
* A pointer to matrix `a'. * A pointer to matrix 'a'.
* *
* @inout: * @inout:
* b :: * b ::
* A pointer to matrix `b'. * A pointer to matrix 'b'.
* *
* @note: * @note:
* The result is undefined if either `a' or `b' is zero. * The result is undefined if either 'a' or 'b' is zero.
* *
* Since the function uses wrap-around arithmetic, results become * Since the function uses wrap-around arithmetic, results become
* meaningless if the arguments are very large. * meaningless if the arguments are very large.
@ -646,8 +640,7 @@ FT_BEGIN_HEADER
* *
* @inout: * @inout:
* matrix :: * matrix ::
* A pointer to the target matrix. Remains untouched in * A pointer to the target matrix. Remains untouched in case of error.
* case of error.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.

View File

@ -53,9 +53,9 @@ FT_BEGIN_HEADER
* An API to validate TrueTypeGX/AAT tables. * An API to validate TrueTypeGX/AAT tables.
* *
* @description: * @description:
* This section contains the declaration of functions to validate * This section contains the declaration of functions to validate some
* some TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, * TrueTypeGX tables (feat, mort, morx, bsln, just, kern, opbd, trak,
* trak, prop, lcar). * prop, lcar).
* *
* @order: * @order:
* FT_TrueTypeGX_Validate * FT_TrueTypeGX_Validate
@ -99,7 +99,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* The number of tables checked in this module. Use it as a parameter * The number of tables checked in this module. Use it as a parameter
* for the `table-length' argument of function @FT_TrueTypeGX_Validate. * for the 'table-length' argument of function @FT_TrueTypeGX_Validate.
*/ */
#define FT_VALIDATE_GX_LENGTH ( FT_VALIDATE_GX_LAST_INDEX + 1 ) #define FT_VALIDATE_GX_LENGTH ( FT_VALIDATE_GX_LAST_INDEX + 1 )
@ -123,34 +123,34 @@ FT_BEGIN_HEADER
* *
* @values: * @values:
* FT_VALIDATE_feat :: * FT_VALIDATE_feat ::
* Validate `feat' table. * Validate 'feat' table.
* *
* FT_VALIDATE_mort :: * FT_VALIDATE_mort ::
* Validate `mort' table. * Validate 'mort' table.
* *
* FT_VALIDATE_morx :: * FT_VALIDATE_morx ::
* Validate `morx' table. * Validate 'morx' table.
* *
* FT_VALIDATE_bsln :: * FT_VALIDATE_bsln ::
* Validate `bsln' table. * Validate 'bsln' table.
* *
* FT_VALIDATE_just :: * FT_VALIDATE_just ::
* Validate `just' table. * Validate 'just' table.
* *
* FT_VALIDATE_kern :: * FT_VALIDATE_kern ::
* Validate `kern' table. * Validate 'kern' table.
* *
* FT_VALIDATE_opbd :: * FT_VALIDATE_opbd ::
* Validate `opbd' table. * Validate 'opbd' table.
* *
* FT_VALIDATE_trak :: * FT_VALIDATE_trak ::
* Validate `trak' table. * Validate 'trak' table.
* *
* FT_VALIDATE_prop :: * FT_VALIDATE_prop ::
* Validate `prop' table. * Validate 'prop' table.
* *
* FT_VALIDATE_lcar :: * FT_VALIDATE_lcar ::
* Validate `lcar' table. * Validate 'lcar' table.
* *
* FT_VALIDATE_GX :: * FT_VALIDATE_GX ::
* Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern, * Validate all TrueTypeGX tables (feat, mort, morx, bsln, just, kern,
@ -189,8 +189,8 @@ FT_BEGIN_HEADER
* @description: * @description:
* Validate various TrueTypeGX tables to assure that all offsets and * Validate various TrueTypeGX tables to assure that all offsets and
* indices are valid. The idea is that a higher-level library that * indices are valid. The idea is that a higher-level library that
* actually does the text layout can access those tables without * actually does the text layout can access those tables without error
* error checking (which can be quite time consuming). * checking (which can be quite time consuming).
* *
* @input: * @input:
* face :: * face ::
@ -201,13 +201,13 @@ FT_BEGIN_HEADER
* @FT_VALIDATE_GXXXX for possible values. * @FT_VALIDATE_GXXXX for possible values.
* *
* table_length :: * table_length ::
* The size of the `tables' array. Normally, @FT_VALIDATE_GX_LENGTH * The size of the 'tables' array. Normally, @FT_VALIDATE_GX_LENGTH
* should be passed. * should be passed.
* *
* @output: * @output:
* tables :: * tables ::
* The array where all validated sfnt tables are stored. * The array where all validated sfnt tables are stored. The array
* The array itself must be allocated by a client. * itself must be allocated by a client.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -217,7 +217,7 @@ FT_BEGIN_HEADER
* otherwise. * otherwise.
* *
* After use, the application should deallocate the buffers pointed to by * After use, the application should deallocate the buffers pointed to by
* each `tables' element, by calling @FT_TrueTypeGX_Free. A NULL value * each 'tables' element, by calling @FT_TrueTypeGX_Free. A NULL value
* indicates that the table either doesn't exist in the font, the * indicates that the table either doesn't exist in the font, the
* application hasn't asked for validation, or the validator doesn't have * application hasn't asked for validation, or the validator doesn't have
* the ability to validate the sfnt table. * the ability to validate the sfnt table.
@ -242,8 +242,7 @@ FT_BEGIN_HEADER
* A handle to the input face. * A handle to the input face.
* *
* table :: * table ::
* The pointer to the buffer allocated by * The pointer to the buffer allocated by @FT_TrueTypeGX_Validate.
* @FT_TrueTypeGX_Validate.
* *
* @note: * @note:
* This function must be used to free the buffer allocated by * This function must be used to free the buffer allocated by
@ -260,20 +259,19 @@ FT_BEGIN_HEADER
* FT_VALIDATE_CKERNXXX * FT_VALIDATE_CKERNXXX
* *
* @description: * @description:
* A list of bit-field constants used with @FT_ClassicKern_Validate * A list of bit-field constants used with @FT_ClassicKern_Validate to
* to indicate the classic kern dialect or dialects. If the selected * indicate the classic kern dialect or dialects. If the selected type
* type doesn't fit, @FT_ClassicKern_Validate regards the table as * doesn't fit, @FT_ClassicKern_Validate regards the table as invalid.
* invalid.
* *
* @values: * @values:
* FT_VALIDATE_MS :: * FT_VALIDATE_MS ::
* Handle the `kern' table as a classic Microsoft kern table. * Handle the 'kern' table as a classic Microsoft kern table.
* *
* FT_VALIDATE_APPLE :: * FT_VALIDATE_APPLE ::
* Handle the `kern' table as a classic Apple kern table. * Handle the 'kern' table as a classic Apple kern table.
* *
* FT_VALIDATE_CKERN :: * FT_VALIDATE_CKERN ::
* Handle the `kern' as either classic Apple or Microsoft kern table. * Handle the 'kern' as either classic Apple or Microsoft kern table.
*/ */
#define FT_VALIDATE_MS ( FT_VALIDATE_GX_START << 0 ) #define FT_VALIDATE_MS ( FT_VALIDATE_GX_START << 0 )
#define FT_VALIDATE_APPLE ( FT_VALIDATE_GX_START << 1 ) #define FT_VALIDATE_APPLE ( FT_VALIDATE_GX_START << 1 )
@ -287,12 +285,12 @@ FT_BEGIN_HEADER
* FT_ClassicKern_Validate * FT_ClassicKern_Validate
* *
* @description: * @description:
* Validate classic (16-bit format) kern table to assure that the offsets * Validate classic (16-bit format) kern table to assure that the
* and indices are valid. The idea is that a higher-level library that * offsets and indices are valid. The idea is that a higher-level
* actually does the text layout can access those tables without error * library that actually does the text layout can access those tables
* checking (which can be quite time consuming). * without error checking (which can be quite time consuming).
* *
* The `kern' table validator in @FT_TrueTypeGX_Validate deals with both * The 'kern' table validator in @FT_TrueTypeGX_Validate deals with both
* the new 32-bit format and the classic 16-bit format, while * the new 32-bit format and the classic 16-bit format, while
* FT_ClassicKern_Validate only supports the classic 16-bit format. * FT_ClassicKern_Validate only supports the classic 16-bit format.
* *
@ -313,7 +311,7 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* After use, the application should deallocate the buffers pointed to by * After use, the application should deallocate the buffers pointed to by
* `ckern_table', by calling @FT_ClassicKern_Free. A NULL value * `ckern_table`, by calling @FT_ClassicKern_Free. A NULL value
* indicates that the table doesn't exist in the font. * indicates that the table doesn't exist in the font.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )

View File

@ -54,9 +54,9 @@ FT_BEGIN_HEADER
* FT_Stream_OpenGzip * FT_Stream_OpenGzip
* *
* @description: * @description:
* Open a new stream to parse gzip-compressed font files. This is * Open a new stream to parse gzip-compressed font files. This is mainly
* mainly used to support the compressed `*.pcf.gz' fonts that come * used to support the compressed `*.pcf.gz` fonts that come with
* with XFree86. * XFree86.
* *
* @input: * @input:
* stream :: * stream ::
@ -71,9 +71,9 @@ FT_BEGIN_HEADER
* @note: * @note:
* The source stream must be opened _before_ calling this function. * The source stream must be opened _before_ calling this function.
* *
* Calling the internal function `FT_Stream_Close' on the new stream will * Calling the internal function `FT_Stream_Close` on the new stream will
* *not* call `FT_Stream_Close' on the source stream. None of the stream * **not** call `FT_Stream_Close` on the source stream. None of the
* objects will be released to the heap. * stream objects will be released to the heap.
* *
* The stream implementation is very basic and resets the decompression * The stream implementation is very basic and resets the decompression
* process each time seeking backwards is needed within the stream. * process each time seeking backwards is needed within the stream.
@ -81,10 +81,10 @@ FT_BEGIN_HEADER
* In certain builds of the library, gzip compression recognition is * In certain builds of the library, gzip compression recognition is
* automatically handled when calling @FT_New_Face or @FT_Open_Face. * automatically handled when calling @FT_New_Face or @FT_Open_Face.
* This means that if no font driver is capable of handling the raw * This means that if no font driver is capable of handling the raw
* compressed file, the library will try to open a gzipped stream from * compressed file, the library will try to open a gzipped stream from it
* it and re-open the face with it. * and re-open the face with it.
* *
* This function may return `FT_Err_Unimplemented_Feature' if your build * This function may return `FT_Err_Unimplemented_Feature` if your build
* of FreeType was not compiled with zlib support. * of FreeType was not compiled with zlib support.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
@ -99,7 +99,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Decompress a zipped input buffer into an output buffer. This function * Decompress a zipped input buffer into an output buffer. This function
* is modeled after zlib's `uncompress' function. * is modeled after zlib's 'uncompress' function.
* *
* @input: * @input:
* memory :: * memory ::
@ -120,14 +120,14 @@ FT_BEGIN_HEADER
* Before calling the function, this is the total size of the output * Before calling the function, this is the total size of the output
* buffer, which must be large enough to hold the entire uncompressed * buffer, which must be large enough to hold the entire uncompressed
* data (so the size of the uncompressed data must be known in * data (so the size of the uncompressed data must be known in
* advance). After calling the function, `output_len' is the size of * advance). After calling the function, `output_len` is the size of
* the used data in `output'. * the used data in 'output'.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* This function may return `FT_Err_Unimplemented_Feature' if your build * This function may return `FT_Err_Unimplemented_Feature` if your build
* of FreeType was not compiled with zlib support. * of FreeType was not compiled with zlib support.
* *
* @since: * @since:

View File

@ -18,7 +18,7 @@
/************************************************************************** /**************************************************************************
* *
* Note: A `raster' is simply a scan-line converter, used to render * Note: A 'raster' is simply a scan-line converter, used to render
* FT_Outlines into FT_Bitmaps. * FT_Outlines into FT_Bitmaps.
* *
*/ */
@ -51,9 +51,9 @@ FT_BEGIN_HEADER
* FT_Pos * FT_Pos
* *
* @description: * @description:
* The type FT_Pos is used to store vectorial coordinates. Depending * The type FT_Pos is used to store vectorial coordinates. Depending on
* on the context, these can represent distances in integer font * the context, these can represent distances in integer font units, or
* units, or 16.16, or 26.6 fixed-point pixel coordinates. * 16.16, or 26.6 fixed-point pixel coordinates.
*/ */
typedef signed long FT_Pos; typedef signed long FT_Pos;
@ -64,8 +64,8 @@ FT_BEGIN_HEADER
* FT_Vector * FT_Vector
* *
* @description: * @description:
* A simple structure used to store a 2D vector; coordinates are of * A simple structure used to store a 2D vector; coordinates are of the
* the FT_Pos type. * FT_Pos type.
* *
* @fields: * @fields:
* x :: * x ::
@ -88,8 +88,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A structure used to hold an outline's bounding box, i.e., the * A structure used to hold an outline's bounding box, i.e., the
* coordinates of its extrema in the horizontal and vertical * coordinates of its extrema in the horizontal and vertical directions.
* directions.
* *
* @fields: * @fields:
* xMin :: * xMin ::
@ -105,18 +104,17 @@ FT_BEGIN_HEADER
* The vertical maximum (top-most). * The vertical maximum (top-most).
* *
* @note: * @note:
* The bounding box is specified with the coordinates of the lower * The bounding box is specified with the coordinates of the lower left
* left and the upper right corner. In PostScript, those values are * and the upper right corner. In PostScript, those values are often
* often called (llx,lly) and (urx,ury), respectively. * called (llx,lly) and (urx,ury), respectively.
* *
* If `yMin' is negative, this value gives the glyph's descender. * If `yMin` is negative, this value gives the glyph's descender.
* Otherwise, the glyph doesn't descend below the baseline. * Otherwise, the glyph doesn't descend below the baseline. Similarly,
* Similarly, if `ymax' is positive, this value gives the glyph's * if 'ymax' is positive, this value gives the glyph's ascender.
* ascender.
* *
* `xMin' gives the horizontal distance from the glyph's origin to * `xMin` gives the horizontal distance from the glyph's origin to the
* the left edge of the glyph's bounding box. If `xMin' is negative, * left edge of the glyph's bounding box. If `xMin` is negative, the
* the glyph extends to the left of the origin. * glyph extends to the left of the origin.
*/ */
typedef struct FT_BBox_ typedef struct FT_BBox_
{ {
@ -132,56 +130,53 @@ FT_BEGIN_HEADER
* FT_Pixel_Mode * FT_Pixel_Mode
* *
* @description: * @description:
* An enumeration type used to describe the format of pixels in a * An enumeration type used to describe the format of pixels in a given
* given bitmap. Note that additional formats may be added in the * bitmap. Note that additional formats may be added in the future.
* future.
* *
* @values: * @values:
* FT_PIXEL_MODE_NONE :: * FT_PIXEL_MODE_NONE ::
* Value~0 is reserved. * Value~0 is reserved.
* *
* FT_PIXEL_MODE_MONO :: * FT_PIXEL_MODE_MONO ::
* A monochrome bitmap, using 1~bit per pixel. Note that pixels * A monochrome bitmap, using 1~bit per pixel. Note that pixels are
* are stored in most-significant order (MSB), which means that * stored in most-significant order (MSB), which means that the
* the left-most pixel in a byte has value 128. * left-most pixel in a byte has value 128.
* *
* FT_PIXEL_MODE_GRAY :: * FT_PIXEL_MODE_GRAY ::
* An 8-bit bitmap, generally used to represent anti-aliased glyph * An 8-bit bitmap, generally used to represent anti-aliased glyph
* images. Each pixel is stored in one byte. Note that the number * images. Each pixel is stored in one byte. Note that the number of
* of `gray' levels is stored in the `num_grays' field of the * 'gray' levels is stored in the `num_grays` field of the @FT_Bitmap
* @FT_Bitmap structure (it generally is 256). * structure (it generally is 256).
* *
* FT_PIXEL_MODE_GRAY2 :: * FT_PIXEL_MODE_GRAY2 ::
* A 2-bit per pixel bitmap, used to represent embedded * A 2-bit per pixel bitmap, used to represent embedded anti-aliased
* anti-aliased bitmaps in font files according to the OpenType * bitmaps in font files according to the OpenType specification. We
* specification. We haven't found a single font using this * haven't found a single font using this format, however.
* format, however.
* *
* FT_PIXEL_MODE_GRAY4 :: * FT_PIXEL_MODE_GRAY4 ::
* A 4-bit per pixel bitmap, representing embedded anti-aliased * A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps
* bitmaps in font files according to the OpenType specification. * in font files according to the OpenType specification. We haven't
* We haven't found a single font using this format, however. * found a single font using this format, however.
* *
* FT_PIXEL_MODE_LCD :: * FT_PIXEL_MODE_LCD ::
* An 8-bit bitmap, representing RGB or BGR decimated glyph images * An 8-bit bitmap, representing RGB or BGR decimated glyph images used
* used for display on LCD displays; the bitmap is three times * for display on LCD displays; the bitmap is three times wider than
* wider than the original glyph image. See also * the original glyph image. See also @FT_RENDER_MODE_LCD.
* @FT_RENDER_MODE_LCD.
* *
* FT_PIXEL_MODE_LCD_V :: * FT_PIXEL_MODE_LCD_V ::
* An 8-bit bitmap, representing RGB or BGR decimated glyph images * An 8-bit bitmap, representing RGB or BGR decimated glyph images used
* used for display on rotated LCD displays; the bitmap is three * for display on rotated LCD displays; the bitmap is three times
* times taller than the original glyph image. See also * taller than the original glyph image. See also
* @FT_RENDER_MODE_LCD_V. * @FT_RENDER_MODE_LCD_V.
* *
* FT_PIXEL_MODE_BGRA :: * FT_PIXEL_MODE_BGRA ::
* [Since 2.5] An image with four 8-bit channels per pixel, * [Since 2.5] An image with four 8-bit channels per pixel,
* representing a color image (such as emoticons) with alpha * representing a color image (such as emoticons) with alpha channel.
* channel. For each pixel, the format is BGRA, which means, the * For each pixel, the format is BGRA, which means, the blue channel
* blue channel comes first in memory. The color channels are * comes first in memory. The color channels are pre-multiplied and in
* pre-multiplied and in the sRGB colorspace. For example, full * the sRGB colorspace. For example, full red at half-translucent
* red at half-translucent opacity will be represented as * opacity will be represented as '00,00,80,80', not '00,00,FF,80'.
* `00,00,80,80', not `00,00,FF,80'. See also @FT_LOAD_COLOR. * See also @FT_LOAD_COLOR.
*/ */
typedef enum FT_Pixel_Mode_ typedef enum FT_Pixel_Mode_
{ {
@ -214,9 +209,9 @@ FT_BEGIN_HEADER
* FT_Bitmap * FT_Bitmap
* *
* @description: * @description:
* A structure used to describe a bitmap or pixmap to the raster. * A structure used to describe a bitmap or pixmap to the raster. Note
* Note that we now manage pixmaps of various depths through the * that we now manage pixmaps of various depths through the `pixel_mode`
* `pixel_mode' field. * field.
* *
* @fields: * @fields:
* rows :: * rows ::
@ -226,51 +221,42 @@ FT_BEGIN_HEADER
* The number of pixels in bitmap row. * The number of pixels in bitmap row.
* *
* pitch :: * pitch ::
* The pitch's absolute value is the number of bytes * The pitch's absolute value is the number of bytes taken by one
* taken by one bitmap row, including padding. * bitmap row, including padding. However, the pitch is positive when
* However, the pitch is positive when the bitmap has * the bitmap has a 'down' flow, and negative when it has an 'up' flow.
* a `down' flow, and negative when it has an `up' * In all cases, the pitch is an offset to add to a bitmap pointer in
* flow. In all cases, the pitch is an offset to add * order to go down one row.
* to a bitmap pointer in order to go down one row.
* *
* Note that `padding' means the alignment of a * Note that 'padding' means the alignment of a bitmap to a byte
* bitmap to a byte border, and FreeType functions * border, and FreeType functions normally align to the smallest
* normally align to the smallest possible integer * possible integer value.
* value.
* *
* For the B/W rasterizer, `pitch' is always an even * For the B/W rasterizer, 'pitch' is always an even number.
* number.
* *
* To change the pitch of a bitmap (say, to make it a * To change the pitch of a bitmap (say, to make it a multiple of 4),
* multiple of 4), use @FT_Bitmap_Convert. * use @FT_Bitmap_Convert. Alternatively, you might use callback
* Alternatively, you might use callback functions to * functions to directly render to the application's surface; see the
* directly render to the application's surface; see * file `example2.cpp` in the tutorial for a demonstration.
* the file `example2.cpp' in the tutorial for a
* demonstration.
* *
* buffer :: * buffer ::
* A typeless pointer to the bitmap buffer. This * A typeless pointer to the bitmap buffer. This value should be
* value should be aligned on 32-bit boundaries in * aligned on 32-bit boundaries in most cases.
* most cases.
* *
* num_grays :: * num_grays ::
* This field is only used with * This field is only used with @FT_PIXEL_MODE_GRAY; it gives the
* @FT_PIXEL_MODE_GRAY; it gives the number of gray * number of gray levels used in the bitmap.
* levels used in the bitmap.
* *
* pixel_mode :: * pixel_mode ::
* The pixel mode, i.e., how pixel bits are stored. * The pixel mode, i.e., how pixel bits are stored. See @FT_Pixel_Mode
* See @FT_Pixel_Mode for possible values. * for possible values.
* *
* palette_mode :: * palette_mode ::
* This field is intended for paletted pixel modes; * This field is intended for paletted pixel modes; it indicates how
* it indicates how the palette is stored. Not * the palette is stored. Not used currently.
* used currently.
* *
* palette :: * palette ::
* A typeless pointer to the bitmap palette; this * A typeless pointer to the bitmap palette; this field is intended for
* field is intended for paletted pixel modes. Not * paletted pixel modes. Not used currently.
* used currently.
*/ */
typedef struct FT_Bitmap_ typedef struct FT_Bitmap_
{ {
@ -311,45 +297,42 @@ FT_BEGIN_HEADER
* The number of points in the outline. * The number of points in the outline.
* *
* points :: * points ::
* A pointer to an array of `n_points' @FT_Vector * A pointer to an array of `n_points` @FT_Vector elements, giving the
* elements, giving the outline's point coordinates. * outline's point coordinates.
* *
* tags :: * tags ::
* A pointer to an array of `n_points' chars, giving * A pointer to an array of `n_points` chars, giving each outline
* each outline point's type. * point's type.
* *
* If bit~0 is unset, the point is `off' the curve, * If bit~0 is unset, the point is 'off' the curve, i.e., a Bezier
* i.e., a Bezier control point, while it is `on' if * control point, while it is 'on' if set.
* set.
* *
* Bit~1 is meaningful for `off' points only. If set, * Bit~1 is meaningful for 'off' points only. If set, it indicates a
* it indicates a third-order Bezier arc control point; * third-order Bezier arc control point; and a second-order control
* and a second-order control point if unset. * point if unset.
* *
* If bit~2 is set, bits 5-7 contain the drop-out mode * If bit~2 is set, bits 5-7 contain the drop-out mode (as defined in
* (as defined in the OpenType specification; the value * the OpenType specification; the value is the same as the argument to
* is the same as the argument to the SCANMODE * the SCANMODE instruction).
* instruction).
* *
* Bits 3 and~4 are reserved for internal purposes. * Bits 3 and~4 are reserved for internal purposes.
* *
* contours :: * contours ::
* An array of `n_contours' shorts, giving the end * An array of `n_contours` shorts, giving the end point of each
* point of each contour within the outline. For * contour within the outline. For example, the first contour is
* example, the first contour is defined by the points * defined by the points '0' to 'contours[0]', the second one is
* `0' to `contours[0]', the second one is defined by * defined by the points 'contours[0]+1' to 'contours[1]', etc.
* the points `contours[0]+1' to `contours[1]', etc.
* *
* flags :: * flags ::
* A set of bit flags used to characterize the outline * A set of bit flags used to characterize the outline and give hints
* and give hints to the scan-converter and hinter on * to the scan-converter and hinter on how to convert/grid-fit it. See
* how to convert/grid-fit it. See @FT_OUTLINE_XXX. * @FT_OUTLINE_XXX.
* *
* @note: * @note:
* The B/W rasterizer only checks bit~2 in the `tags' array for the * The B/W rasterizer only checks bit~2 in the 'tags' array for the first
* first point of each contour. The drop-out mode as given with * point of each contour. The drop-out mode as given with
* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and * @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and
* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. * @FT_OUTLINE_INCLUDE_STUBS in 'flags' is then overridden.
*/ */
typedef struct FT_Outline_ typedef struct FT_Outline_
{ {
@ -379,21 +362,21 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A list of bit-field constants used for the flags in an outline's * A list of bit-field constants used for the flags in an outline's
* `flags' field. * 'flags' field.
* *
* @values: * @values:
* FT_OUTLINE_NONE :: * FT_OUTLINE_NONE ::
* Value~0 is reserved. * Value~0 is reserved.
* *
* FT_OUTLINE_OWNER :: * FT_OUTLINE_OWNER ::
* If set, this flag indicates that the outline's field arrays * If set, this flag indicates that the outline's field arrays (i.e.,
* (i.e., `points', `flags', and `contours') are `owned' by the * 'points', 'flags', and 'contours') are 'owned' by the outline
* outline object, and should thus be freed when it is destroyed. * object, and should thus be freed when it is destroyed.
* *
* FT_OUTLINE_EVEN_ODD_FILL :: * FT_OUTLINE_EVEN_ODD_FILL ::
* By default, outlines are filled using the non-zero winding rule. * By default, outlines are filled using the non-zero winding rule. If
* If set to 1, the outline will be filled using the even-odd fill * set to 1, the outline will be filled using the even-odd fill rule
* rule (only works with the smooth rasterizer). * (only works with the smooth rasterizer).
* *
* FT_OUTLINE_REVERSE_FILL :: * FT_OUTLINE_REVERSE_FILL ::
* By default, outside contours of an outline are oriented in * By default, outside contours of an outline are oriented in
@ -403,46 +386,44 @@ FT_BEGIN_HEADER
* converter. * converter.
* *
* FT_OUTLINE_IGNORE_DROPOUTS :: * FT_OUTLINE_IGNORE_DROPOUTS ::
* By default, the scan converter will try to detect drop-outs in * By default, the scan converter will try to detect drop-outs in an
* an outline and correct the glyph bitmap to ensure consistent * outline and correct the glyph bitmap to ensure consistent shape
* shape continuity. If set, this flag hints the scan-line * continuity. If set, this flag hints the scan-line converter to
* converter to ignore such cases. See below for more information. * ignore such cases. See below for more information.
* *
* FT_OUTLINE_SMART_DROPOUTS :: * FT_OUTLINE_SMART_DROPOUTS ::
* Select smart dropout control. If unset, use simple dropout * Select smart dropout control. If unset, use simple dropout control.
* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See * Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more
* below for more information. * information.
* *
* FT_OUTLINE_INCLUDE_STUBS :: * FT_OUTLINE_INCLUDE_STUBS ::
* If set, turn pixels on for `stubs', otherwise exclude them. * If set, turn pixels on for 'stubs', otherwise exclude them. Ignored
* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for * if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for more
* more information. * information.
* *
* FT_OUTLINE_HIGH_PRECISION :: * FT_OUTLINE_HIGH_PRECISION ::
* This flag indicates that the scan-line converter should try to * This flag indicates that the scan-line converter should try to
* convert this outline to bitmaps with the highest possible * convert this outline to bitmaps with the highest possible quality.
* quality. It is typically set for small character sizes. Note * It is typically set for small character sizes. Note that this is
* that this is only a hint that might be completely ignored by a * only a hint that might be completely ignored by a given
* given scan-converter. * scan-converter.
* *
* FT_OUTLINE_SINGLE_PASS :: * FT_OUTLINE_SINGLE_PASS ::
* This flag is set to force a given scan-converter to only use a * This flag is set to force a given scan-converter to only use a
* single pass over the outline to render a bitmap glyph image. * single pass over the outline to render a bitmap glyph image.
* Normally, it is set for very large character sizes. It is only * Normally, it is set for very large character sizes. It is only a
* a hint that might be completely ignored by a given * hint that might be completely ignored by a given scan-converter.
* scan-converter.
* *
* @note: * @note:
* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, * The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and
* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth * @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth rasterizer.
* rasterizer.
* *
* There exists a second mechanism to pass the drop-out mode to the * There exists a second mechanism to pass the drop-out mode to the B/W
* B/W rasterizer; see the `tags' field in @FT_Outline. * rasterizer; see the 'tags' field in @FT_Outline.
* *
* Please refer to the description of the `SCANTYPE' instruction in * Please refer to the description of the 'SCANTYPE' instruction in the
* the OpenType specification (in file `ttinst1.doc') how simple * OpenType specification (in file `ttinst1.doc`) how simple drop-outs,
* drop-outs, smart drop-outs, and stubs are defined. * smart drop-outs, and stubs are defined.
*/ */
#define FT_OUTLINE_NONE 0x0 #define FT_OUTLINE_NONE 0x0
#define FT_OUTLINE_OWNER 0x1 #define FT_OUTLINE_OWNER 0x1
@ -500,14 +481,14 @@ FT_BEGIN_HEADER
* FT_Outline_MoveToFunc * FT_Outline_MoveToFunc
* *
* @description: * @description:
* A function pointer type used to describe the signature of a `move * A function pointer type used to describe the signature of a 'move to'
* to' function during outline walking/decomposition. * function during outline walking/decomposition.
* *
* A `move to' is emitted to start a new contour in an outline. * A 'move to' is emitted to start a new contour in an outline.
* *
* @input: * @input:
* to :: * to ::
* A pointer to the target point of the `move to'. * A pointer to the target point of the 'move to'.
* *
* user :: * user ::
* A typeless pointer, which is passed from the caller of the * A typeless pointer, which is passed from the caller of the
@ -529,14 +510,14 @@ FT_BEGIN_HEADER
* FT_Outline_LineToFunc * FT_Outline_LineToFunc
* *
* @description: * @description:
* A function pointer type used to describe the signature of a `line * A function pointer type used to describe the signature of a 'line to'
* to' function during outline walking/decomposition. * function during outline walking/decomposition.
* *
* A `line to' is emitted to indicate a segment in the outline. * A 'line to' is emitted to indicate a segment in the outline.
* *
* @input: * @input:
* to :: * to ::
* A pointer to the target point of the `line to'. * A pointer to the target point of the 'line to'.
* *
* user :: * user ::
* A typeless pointer, which is passed from the caller of the * A typeless pointer, which is passed from the caller of the
@ -558,23 +539,23 @@ FT_BEGIN_HEADER
* FT_Outline_ConicToFunc * FT_Outline_ConicToFunc
* *
* @description: * @description:
* A function pointer type used to describe the signature of a `conic * A function pointer type used to describe the signature of a 'conic to'
* to' function during outline walking or decomposition. * function during outline walking or decomposition.
* *
* A `conic to' is emitted to indicate a second-order Bezier arc in * A 'conic to' is emitted to indicate a second-order Bezier arc in the
* the outline. * outline.
* *
* @input: * @input:
* control :: * control ::
* An intermediate control point between the last position * An intermediate control point between the last position and the new
* and the new target in `to'. * target in 'to'.
* *
* to :: * to ::
* A pointer to the target end point of the conic arc. * A pointer to the target end point of the conic arc.
* *
* user :: * user ::
* A typeless pointer, which is passed from the caller of * A typeless pointer, which is passed from the caller of the
* the decomposition function. * decomposition function.
* *
* @return: * @return:
* Error code. 0~means success. * Error code. 0~means success.
@ -593,10 +574,10 @@ FT_BEGIN_HEADER
* FT_Outline_CubicToFunc * FT_Outline_CubicToFunc
* *
* @description: * @description:
* A function pointer type used to describe the signature of a `cubic * A function pointer type used to describe the signature of a 'cubic to'
* to' function during outline walking or decomposition. * function during outline walking or decomposition.
* *
* A `cubic to' is emitted to indicate a third-order Bezier arc. * A 'cubic to' is emitted to indicate a third-order Bezier arc.
* *
* @input: * @input:
* control1 :: * control1 ::
@ -609,8 +590,8 @@ FT_BEGIN_HEADER
* A pointer to the target end point. * A pointer to the target end point.
* *
* user :: * user ::
* A typeless pointer, which is passed from the caller of * A typeless pointer, which is passed from the caller of the
* the decomposition function. * decomposition function.
* *
* @return: * @return:
* Error code. 0~means success. * Error code. 0~means success.
@ -635,7 +616,7 @@ FT_BEGIN_HEADER
* *
* @fields: * @fields:
* move_to :: * move_to ::
* The `move to' emitter. * The 'move to' emitter.
* *
* line_to :: * line_to ::
* The segment emitter. * The segment emitter.
@ -647,25 +628,25 @@ FT_BEGIN_HEADER
* The third-order Bezier arc emitter. * The third-order Bezier arc emitter.
* *
* shift :: * shift ::
* The shift that is applied to coordinates before they * The shift that is applied to coordinates before they are sent to the
* are sent to the emitter. * emitter.
* *
* delta :: * delta ::
* The delta that is applied to coordinates before they * The delta that is applied to coordinates before they are sent to the
* are sent to the emitter, but after the shift. * emitter, but after the shift.
* *
* @note: * @note:
* The point coordinates sent to the emitters are the transformed * The point coordinates sent to the emitters are the transformed version
* version of the original coordinates (this is important for high * of the original coordinates (this is important for high accuracy
* accuracy during scan-conversion). The transformation is simple: * during scan-conversion). The transformation is simple:
* *
* { * ```
* x' = (x << shift) - delta * x' = (x << shift) - delta
* y' = (y << shift) - delta * y' = (y << shift) - delta
* } * ```
* *
* Set the values of `shift' and `delta' to~0 to get the original * Set the values of 'shift' and 'delta' to~0 to get the original point
* point coordinates. * coordinates.
*/ */
typedef struct FT_Outline_Funcs_ typedef struct FT_Outline_Funcs_
{ {
@ -697,13 +678,12 @@ FT_BEGIN_HEADER
* This macro converts four-letter tags to an unsigned long type. * This macro converts four-letter tags to an unsigned long type.
* *
* @note: * @note:
* Since many 16-bit compilers don't like 32-bit enumerations, you * Since many 16-bit compilers don't like 32-bit enumerations, you should
* should redefine this macro in case of problems to something like * redefine this macro in case of problems to something like this:
* this:
* *
* { * ```
* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value * #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value
* } * ```
* *
* to get a simple enumeration without assigning special numbers. * to get a simple enumeration without assigning special numbers.
*/ */
@ -732,27 +712,26 @@ FT_BEGIN_HEADER
* The value~0 is reserved. * The value~0 is reserved.
* *
* FT_GLYPH_FORMAT_COMPOSITE :: * FT_GLYPH_FORMAT_COMPOSITE ::
* The glyph image is a composite of several other images. This * The glyph image is a composite of several other images. This format
* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to * is _only_ used with @FT_LOAD_NO_RECURSE, and is used to report
* report compound glyphs (like accented characters). * compound glyphs (like accented characters).
* *
* FT_GLYPH_FORMAT_BITMAP :: * FT_GLYPH_FORMAT_BITMAP ::
* The glyph image is a bitmap, and can be described as an * The glyph image is a bitmap, and can be described as an @FT_Bitmap.
* @FT_Bitmap. You generally need to access the `bitmap' field of * You generally need to access the 'bitmap' field of the
* the @FT_GlyphSlotRec structure to read it. * @FT_GlyphSlotRec structure to read it.
* *
* FT_GLYPH_FORMAT_OUTLINE :: * FT_GLYPH_FORMAT_OUTLINE ::
* The glyph image is a vectorial outline made of line segments * The glyph image is a vectorial outline made of line segments and
* and Bezier arcs; it can be described as an @FT_Outline; you * Bezier arcs; it can be described as an @FT_Outline; you generally
* generally want to access the `outline' field of the * want to access the 'outline' field of the @FT_GlyphSlotRec structure
* @FT_GlyphSlotRec structure to read it. * to read it.
* *
* FT_GLYPH_FORMAT_PLOTTER :: * FT_GLYPH_FORMAT_PLOTTER ::
* The glyph image is a vectorial path with no inside and outside * The glyph image is a vectorial path with no inside and outside
* contours. Some Type~1 fonts, like those in the Hershey family, * contours. Some Type~1 fonts, like those in the Hershey family,
* contain glyphs in this format. These are described as * contain glyphs in this format. These are described as @FT_Outline,
* @FT_Outline, but FreeType isn't currently capable of rendering * but FreeType isn't currently capable of rendering them correctly.
* them correctly.
*/ */
typedef enum FT_Glyph_Format_ typedef enum FT_Glyph_Format_
{ {
@ -788,12 +767,12 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* A raster is a scan converter, in charge of rendering an outline into * A raster is a scan converter, in charge of rendering an outline into a
* a bitmap. This section contains the public API for rasters. * bitmap. This section contains the public API for rasters.
* *
* Note that in FreeType 2, all rasters are now encapsulated within * Note that in FreeType 2, all rasters are now encapsulated within
* specific modules called `renderers'. See `ftrender.h' for more * specific modules called 'renderers'. See `ftrender.h` for more details
* details on renderers. * on renderers.
* *
*/ */
@ -848,8 +827,8 @@ FT_BEGIN_HEADER
* FT_Span * FT_Span
* *
* @description: * @description:
* A structure used to model a single span of gray pixels when * A structure used to model a single span of gray pixels when rendering
* rendering an anti-aliased bitmap. * an anti-aliased bitmap.
* *
* @fields: * @fields:
* x :: * x ::
@ -859,16 +838,15 @@ FT_BEGIN_HEADER
* The span's length in pixels. * The span's length in pixels.
* *
* coverage :: * coverage ::
* The span color/coverage, ranging from 0 (background) * The span color/coverage, ranging from 0 (background) to 255
* to 255 (foreground). * (foreground).
* *
* @note: * @note:
* This structure is used by the span drawing callback type named * This structure is used by the span drawing callback type named
* @FT_SpanFunc that takes the y~coordinate of the span as a * @FT_SpanFunc that takes the y~coordinate of the span as a parameter.
* parameter.
* *
* The coverage value is always between 0 and 255. If you want less * The coverage value is always between 0 and 255. If you want less gray
* gray values, the callback function has to reduce them. * values, the callback function has to reduce them.
*/ */
typedef struct FT_Span_ typedef struct FT_Span_
{ {
@ -885,9 +863,9 @@ FT_BEGIN_HEADER
* FT_SpanFunc * FT_SpanFunc
* *
* @description: * @description:
* A function used as a call-back by the anti-aliased renderer in * A function used as a call-back by the anti-aliased renderer in order
* order to let client applications draw themselves the gray pixel * to let client applications draw themselves the gray pixel spans on
* spans on each scan line. * each scan line.
* *
* @input: * @input:
* y :: * y ::
@ -897,17 +875,17 @@ FT_BEGIN_HEADER
* The number of spans to draw on this scanline. * The number of spans to draw on this scanline.
* *
* spans :: * spans ::
* A table of `count' spans to draw on the scanline. * A table of 'count' spans to draw on the scanline.
* *
* user :: * user ::
* User-supplied data that is passed to the callback. * User-supplied data that is passed to the callback.
* *
* @note: * @note:
* This callback allows client applications to directly render the * This callback allows client applications to directly render the gray
* gray spans of the anti-aliased bitmap to any kind of surfaces. * spans of the anti-aliased bitmap to any kind of surfaces.
* *
* This can be used to write anti-aliased outlines directly to a * This can be used to write anti-aliased outlines directly to a given
* given background bitmap, and even perform translucency. * background bitmap, and even perform translucency.
*/ */
typedef void typedef void
(*FT_SpanFunc)( int y, (*FT_SpanFunc)( int y,
@ -952,7 +930,7 @@ FT_BEGIN_HEADER
* FT_RASTER_FLAG_XXX * FT_RASTER_FLAG_XXX
* *
* @description: * @description:
* A list of bit flag constants as used in the `flags' field of a * A list of bit flag constants as used in the 'flags' field of a
* @FT_Raster_Params structure. * @FT_Raster_Params structure.
* *
* @values: * @values:
@ -960,35 +938,26 @@ FT_BEGIN_HEADER
* This value is 0. * This value is 0.
* *
* FT_RASTER_FLAG_AA :: * FT_RASTER_FLAG_AA ::
* This flag is set to indicate that an * This flag is set to indicate that an anti-aliased glyph image should
* anti-aliased glyph image should be * be generated. Otherwise, it will be monochrome (1-bit).
* generated. Otherwise, it will be
* monochrome (1-bit).
* *
* FT_RASTER_FLAG_DIRECT :: * FT_RASTER_FLAG_DIRECT ::
* This flag is set to indicate direct * This flag is set to indicate direct rendering. In this mode, client
* rendering. In this mode, client * applications must provide their own span callback. This lets them
* applications must provide their own span * directly draw or compose over an existing bitmap. If this bit is
* callback. This lets them directly * not set, the target pixmap's buffer _must_ be zeroed before
* draw or compose over an existing bitmap.
* If this bit is not set, the target
* pixmap's buffer _must_ be zeroed before
* rendering. * rendering.
* *
* Direct rendering is only possible with * Direct rendering is only possible with anti-aliased glyphs.
* anti-aliased glyphs.
* *
* FT_RASTER_FLAG_CLIP :: * FT_RASTER_FLAG_CLIP ::
* This flag is only used in direct * This flag is only used in direct rendering mode. If set, the output
* rendering mode. If set, the output will * will be clipped to a box specified in the `clip_box` field of the
* be clipped to a box specified in the
* `clip_box' field of the
* @FT_Raster_Params structure. * @FT_Raster_Params structure.
* *
* Note that by default, the glyph bitmap * Note that by default, the glyph bitmap is clipped to the target
* is clipped to the target pixmap, except * pixmap, except in direct rendering mode where all spans are
* in direct rendering mode where all spans * generated if no clipping box is set.
* are generated if no clipping box is set.
*/ */
#define FT_RASTER_FLAG_DEFAULT 0x0 #define FT_RASTER_FLAG_DEFAULT 0x0
#define FT_RASTER_FLAG_AA 0x1 #define FT_RASTER_FLAG_AA 0x1
@ -1009,16 +978,14 @@ FT_BEGIN_HEADER
* FT_Raster_Params * FT_Raster_Params
* *
* @description: * @description:
* A structure to hold the arguments used by a raster's render * A structure to hold the arguments used by a raster's render function.
* function.
* *
* @fields: * @fields:
* target :: * target ::
* The target bitmap. * The target bitmap.
* *
* source :: * source ::
* A pointer to the source glyph image (e.g., an * A pointer to the source glyph image (e.g., an @FT_Outline).
* @FT_Outline).
* *
* flags :: * flags ::
* The rendering flags. * The rendering flags.
@ -1036,25 +1003,23 @@ FT_BEGIN_HEADER
* Unused. * Unused.
* *
* user :: * user ::
* User-supplied data that is passed to each drawing * User-supplied data that is passed to each drawing callback.
* callback.
* *
* clip_box :: * clip_box ::
* An optional clipping box. It is only used in * An optional clipping box. It is only used in direct rendering mode.
* direct rendering mode. Note that coordinates here * Note that coordinates here should be expressed in _integer_ pixels
* should be expressed in _integer_ pixels (and not in * (and not in 26.6 fixed-point units).
* 26.6 fixed-point units).
* *
* @note: * @note:
* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA * An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA bit
* bit flag is set in the `flags' field, otherwise a monochrome * flag is set in the 'flags' field, otherwise a monochrome bitmap is
* bitmap is generated. * generated.
* *
* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the * If the @FT_RASTER_FLAG_DIRECT bit flag is set in 'flags', the raster
* raster will call the `gray_spans' callback to draw gray pixel * will call the `gray_spans` callback to draw gray pixel spans. This
* spans. This allows direct composition over a pre-existing bitmap * allows direct composition over a pre-existing bitmap through
* through user-provided callbacks to perform the span drawing and * user-provided callbacks to perform the span drawing and composition.
* composition. Not supported by the monochrome rasterizer. * Not supported by the monochrome rasterizer.
*/ */
typedef struct FT_Raster_Params_ typedef struct FT_Raster_Params_
{ {
@ -1091,11 +1056,11 @@ FT_BEGIN_HEADER
* Error code. 0~means success. * Error code. 0~means success.
* *
* @note: * @note:
* The `memory' parameter is a typeless pointer in order to avoid * The 'memory' parameter is a typeless pointer in order to avoid
* un-wanted dependencies on the rest of the FreeType code. In * un-wanted dependencies on the rest of the FreeType code. In practice,
* practice, it is an @FT_Memory object, i.e., a handle to the * it is an @FT_Memory object, i.e., a handle to the standard FreeType
* standard FreeType memory allocator. However, this field can be * memory allocator. However, this field can be completely ignored by a
* completely ignored by a given raster implementation. * given raster implementation.
*/ */
typedef int typedef int
(*FT_Raster_NewFunc)( void* memory, (*FT_Raster_NewFunc)( void* memory,
@ -1128,9 +1093,9 @@ FT_BEGIN_HEADER
* FT_Raster_ResetFunc * FT_Raster_ResetFunc
* *
* @description: * @description:
* FreeType used to provide an area of memory called the `render * FreeType used to provide an area of memory called the 'render pool'
* pool' available to all registered rasterizers. This was not * available to all registered rasterizers. This was not thread safe,
* thread safe, however, and now FreeType never allocates this pool. * however, and now FreeType never allocates this pool.
* *
* This function is called after a new raster object is created. * This function is called after a new raster object is created.
* *
@ -1139,17 +1104,16 @@ FT_BEGIN_HEADER
* A handle to the new raster object. * A handle to the new raster object.
* *
* pool_base :: * pool_base ::
* Previously, the address in memory of the render pool. * Previously, the address in memory of the render pool. Set this to
* Set this to NULL. * NULL.
* *
* pool_size :: * pool_size ::
* Previously, the size in bytes of the render pool. * Previously, the size in bytes of the render pool. Set this to 0.
* Set this to 0.
* *
* @note: * @note:
* Rasterizers should rely on dynamic or stack allocation if they * Rasterizers should rely on dynamic or stack allocation if they want to
* want to (a handle to the memory allocator is passed to the * (a handle to the memory allocator is passed to the rasterizer
* rasterizer constructor). * constructor).
*/ */
typedef void typedef void
(*FT_Raster_ResetFunc)( FT_Raster raster, (*FT_Raster_ResetFunc)( FT_Raster raster,
@ -1165,10 +1129,9 @@ FT_BEGIN_HEADER
* FT_Raster_SetModeFunc * FT_Raster_SetModeFunc
* *
* @description: * @description:
* This function is a generic facility to change modes or attributes * This function is a generic facility to change modes or attributes in a
* in a given raster. This can be used for debugging purposes, or * given raster. This can be used for debugging purposes, or simply to
* simply to allow implementation-specific `features' in a given * allow implementation-specific 'features' in a given raster module.
* raster module.
* *
* @input: * @input:
* raster :: * raster ::
@ -1202,8 +1165,8 @@ FT_BEGIN_HEADER
* A handle to the raster object. * A handle to the raster object.
* *
* params :: * params ::
* A pointer to an @FT_Raster_Params structure used to * A pointer to an @FT_Raster_Params structure used to store the
* store the rendering parameters. * rendering parameters.
* *
* @return: * @return:
* Error code. 0~means success. * Error code. 0~means success.
@ -1215,13 +1178,13 @@ FT_BEGIN_HEADER
* glyph formats. * glyph formats.
* *
* Note also that the render function can fail and return a * Note also that the render function can fail and return a
* `FT_Err_Unimplemented_Feature' error code if the raster used does * `FT_Err_Unimplemented_Feature` error code if the raster used does not
* not support direct composition. * support direct composition.
* *
* XXX: For now, the standard raster doesn't support direct * XXX: For now, the standard raster doesn't support direct
* composition but this should change for the final release (see * composition but this should change for the final release (see the
* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' * files 'demos/src/ftgrays.c' and 'demos/src/ftgrays2.c' for
* for examples of distinct implementations that support direct * examples of distinct implementations that support direct
* composition). * composition).
*/ */
typedef int typedef int

View File

@ -45,7 +45,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* This section contains various functions used to perform so-called * This section contains various functions used to perform so-called
* `incremental' glyph loading. This is a mode where all glyphs loaded * 'incremental' glyph loading. This is a mode where all glyphs loaded
* from a given @FT_Face are provided by the client application. * from a given @FT_Face are provided by the client application.
* *
* Apart from that, all other tables are loaded normally from the font * Apart from that, all other tables are loaded normally from the font
@ -67,16 +67,17 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* An opaque type describing a user-provided object used to implement * An opaque type describing a user-provided object used to implement
* `incremental' glyph loading within FreeType. This is used to support * 'incremental' glyph loading within FreeType. This is used to support
* embedded fonts in certain environments (e.g., PostScript interpreters), * embedded fonts in certain environments (e.g., PostScript
* where the glyph data isn't in the font file, or must be overridden by * interpreters), where the glyph data isn't in the font file, or must be
* different values. * overridden by different values.
* *
* @note: * @note:
* It is up to client applications to create and implement @FT_Incremental * It is up to client applications to create and implement
* objects, as long as they provide implementations for the methods * @FT_Incremental objects, as long as they provide implementations for
* @FT_Incremental_GetGlyphDataFunc, @FT_Incremental_FreeGlyphDataFunc * the methods @FT_Incremental_GetGlyphDataFunc,
* and @FT_Incremental_GetGlyphMetricsFunc. * @FT_Incremental_FreeGlyphDataFunc and
* @FT_Incremental_GetGlyphMetricsFunc.
* *
* See the description of @FT_Incremental_InterfaceRec to understand how * See the description of @FT_Incremental_InterfaceRec to understand how
* to use incremental objects with FreeType. * to use incremental objects with FreeType.
@ -91,8 +92,8 @@ FT_BEGIN_HEADER
* FT_Incremental_MetricsRec * FT_Incremental_MetricsRec
* *
* @description: * @description:
* A small structure used to contain the basic glyph metrics returned * A small structure used to contain the basic glyph metrics returned by
* by the @FT_Incremental_GetGlyphMetricsFunc method. * the @FT_Incremental_GetGlyphMetricsFunc method.
* *
* @fields: * @fields:
* bearing_x :: * bearing_x ::
@ -109,7 +110,7 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* These correspond to horizontal or vertical metrics depending on the * These correspond to horizontal or vertical metrics depending on the
* value of the `vertical' argument to the function * value of the 'vertical' argument to the function
* @FT_Incremental_GetGlyphMetricsFunc. * @FT_Incremental_GetGlyphMetricsFunc.
* *
*/ */
@ -147,8 +148,8 @@ FT_BEGIN_HEADER
* *
* Note that the format of the glyph's data bytes depends on the font * Note that the format of the glyph's data bytes depends on the font
* file format. For TrueType, it must correspond to the raw bytes within * file format. For TrueType, it must correspond to the raw bytes within
* the `glyf' table. For PostScript formats, it must correspond to the * the 'glyf' table. For PostScript formats, it must correspond to the
* *unencrypted* charstring bytes, without any `lenIV' header. It is * **unencrypted** charstring bytes, without any `lenIV` header. It is
* undefined for any other format. * undefined for any other format.
* *
* @input: * @input:
@ -169,8 +170,8 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* If this function returns successfully the method * If this function returns successfully the method
* @FT_Incremental_FreeGlyphDataFunc will be called later to release * @FT_Incremental_FreeGlyphDataFunc will be called later to release the
* the data bytes. * data bytes.
* *
* Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for * Nested calls to @FT_Incremental_GetGlyphDataFunc can happen for
* compound glyphs. * compound glyphs.
@ -214,8 +215,8 @@ FT_BEGIN_HEADER
* @description: * @description:
* A function used to retrieve the basic metrics of a given glyph index * A function used to retrieve the basic metrics of a given glyph index
* before accessing its data. This is necessary because, in certain * before accessing its data. This is necessary because, in certain
* formats like TrueType, the metrics are stored in a different place from * formats like TrueType, the metrics are stored in a different place
* the glyph images proper. * from the glyph images proper.
* *
* @input: * @input:
* incremental :: * incremental ::
@ -229,9 +230,9 @@ FT_BEGIN_HEADER
* If true, return vertical metrics. * If true, return vertical metrics.
* *
* ametrics :: * ametrics ::
* This parameter is used for both input and output. * This parameter is used for both input and output. The original
* The original glyph metrics, if any, in font units. If metrics are * glyph metrics, if any, in font units. If metrics are not available
* not available all the values must be set to zero. * all the values must be set to zero.
* *
* @output: * @output:
* ametrics :: * ametrics ::
@ -252,8 +253,8 @@ FT_BEGIN_HEADER
* FT_Incremental_FuncsRec * FT_Incremental_FuncsRec
* *
* @description: * @description:
* A table of functions for accessing fonts that load data * A table of functions for accessing fonts that load data incrementally.
* incrementally. Used in @FT_Incremental_InterfaceRec. * Used in @FT_Incremental_InterfaceRec.
* *
* @fields: * @fields:
* get_glyph_data :: * get_glyph_data ::
@ -263,8 +264,8 @@ FT_BEGIN_HEADER
* The function to release glyph data. Must not be null. * The function to release glyph data. Must not be null.
* *
* get_glyph_metrics :: * get_glyph_metrics ::
* The function to get glyph metrics. May be null if the font does * The function to get glyph metrics. May be null if the font does not
* not provide overriding glyph metrics. * provide overriding glyph metrics.
* *
*/ */
typedef struct FT_Incremental_FuncsRec_ typedef struct FT_Incremental_FuncsRec_
@ -286,7 +287,7 @@ FT_BEGIN_HEADER
* wants to support incremental glyph loading. You should use it with * wants to support incremental glyph loading. You should use it with
* @FT_PARAM_TAG_INCREMENTAL as in the following example: * @FT_PARAM_TAG_INCREMENTAL as in the following example:
* *
* { * ```
* FT_Incremental_InterfaceRec inc_int; * FT_Incremental_InterfaceRec inc_int;
* FT_Parameter parameter; * FT_Parameter parameter;
* FT_Open_Args open_args; * FT_Open_Args open_args;
@ -309,7 +310,7 @@ FT_BEGIN_HEADER
* // open the font * // open the font
* error = FT_Open_Face( library, &open_args, index, &face ); * error = FT_Open_Face( library, &open_args, index, &face );
* ... * ...
* } * ```
* *
*/ */
typedef struct FT_Incremental_InterfaceRec_ typedef struct FT_Incremental_InterfaceRec_

View File

@ -47,7 +47,7 @@ FT_BEGIN_HEADER
* @description: * @description:
* FreeType provides two alternative subpixel rendering technologies. * FreeType provides two alternative subpixel rendering technologies.
* Should you #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your * Should you #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your
* `ftoption.h', this enables patented ClearType-style rendering. * `ftoption.h`, this enables patented ClearType-style rendering.
* Otherwise, Harmony LCD rendering is enabled. These technologies are * Otherwise, Harmony LCD rendering is enabled. These technologies are
* controlled differently and API described below, although always * controlled differently and API described below, although always
* available, performs its function when appropriate method is enabled * available, performs its function when appropriate method is enabled
@ -58,7 +58,8 @@ FT_BEGIN_HEADER
* the stripe (usually horizontal RGB) by a factor of~3. Using the * the stripe (usually horizontal RGB) by a factor of~3. Using the
* subpixels coverages unfiltered can create severe color fringes * subpixels coverages unfiltered can create severe color fringes
* especially when rendering thin features. Indeed, to produce * especially when rendering thin features. Indeed, to produce
* black-on-white text, the nearby color subpixels must be dimmed equally. * black-on-white text, the nearby color subpixels must be dimmed
* equally.
* *
* A good 5-tap FIR filter should be applied to subpixel coverages * A good 5-tap FIR filter should be applied to subpixel coverages
* regardless of pixel boundaries and should have these properties: * regardless of pixel boundaries and should have these properties:
@ -82,32 +83,32 @@ FT_BEGIN_HEADER
* subpixel-rendered bitmaps generated through @FT_Render_Glyph. * subpixel-rendered bitmaps generated through @FT_Render_Glyph.
* *
* Harmony LCD rendering is suitable to panels with any regular subpixel * Harmony LCD rendering is suitable to panels with any regular subpixel
* structure, not just monitors with 3 color striped subpixels, as long as * structure, not just monitors with 3 color striped subpixels, as long
* the color subpixels have fixed positions relative to the pixel center. * as the color subpixels have fixed positions relative to the pixel
* In this case, each color channel is then rendered separately after * center. In this case, each color channel is then rendered separately
* shifting the outline opposite to the subpixel shift so that the * after shifting the outline opposite to the subpixel shift so that the
* coverage maps are aligned. This method is immune to color fringes * coverage maps are aligned. This method is immune to color fringes
* because the shifts do not change integral coverage. * because the shifts do not change integral coverage.
* *
* The subpixel geometry must be specified by xy-coordinates for each * The subpixel geometry must be specified by xy-coordinates for each
* subpixel. By convention they may come in the RGB order: * subpixel. By convention they may come in the RGB order: {{-1/3, 0},
* {{-1/3, 0}, {0, 0}, {1/3, 0}} for standard RGB striped panel or * {0, 0}, {1/3, 0}} for standard RGB striped panel or {{-1/6, 1/4},
* {{-1/6, 1/4}, {-1/6, -1/4}, {1/3, 0}} for a certain PenTile panel. * {-1/6, -1/4}, {1/3, 0}} for a certain PenTile panel.
* *
* Use the @FT_Library_SetLcdGeometry API to specify subpixel positions. * Use the @FT_Library_SetLcdGeometry API to specify subpixel positions.
* If one follows the RGB order convention, the same order applies * If one follows the RGB order convention, the same order applies to the
* to the resulting @FT_PIXEL_MODE_LCD and @FT_PIXEL_MODE_LCD_V bitmaps. * resulting @FT_PIXEL_MODE_LCD and @FT_PIXEL_MODE_LCD_V bitmaps. Note,
* Note, however, that the coordinate frame for the latter must be rotated * however, that the coordinate frame for the latter must be rotated
* clockwise. Harmony with default LCD geometry is equivalent to * clockwise. Harmony with default LCD geometry is equivalent to
* ClearType with light filter. * ClearType with light filter.
* *
* As a result of ClearType filtering or Harmony rendering, the dimensions * As a result of ClearType filtering or Harmony rendering, the
* of LCD bitmaps can be either wider or taller than the dimensions of * dimensions of LCD bitmaps can be either wider or taller than the
* the corresponding outline with regard to the pixel grid. For example, * dimensions of the corresponding outline with regard to the pixel grid.
* for @FT_RENDER_MODE_LCD, the filter adds 2~subpixels to the left, and * For example, for @FT_RENDER_MODE_LCD, the filter adds 2~subpixels to
* 2~subpixels to the right. The bitmap offset values are adjusted * the left, and 2~subpixels to the right. The bitmap offset values are
* accordingly, so clients shouldn't need to modify their layout and * adjusted accordingly, so clients shouldn't need to modify their layout
* glyph positioning code when enabling the filter. * and glyph positioning code when enabling the filter.
* *
* The ClearType and Harmony rendering is applicable to glyph bitmaps * The ClearType and Harmony rendering is applicable to glyph bitmaps
* rendered through @FT_Render_Glyph, @FT_Load_Glyph, @FT_Load_Char, and * rendered through @FT_Render_Glyph, @FT_Load_Glyph, @FT_Load_Char, and
@ -116,10 +117,10 @@ FT_BEGIN_HEADER
* @FT_Outline_Get_Bitmap. * @FT_Outline_Get_Bitmap.
* *
* The described algorithms can completely remove color artefacts when * The described algorithms can completely remove color artefacts when
* combined with gamma-corrected alpha blending in linear space. * combined with gamma-corrected alpha blending in linear space. Each of
* Each of the 3~alpha values (subpixels) must by independently used to * the 3~alpha values (subpixels) must by independently used to blend one
* blend one color channel. That is, red alpha blends the red channel of * color channel. That is, red alpha blends the red channel of the text
* the text color with the red channel of the background pixel. * color with the red channel of the background pixel.
*/ */
@ -141,8 +142,8 @@ FT_BEGIN_HEADER
* with weights of [0x08 0x4D 0x56 0x4D 0x08] in 1/256th units. * with weights of [0x08 0x4D 0x56 0x4D 0x08] in 1/256th units.
* *
* FT_LCD_FILTER_LIGHT :: * FT_LCD_FILTER_LIGHT ::
* this is a boxy, normalized, and color-balanced three-tap filter * this is a boxy, normalized, and color-balanced three-tap filter with
* with weights of [0x00 0x55 0x56 0x55 0x00] in 1/256th units. * weights of [0x00 0x55 0x56 0x55 0x00] in 1/256th units.
* *
* FT_LCD_FILTER_LEGACY :: * FT_LCD_FILTER_LEGACY ::
* FT_LCD_FILTER_LEGACY1 :: * FT_LCD_FILTER_LEGACY1 ::
@ -151,12 +152,11 @@ FT_BEGIN_HEADER
* fringes if glyphs are not extremely well hinted to the pixel grid. * fringes if glyphs are not extremely well hinted to the pixel grid.
* This filter is only provided for comparison purposes, and might be * This filter is only provided for comparison purposes, and might be
* disabled or stay unsupported in the future. The second value is * disabled or stay unsupported in the future. The second value is
* provided for compatibility with FontConfig, which historically * provided for compatibility with FontConfig, which historically used
* used different enumeration, sometimes incorrectly forwarded to * different enumeration, sometimes incorrectly forwarded to FreeType.
* FreeType.
* *
* @since: * @since:
* 2.3.0 (`FT_LCD_FILTER_LEGACY1' since 2.6.2) * 2.3.0 (`FT_LCD_FILTER_LEGACY1` since 2.6.2)
*/ */
typedef enum FT_LcdFilter_ typedef enum FT_LcdFilter_
{ {
@ -189,22 +189,22 @@ FT_BEGIN_HEADER
* The filter type. * The filter type.
* *
* You can use @FT_LCD_FILTER_NONE here to disable this feature, or * You can use @FT_LCD_FILTER_NONE here to disable this feature, or
* @FT_LCD_FILTER_DEFAULT to use a default filter that should work * @FT_LCD_FILTER_DEFAULT to use a default filter that should work well
* well on most LCD screens. * on most LCD screens.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* This feature is always disabled by default. Clients must make an * This feature is always disabled by default. Clients must make an
* explicit call to this function with a `filter' value other than * explicit call to this function with a 'filter' value other than
* @FT_LCD_FILTER_NONE in order to enable it. * @FT_LCD_FILTER_NONE in order to enable it.
* *
* Due to *PATENTS* covering subpixel rendering, this function doesn't * Due to **PATENTS** covering subpixel rendering, this function doesn't
* do anything except returning `FT_Err_Unimplemented_Feature' if the * do anything except returning `FT_Err_Unimplemented_Feature` if the
* configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined
* defined in your build of the library, which should correspond to all * in your build of the library, which should correspond to all default
* default builds of FreeType. * builds of FreeType.
* *
* @since: * @since:
* 2.3.0 * 2.3.0
@ -235,11 +235,11 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* Due to *PATENTS* covering subpixel rendering, this function doesn't * Due to **PATENTS** covering subpixel rendering, this function doesn't
* do anything except returning `FT_Err_Unimplemented_Feature' if the * do anything except returning `FT_Err_Unimplemented_Feature` if the
* configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not * configuration macro FT_CONFIG_OPTION_SUBPIXEL_RENDERING is not defined
* defined in your build of the library, which should correspond to all * in your build of the library, which should correspond to all default
* default builds of FreeType. * builds of FreeType.
* *
* LCD filter weights can also be set per face using @FT_Face_Properties * LCD filter weights can also be set per face using @FT_Face_Properties
* with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS. * with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS.
@ -296,8 +296,8 @@ FT_BEGIN_HEADER
* - {{-21, 0}, {0, 0}, {21, 0}} is the default, corresponding to 3 color * - {{-21, 0}, {0, 0}, {21, 0}} is the default, corresponding to 3 color
* stripes shifted by a third of a pixel. This could be an RGB panel. * stripes shifted by a third of a pixel. This could be an RGB panel.
* *
* - {{21, 0}, {0, 0}, {-21, 0}} looks the same as the default but * - {{21, 0}, {0, 0}, {-21, 0}} looks the same as the default but can
* can specify a BGR panel instead, while keeping the bitmap in the same * specify a BGR panel instead, while keeping the bitmap in the same
* RGB888 format. * RGB888 format.
* *
* - {{0, 21}, {0, 0}, {0, -21}} is the vertical RGB, but the bitmap * - {{0, 21}, {0, 0}, {0, -21}} is the vertical RGB, but the bitmap
@ -305,7 +305,7 @@ FT_BEGIN_HEADER
* *
* - {{-11, 16}, {-11, -16}, {22, 0}} is a certain PenTile arrangement. * - {{-11, 16}, {-11, -16}, {22, 0}} is a certain PenTile arrangement.
* *
* This function does nothing and returns `FT_Err_Unimplemented_Feature' * This function does nothing and returns `FT_Err_Unimplemented_Feature`
* in the context of ClearType-style subpixel rendering when * in the context of ClearType-style subpixel rendering when
* FT_CONFIG_OPTION_SUBPIXEL_RENDERING is defined in your build of the * FT_CONFIG_OPTION_SUBPIXEL_RENDERING is defined in your build of the
* library. * library.

View File

@ -18,8 +18,8 @@
/************************************************************************** /**************************************************************************
* *
* This file implements functions relative to list processing. Its * This file implements functions relative to list processing. Its data
* data structures are defined in `freetype.h'. * structures are defined in `freetype.h`.
* *
*/ */
@ -53,8 +53,8 @@ FT_BEGIN_HEADER
* Simple management of lists. * Simple management of lists.
* *
* @description: * @description:
* This section contains various definitions related to list * This section contains various definitions related to list processing
* processing using doubly-linked nodes. * using doubly-linked nodes.
* *
* @order: * @order:
* FT_List * FT_List
@ -141,8 +141,8 @@ FT_BEGIN_HEADER
* FT_List_Remove * FT_List_Remove
* *
* @description: * @description:
* Remove a node from a list. This function doesn't check whether * Remove a node from a list. This function doesn't check whether the
* the node is in the list! * node is in the list!
* *
* @input: * @input:
* node :: * node ::
@ -163,8 +163,7 @@ FT_BEGIN_HEADER
* FT_List_Up * FT_List_Up
* *
* @description: * @description:
* Move a node to the head/top of a list. Used to maintain LRU * Move a node to the head/top of a list. Used to maintain LRU lists.
* lists.
* *
* @inout: * @inout:
* list :: * list ::
@ -183,16 +182,16 @@ FT_BEGIN_HEADER
* FT_List_Iterator * FT_List_Iterator
* *
* @description: * @description:
* An FT_List iterator function that is called during a list parse * An FT_List iterator function that is called during a list parse by
* by @FT_List_Iterate. * @FT_List_Iterate.
* *
* @input: * @input:
* node :: * node ::
* The current iteration list node. * The current iteration list node.
* *
* user :: * user ::
* A typeless pointer passed to @FT_List_Iterate. * A typeless pointer passed to @FT_List_Iterate. Can be used to point
* Can be used to point to the iteration's state. * to the iteration's state.
*/ */
typedef FT_Error typedef FT_Error
(*FT_List_Iterator)( FT_ListNode node, (*FT_List_Iterator)( FT_ListNode node,
@ -215,8 +214,8 @@ FT_BEGIN_HEADER
* iterator :: * iterator ::
* An iterator function, called on each node of the list. * An iterator function, called on each node of the list.
* user :: * user ::
* A user-supplied field that is passed as the second * A user-supplied field that is passed as the second argument to the
* argument to the iterator. * iterator.
* *
* @return: * @return:
* The result (a FreeType error code) of the last iterator call. * The result (a FreeType error code) of the last iterator call.
@ -234,8 +233,8 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* An @FT_List iterator function that is called during a list * An @FT_List iterator function that is called during a list
* finalization by @FT_List_Finalize to destroy all elements in a * finalization by @FT_List_Finalize to destroy all elements in a given
* given list. * list.
* *
* @input: * @input:
* system :: * system ::
@ -245,8 +244,8 @@ FT_BEGIN_HEADER
* The current object to destroy. * The current object to destroy.
* *
* user :: * user ::
* A typeless pointer passed to @FT_List_Iterate. It can * A typeless pointer passed to @FT_List_Iterate. It can be used to
* be used to point to the iteration's state. * point to the iteration's state.
*/ */
typedef void typedef void
(*FT_List_Destructor)( FT_Memory memory, (*FT_List_Destructor)( FT_Memory memory,
@ -267,15 +266,15 @@ FT_BEGIN_HEADER
* A handle to the list. * A handle to the list.
* *
* destroy :: * destroy ::
* A list destructor that will be applied to each element * A list destructor that will be applied to each element of the list.
* of the list. Set this to NULL if not needed. * Set this to NULL if not needed.
* *
* memory :: * memory ::
* The current memory object that handles deallocation. * The current memory object that handles deallocation.
* *
* user :: * user ::
* A user-supplied field that is passed as the last * A user-supplied field that is passed as the last argument to the
* argument to the destructor. * destructor.
* *
* @note: * @note:
* This function expects that all nodes added by @FT_List_Add or * This function expects that all nodes added by @FT_List_Add or

View File

@ -53,9 +53,8 @@ FT_BEGIN_HEADER
* FT_Stream_OpenLZW * FT_Stream_OpenLZW
* *
* @description: * @description:
* Open a new stream to parse LZW-compressed font files. This is * Open a new stream to parse LZW-compressed font files. This is mainly
* mainly used to support the compressed `*.pcf.Z' fonts that come * used to support the compressed `*.pcf.Z` fonts that come with XFree86.
* with XFree86.
* *
* @input: * @input:
* stream :: * stream ::
@ -70,9 +69,9 @@ FT_BEGIN_HEADER
* @note: * @note:
* The source stream must be opened _before_ calling this function. * The source stream must be opened _before_ calling this function.
* *
* Calling the internal function `FT_Stream_Close' on the new stream will * Calling the internal function `FT_Stream_Close` on the new stream will
* *not* call `FT_Stream_Close' on the source stream. None of the stream * **not** call `FT_Stream_Close` on the source stream. None of the
* objects will be released to the heap. * stream objects will be released to the heap.
* *
* The stream implementation is very basic and resets the decompression * The stream implementation is very basic and resets the decompression
* process each time seeking backwards is needed within the stream * process each time seeking backwards is needed within the stream
@ -80,10 +79,10 @@ FT_BEGIN_HEADER
* In certain builds of the library, LZW compression recognition is * In certain builds of the library, LZW compression recognition is
* automatically handled when calling @FT_New_Face or @FT_Open_Face. * automatically handled when calling @FT_New_Face or @FT_Open_Face.
* This means that if no font driver is capable of handling the raw * This means that if no font driver is capable of handling the raw
* compressed file, the library will try to open a LZW stream from it * compressed file, the library will try to open a LZW stream from it and
* and re-open the face with it. * re-open the face with it.
* *
* This function may return `FT_Err_Unimplemented_Feature' if your build * This function may return `FT_Err_Unimplemented_Feature` if your build
* of FreeType was not compiled with LZW support. * of FreeType was not compiled with LZW support.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )

View File

@ -59,8 +59,8 @@ FT_BEGIN_HEADER
* Only available on the Macintosh. * Only available on the Macintosh.
* *
* @description: * @description:
* The following definitions are only available if FreeType is * The following definitions are only available if FreeType is compiled
* compiled on a Macintosh. * on a Macintosh.
* *
*/ */
@ -82,8 +82,7 @@ FT_BEGIN_HEADER
* A FOND resource. * A FOND resource.
* *
* face_index :: * face_index ::
* Only supported for the -1 `sanity check' special * Only supported for the -1 'sanity check' special case.
* case.
* *
* @output: * @output:
* aface :: * aface ::
@ -93,13 +92,13 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @example: * @example:
* This function can be used to create @FT_Face objects from fonts * This function can be used to create @FT_Face objects from fonts that
* that are installed in the system as follows. * are installed in the system as follows.
* *
* { * ```
* fond = GetResource( 'FOND', fontName ); * fond = GetResource( 'FOND', fontName );
* error = FT_New_Face_From_FOND( library, fond, 0, &face ); * error = FT_New_Face_From_FOND( library, fond, 0, &face );
* } * ```
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_New_Face_From_FOND( FT_Library library, FT_New_Face_From_FOND( FT_Library library,
@ -119,17 +118,14 @@ FT_BEGIN_HEADER
* *
* @input: * @input:
* fontName :: * fontName ::
* Mac OS name of the font (e.g., Times New Roman * Mac OS name of the font (e.g., Times New Roman Bold).
* Bold).
* *
* @output: * @output:
* pathSpec :: * pathSpec ::
* FSSpec to the file. For passing to * FSSpec to the file. For passing to @FT_New_Face_From_FSSpec.
* @FT_New_Face_From_FSSpec.
* *
* face_index :: * face_index ::
* Index of the face. For passing to * Index of the face. For passing to @FT_New_Face_From_FSSpec.
* @FT_New_Face_From_FSSpec.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -155,12 +151,10 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* pathSpec :: * pathSpec ::
* FSSpec to the file. For passing to * FSSpec to the file. For passing to @FT_New_Face_From_FSSpec.
* @FT_New_Face_From_FSSpec.
* *
* face_index :: * face_index ::
* Index of the face. For passing to * Index of the face. For passing to @FT_New_Face_From_FSSpec.
* @FT_New_Face_From_FSSpec.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -178,8 +172,8 @@ FT_BEGIN_HEADER
* FT_GetFilePath_From_Mac_ATS_Name * FT_GetFilePath_From_Mac_ATS_Name
* *
* @description: * @description:
* Return a pathname of the disk file and face index for given font * Return a pathname of the disk file and face index for given font name
* name that is handled by ATS framework. * that is handled by ATS framework.
* *
* @input: * @input:
* fontName :: * fontName ::
@ -187,12 +181,11 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* path :: * path ::
* Buffer to store pathname of the file. For passing * Buffer to store pathname of the file. For passing to @FT_New_Face.
* to @FT_New_Face. The client must allocate this * The client must allocate this buffer before calling this function.
* buffer before calling this function.
* *
* maxPathSize :: * maxPathSize ::
* Lengths of the buffer `path' that client allocated. * Lengths of the buffer 'path' that client allocated.
* *
* face_index :: * face_index ::
* Index of the face. For passing to @FT_New_Face. * Index of the face. For passing to @FT_New_Face.
@ -226,8 +219,8 @@ FT_BEGIN_HEADER
* FSSpec to the font file. * FSSpec to the font file.
* *
* face_index :: * face_index ::
* The index of the face within the resource. The * The index of the face within the resource. The first face has
* first face has index~0. * index~0.
* @output: * @output:
* aface :: * aface ::
* A handle to a new face object. * A handle to a new face object.
@ -236,8 +229,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* @FT_New_Face_From_FSSpec is identical to @FT_New_Face except * @FT_New_Face_From_FSSpec is identical to @FT_New_Face except it
* it accepts an FSSpec instead of a path. * accepts an FSSpec instead of a path.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_New_Face_From_FSSpec( FT_Library library, FT_New_Face_From_FSSpec( FT_Library library,
@ -265,8 +258,8 @@ FT_BEGIN_HEADER
* FSRef to the font file. * FSRef to the font file.
* *
* face_index :: * face_index ::
* The index of the face within the resource. The * The index of the face within the resource. The first face has
* first face has index~0. * index~0.
* @output: * @output:
* aface :: * aface ::
* A handle to a new face object. * A handle to a new face object.
@ -275,8 +268,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* @FT_New_Face_From_FSRef is identical to @FT_New_Face except * @FT_New_Face_From_FSRef is identical to @FT_New_Face except it accepts
* it accepts an FSRef instead of a path. * an FSRef instead of a path.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_New_Face_From_FSRef( FT_Library library, FT_New_Face_From_FSRef( FT_Library library,

View File

@ -39,14 +39,14 @@ FT_BEGIN_HEADER
* How to manage Multiple Masters fonts. * How to manage Multiple Masters fonts.
* *
* @description: * @description:
* The following types and functions are used to manage Multiple * The following types and functions are used to manage Multiple Master
* Master fonts, i.e., the selection of specific design instances by * fonts, i.e., the selection of specific design instances by setting
* setting design axis coordinates. * design axis coordinates.
* *
* Besides Adobe MM fonts, the interface supports Apple's TrueType GX * Besides Adobe MM fonts, the interface supports Apple's TrueType GX and
* and OpenType variation fonts. Some of the routines only work with * OpenType variation fonts. Some of the routines only work with Adobe
* Adobe MM fonts, others will work with all three types. They are * MM fonts, others will work with all three types. They are similar
* similar enough that a consistent interface makes sense. * enough that a consistent interface makes sense.
* *
*/ */
@ -57,8 +57,8 @@ FT_BEGIN_HEADER
* FT_MM_Axis * FT_MM_Axis
* *
* @description: * @description:
* A structure to model a given axis in design space for Multiple * A structure to model a given axis in design space for Multiple Masters
* Masters fonts. * fonts.
* *
* This structure can't be used for TrueType GX or OpenType variation * This structure can't be used for TrueType GX or OpenType variation
* fonts. * fonts.
@ -88,8 +88,7 @@ FT_BEGIN_HEADER
* FT_Multi_Master * FT_Multi_Master
* *
* @description: * @description:
* A structure to model the axes and space of a Multiple Masters * A structure to model the axes and space of a Multiple Masters font.
* font.
* *
* This structure can't be used for TrueType GX or OpenType variation * This structure can't be used for TrueType GX or OpenType variation
* fonts. * fonts.
@ -99,10 +98,9 @@ FT_BEGIN_HEADER
* Number of axes. Cannot exceed~4. * Number of axes. Cannot exceed~4.
* *
* num_designs :: * num_designs ::
* Number of designs; should be normally 2^num_axis * Number of designs; should be normally 2^num_axis even though the
* even though the Type~1 specification strangely * Type~1 specification strangely allows for intermediate designs to be
* allows for intermediate designs to be present. * present. This number cannot exceed~16.
* This number cannot exceed~16.
* *
* axis :: * axis ::
* A table of axis descriptors. * A table of axis descriptors.
@ -127,36 +125,33 @@ FT_BEGIN_HEADER
* *
* @fields: * @fields:
* name :: * name ::
* The axis's name. * The axis's name. Not always meaningful for TrueType GX or OpenType
* Not always meaningful for TrueType GX or OpenType
* variation fonts. * variation fonts.
* *
* minimum :: * minimum ::
* The axis's minimum design coordinate. * The axis's minimum design coordinate.
* *
* def :: * def ::
* The axis's default design coordinate. * The axis's default design coordinate. FreeType computes meaningful
* FreeType computes meaningful default values for Adobe * default values for Adobe MM fonts.
* MM fonts.
* *
* maximum :: * maximum ::
* The axis's maximum design coordinate. * The axis's maximum design coordinate.
* *
* tag :: * tag ::
* The axis's tag (the equivalent to `name' for TrueType * The axis's tag (the equivalent to 'name' for TrueType GX and
* GX and OpenType variation fonts). FreeType provides * OpenType variation fonts). FreeType provides default values for
* default values for Adobe MM fonts if possible. * Adobe MM fonts if possible.
* *
* strid :: * strid ::
* The axis name entry in the font's `name' table. This * The axis name entry in the font's 'name' table. This is another
* is another (and often better) version of the `name' * (and often better) version of the 'name' field for TrueType GX or
* field for TrueType GX or OpenType variation fonts. Not * OpenType variation fonts. Not meaningful for Adobe MM fonts.
* meaningful for Adobe MM fonts.
* *
* @note: * @note:
* The fields `minimum', `def', and `maximum' are 16.16 fractional * The fields 'minimum', 'def', and 'maximum' are 16.16 fractional values
* values for TrueType GX and OpenType variation fonts. For Adobe MM * for TrueType GX and OpenType variation fonts. For Adobe MM fonts, the
* fonts, the values are integers. * values are integers.
*/ */
typedef struct FT_Var_Axis_ typedef struct FT_Var_Axis_
{ {
@ -185,16 +180,15 @@ FT_BEGIN_HEADER
* *
* @fields: * @fields:
* coords :: * coords ::
* The design coordinates for this instance. * The design coordinates for this instance. This is an array with one
* This is an array with one entry for each axis. * entry for each axis.
* *
* strid :: * strid ::
* The entry in `name' table identifying this instance. * The entry in 'name' table identifying this instance.
* *
* psid :: * psid ::
* The entry in `name' table identifying a PostScript name * The entry in 'name' table identifying a PostScript name for this
* for this instance. Value 0xFFFF indicates a missing * instance. Value 0xFFFF indicates a missing entry.
* entry.
*/ */
typedef struct FT_Var_Named_Style_ typedef struct FT_Var_Named_Style_
{ {
@ -211,48 +205,40 @@ FT_BEGIN_HEADER
* FT_MM_Var * FT_MM_Var
* *
* @description: * @description:
* A structure to model the axes and space of an Adobe MM, TrueType * A structure to model the axes and space of an Adobe MM, TrueType GX,
* GX, or OpenType variation font. * or OpenType variation font.
* *
* Some fields are specific to one format and not to the others. * Some fields are specific to one format and not to the others.
* *
* @fields: * @fields:
* num_axis :: * num_axis ::
* The number of axes. The maximum value is~4 for * The number of axes. The maximum value is~4 for Adobe MM fonts; no
* Adobe MM fonts; no limit in TrueType GX or * limit in TrueType GX or OpenType variation fonts.
* OpenType variation fonts.
* *
* num_designs :: * num_designs ::
* The number of designs; should be normally * The number of designs; should be normally 2^num_axis for Adobe MM
* 2^num_axis for Adobe MM fonts. Not meaningful * fonts. Not meaningful for TrueType GX or OpenType variation fonts
* for TrueType GX or OpenType variation fonts * (where every glyph could have a different number of designs).
* (where every glyph could have a different
* number of designs).
* *
* num_namedstyles :: * num_namedstyles ::
* The number of named styles; a `named style' is * The number of named styles; a 'named style' is a tuple of design
* a tuple of design coordinates that has a string * coordinates that has a string ID (in the 'name' table) associated
* ID (in the `name' table) associated with it. * with it. The font can tell the user that, for example,
* The font can tell the user that, for example, * [Weight=1.5,Width=1.1] is 'Bold'. Another name for 'named style' is
* [Weight=1.5,Width=1.1] is `Bold'. Another name * 'named instance'.
* for `named style' is `named instance'.
* *
* For Adobe Multiple Masters fonts, this value is * For Adobe Multiple Masters fonts, this value is always zero because
* always zero because the format does not support * the format does not support named styles.
* named styles.
* *
* axis :: * axis ::
* An axis descriptor table. * An axis descriptor table. TrueType GX and OpenType variation fonts
* TrueType GX and OpenType variation fonts * contain slightly more data than Adobe MM fonts. Memory management
* contain slightly more data than Adobe MM fonts. * of this pointer is done internally by FreeType.
* Memory management of this pointer is done
* internally by FreeType.
* *
* namedstyle :: * namedstyle ::
* A named style (instance) table. * A named style (instance) table. Only meaningful for TrueType GX and
* Only meaningful for TrueType GX and OpenType * OpenType variation fonts. Memory management of this pointer is done
* variation fonts. Memory management of this * internally by FreeType.
* pointer is done internally by FreeType.
*/ */
typedef struct FT_MM_Var_ typedef struct FT_MM_Var_
{ {
@ -308,9 +294,8 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* amaster :: * amaster ::
* The variation descriptor. * The variation descriptor. Allocates a data structure, which the
* Allocates a data structure, which the user must * user must deallocate with a call to @FT_Done_MM_Var after use.
* deallocate with a call to @FT_Done_MM_Var after use.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -330,8 +315,8 @@ FT_BEGIN_HEADER
* *
* @input: * @input:
* library :: * library ::
* A handle of the face's parent library object that was * A handle of the face's parent library object that was used in the
* used in the call to @FT_Get_MM_Var to create `amaster'. * call to @FT_Get_MM_Var to create 'amaster'.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -347,8 +332,8 @@ FT_BEGIN_HEADER
* FT_Set_MM_Design_Coordinates * FT_Set_MM_Design_Coordinates
* *
* @description: * @description:
* For Adobe MM fonts, choose an interpolated font design through * For Adobe MM fonts, choose an interpolated font design through design
* design coordinates. * coordinates.
* *
* This function can't be used with TrueType GX or OpenType variation * This function can't be used with TrueType GX or OpenType variation
* fonts. * fonts.
@ -359,10 +344,9 @@ FT_BEGIN_HEADER
* *
* @input: * @input:
* num_coords :: * num_coords ::
* The number of available design coordinates. If it * The number of available design coordinates. If it is larger than
* is larger than the number of axes, ignore the excess * the number of axes, ignore the excess values. If it is smaller than
* values. If it is smaller than the number of axes, * the number of axes, use default values for the remaining axes.
* use default values for the remaining axes.
* *
* coords :: * coords ::
* An array of design coordinates. * An array of design coordinates.
@ -372,12 +356,12 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* [Since 2.8.1] To reset all axes to the default values, call the * [Since 2.8.1] To reset all axes to the default values, call the
* function with `num_coords' set to zero and `coords' set to NULL. * function with `num_coords` set to zero and 'coords' set to NULL.
* *
* [Since 2.9] If `num_coords' is larger than zero, this function * [Since 2.9] If `num_coords` is larger than zero, this function sets
* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' * the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field
* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' * (i.e., @FT_IS_VARIATION will return true). If `num_coords` is zero,
* is zero, this bit flag gets unset. * this bit flag gets unset.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Set_MM_Design_Coordinates( FT_Face face, FT_Set_MM_Design_Coordinates( FT_Face face,
@ -401,10 +385,9 @@ FT_BEGIN_HEADER
* *
* @input: * @input:
* num_coords :: * num_coords ::
* The number of available design coordinates. If it * The number of available design coordinates. If it is larger than
* is larger than the number of axes, ignore the excess * the number of axes, ignore the excess values. If it is smaller than
* values. If it is smaller than the number of axes, * the number of axes, use default values for the remaining axes.
* use default values for the remaining axes.
* *
* coords :: * coords ::
* An array of design coordinates. * An array of design coordinates.
@ -414,14 +397,14 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* [Since 2.8.1] To reset all axes to the default values, call the * [Since 2.8.1] To reset all axes to the default values, call the
* function with `num_coords' set to zero and `coords' set to NULL. * function with `num_coords` set to zero and 'coords' set to NULL.
* [Since 2.9] `Default values' means the currently selected named * [Since 2.9] 'Default values' means the currently selected named
* instance (or the base font if no named instance is selected). * instance (or the base font if no named instance is selected).
* *
* [Since 2.9] If `num_coords' is larger than zero, this function * [Since 2.9] If `num_coords` is larger than zero, this function sets
* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' * the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field
* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' * (i.e., @FT_IS_VARIATION will return true). If `num_coords` is zero,
* is zero, this bit flag gets unset. * this bit flag gets unset.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Set_Var_Design_Coordinates( FT_Face face, FT_Set_Var_Design_Coordinates( FT_Face face,
@ -445,9 +428,8 @@ FT_BEGIN_HEADER
* A handle to the source face. * A handle to the source face.
* *
* num_coords :: * num_coords ::
* The number of design coordinates to retrieve. If it * The number of design coordinates to retrieve. If it is larger than
* is larger than the number of axes, set the excess * the number of axes, set the excess values to~0.
* values to~0.
* *
* @output: * @output:
* coords :: * coords ::
@ -482,30 +464,28 @@ FT_BEGIN_HEADER
* *
* @input: * @input:
* num_coords :: * num_coords ::
* The number of available design coordinates. If it * The number of available design coordinates. If it is larger than
* is larger than the number of axes, ignore the excess * the number of axes, ignore the excess values. If it is smaller than
* values. If it is smaller than the number of axes, * the number of axes, use default values for the remaining axes.
* use default values for the remaining axes.
* *
* coords :: * coords ::
* The design coordinates array (each element must be * The design coordinates array (each element must be between 0 and 1.0
* between 0 and 1.0 for Adobe MM fonts, and between * for Adobe MM fonts, and between -1.0 and 1.0 for TrueType GX and
* -1.0 and 1.0 for TrueType GX and OpenType variation * OpenType variation fonts).
* fonts).
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* [Since 2.8.1] To reset all axes to the default values, call the * [Since 2.8.1] To reset all axes to the default values, call the
* function with `num_coords' set to zero and `coords' set to NULL. * function with `num_coords` set to zero and 'coords' set to NULL.
* [Since 2.9] `Default values' means the currently selected named * [Since 2.9] 'Default values' means the currently selected named
* instance (or the base font if no named instance is selected). * instance (or the base font if no named instance is selected).
* *
* [Since 2.9] If `num_coords' is larger than zero, this function * [Since 2.9] If `num_coords` is larger than zero, this function sets
* sets the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags' * the @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field
* field (i.e., @FT_IS_VARIATION will return true). If `num_coords' * (i.e., @FT_IS_VARIATION will return true). If `num_coords` is zero,
* is zero, this bit flag gets unset. * this bit flag gets unset.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Set_MM_Blend_Coordinates( FT_Face face, FT_Set_MM_Blend_Coordinates( FT_Face face,
@ -529,10 +509,10 @@ FT_BEGIN_HEADER
* A handle to the source face. * A handle to the source face.
* *
* num_coords :: * num_coords ::
* The number of normalized blend coordinates to * The number of normalized blend coordinates to retrieve. If it is
* retrieve. If it is larger than the number of axes, * larger than the number of axes, set the excess values to~0.5 for
* set the excess values to~0.5 for Adobe MM fonts, and * Adobe MM fonts, and to~0 for TrueType GX and OpenType variation
* to~0 for TrueType GX and OpenType variation fonts. * fonts.
* *
* @output: * @output:
* coords :: * coords ::
@ -606,9 +586,9 @@ FT_BEGIN_HEADER
* FT_Get_Var_Axis_Flags * FT_Get_Var_Axis_Flags
* *
* @description: * @description:
* Get the `flags' field of an OpenType Variation Axis Record. * Get the 'flags' field of an OpenType Variation Axis Record.
* *
* Not meaningful for Adobe MM fonts (`*flags' is always zero). * Not meaningful for Adobe MM fonts ('*flags' is always zero).
* *
* @input: * @input:
* master :: * master ::
@ -619,8 +599,7 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* flags :: * flags ::
* The `flags' field. See @FT_VAR_AXIS_FLAG_XXX for * The 'flags' field. See @FT_VAR_AXIS_FLAG_XXX for possible values.
* possible values.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -647,23 +626,22 @@ FT_BEGIN_HEADER
* A handle to the source face. * A handle to the source face.
* *
* instance_index :: * instance_index ::
* The index of the requested instance, starting * The index of the requested instance, starting with value 1. If set
* with value 1. If set to value 0, FreeType * to value 0, FreeType switches to font access without a named
* switches to font access without a named
* instance. * instance.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The function uses the value of `instance_index' to set bits 16-30 * The function uses the value of `instance_index` to set bits 16-30 of
* of the face's `face_index' field. It also resets any variation * the face's `face_index` field. It also resets any variation applied
* applied to the font, and the @FT_FACE_FLAG_VARIATION bit of the * to the font, and the @FT_FACE_FLAG_VARIATION bit of the face's
* face's `face_flags' field gets reset to zero (i.e., * `face_flags` field gets reset to zero (i.e., @FT_IS_VARIATION will
* @FT_IS_VARIATION will return false). * return false).
* *
* For Adobe MM fonts (which don't have named instances) this * For Adobe MM fonts (which don't have named instances) this function
* function simply resets the current face to the default instance. * simply resets the current face to the default instance.
* *
* @since: * @since:
* 2.9 * 2.9

View File

@ -46,13 +46,13 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* The definitions below are used to manage modules within FreeType. * The definitions below are used to manage modules within FreeType.
* Modules can be added, upgraded, and removed at runtime. * Modules can be added, upgraded, and removed at runtime. Additionally,
* Additionally, some module properties can be controlled also. * some module properties can be controlled also.
* *
* Here is a list of possible values of the `module_name' field in * Here is a list of possible values of the `module_name` field in the
* the @FT_Module_Class structure. * @FT_Module_Class structure.
* *
* { * ```
* autofitter * autofitter
* bdf * bdf
* cff * cff
@ -71,7 +71,7 @@ FT_BEGIN_HEADER
* type42 * type42
* t1cid * t1cid
* winfonts * winfonts
* } * ```
* *
* Note that the FreeType Cache sub-system is not a FreeType module. * Note that the FreeType Cache sub-system is not a FreeType module.
* *
@ -195,9 +195,9 @@ FT_BEGIN_HEADER
* FT_Module_Class * FT_Module_Class
* *
* @description: * @description:
* The module class descriptor. While being a public structure * The module class descriptor. While being a public structure necessary
* necessary for FreeType's module bookkeeping, most of the fields are * for FreeType's module bookkeeping, most of the fields are essentially
* essentially internal, not to be used directly by an application. * internal, not to be used directly by an application.
* *
* @fields: * @fields:
* module_flags :: * module_flags ::
@ -219,7 +219,7 @@ FT_BEGIN_HEADER
* module_interface :: * module_interface ::
* A typeless pointer to a structure (which varies between different * A typeless pointer to a structure (which varies between different
* modules) that holds the module's interface functions. This is * modules) that holds the module's interface functions. This is
* essentially what `get_interface' returns. * essentially what `get_interface` returns.
* *
* module_init :: * module_init ::
* The initializing function. * The initializing function.
@ -267,8 +267,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* An error will be returned if a module already exists by that name, * An error will be returned if a module already exists by that name, or
* or if the module requires a version of FreeType that is too great. * if the module requires a version of FreeType that is too great.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Add_Module( FT_Library library, FT_Add_Module( FT_Library library,
@ -352,37 +352,35 @@ FT_BEGIN_HEADER
* *
* value :: * value ::
* A generic pointer to a variable or structure that gives the new * A generic pointer to a variable or structure that gives the new
* value of the property. The exact definition of `value' is * value of the property. The exact definition of 'value' is
* dependent on the property; see section @properties. * dependent on the property; see section @properties.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* If `module_name' isn't a valid module name, or `property_name' * If `module_name` isn't a valid module name, or `property_name`
* doesn't specify a valid property, or if `value' doesn't represent a * doesn't specify a valid property, or if 'value' doesn't represent a
* valid value for the given property, an error is returned. * valid value for the given property, an error is returned.
* *
* The following example sets property `bar' (a simple integer) in * The following example sets property 'bar' (a simple integer) in
* module `foo' to value~1. * module 'foo' to value~1.
* *
* { * ```
* FT_UInt bar; * FT_UInt bar;
* *
* *
* bar = 1; * bar = 1;
* FT_Property_Set( library, "foo", "bar", &bar ); * FT_Property_Set( library, "foo", "bar", &bar );
* } * ```
* *
* Note that the FreeType Cache sub-system doesn't recognize module * Note that the FreeType Cache sub-system doesn't recognize module
* property changes. To avoid glyph lookup confusion within the cache * property changes. To avoid glyph lookup confusion within the cache
* you should call @FTC_Manager_Reset to completely flush the cache if * you should call @FTC_Manager_Reset to completely flush the cache if a
* a module property gets changed after @FTC_Manager_New has been * module property gets changed after @FTC_Manager_New has been called.
* called.
* *
* It is not possible to set properties of the FreeType Cache * It is not possible to set properties of the FreeType Cache sub-system
* sub-system itself with FT_Property_Set; use @FTC_Property_Set * itself with FT_Property_Set; use @FTC_Property_Set instead.
* instead.
* *
* @since: * @since:
* 2.4.11 * 2.4.11
@ -416,21 +414,21 @@ FT_BEGIN_HEADER
* *
* @inout: * @inout:
* value :: * value ::
* A generic pointer to a variable or structure that gives the * A generic pointer to a variable or structure that gives the value
* value of the property. The exact definition of `value' is * of the property. The exact definition of 'value' is dependent on
* dependent on the property; see section @properties. * the property; see section @properties.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* If `module_name' isn't a valid module name, or `property_name' * If `module_name` isn't a valid module name, or `property_name`
* doesn't specify a valid property, or if `value' doesn't represent a * doesn't specify a valid property, or if 'value' doesn't represent a
* valid value for the given property, an error is returned. * valid value for the given property, an error is returned.
* *
* The following example gets property `baz' (a range) in module `foo'. * The following example gets property 'baz' (a range) in module 'foo'.
* *
* { * ```
* typedef range_ * typedef range_
* { * {
* FT_Int32 min; * FT_Int32 min;
@ -442,7 +440,7 @@ FT_BEGIN_HEADER
* *
* *
* FT_Property_Get( library, "foo", "baz", &baz ); * FT_Property_Get( library, "foo", "baz", &baz );
* } * ```
* *
* It is not possible to retrieve properties of the FreeType Cache * It is not possible to retrieve properties of the FreeType Cache
* sub-system with FT_Property_Get; use @FTC_Property_Get instead. * sub-system with FT_Property_Get; use @FTC_Property_Get instead.
@ -464,17 +462,16 @@ FT_BEGIN_HEADER
* FT_Set_Default_Properties * FT_Set_Default_Properties
* *
* @description: * @description:
* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is * If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is set,
* set, this function reads the `FREETYPE_PROPERTIES' environment * this function reads the `FREETYPE_PROPERTIES` environment variable to
* variable to control driver properties. See section @properties * control driver properties. See section @properties for more.
* for more.
* *
* If the compilation option is not set, this function does nothing. * If the compilation option is not set, this function does nothing.
* *
* `FREETYPE_PROPERTIES' has the following syntax form (broken here * `FREETYPE_PROPERTIES` has the following syntax form (broken here into
* into multiple lines for better readability). * multiple lines for better readability).
* *
* { * ```
* <optional whitespace> * <optional whitespace>
* <module-name1> ':' * <module-name1> ':'
* <property-name1> '=' <property-value1> * <property-name1> '=' <property-value1>
@ -482,15 +479,15 @@ FT_BEGIN_HEADER
* <module-name2> ':' * <module-name2> ':'
* <property-name2> '=' <property-value2> * <property-name2> '=' <property-value2>
* ... * ...
* } * ```
* *
* Example: * Example:
* *
* { * ```
* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ * FREETYPE_PROPERTIES=truetype:interpreter-version=35 \
* cff:no-stem-darkening=1 \ * cff:no-stem-darkening=1 \
* autofitter:warping=1 * autofitter:warping=1
* } * ```
* *
* @inout: * @inout:
* library :: * library ::
@ -509,10 +506,10 @@ FT_BEGIN_HEADER
* FT_Reference_Library * FT_Reference_Library
* *
* @description: * @description:
* A counter gets initialized to~1 at the time an @FT_Library * A counter gets initialized to~1 at the time an @FT_Library structure
* structure is created. This function increments the counter. * is created. This function increments the counter. @FT_Done_Library
* @FT_Done_Library then only destroys a library if the counter is~1, * then only destroys a library if the counter is~1, otherwise it simply
* otherwise it simply decrements the counter. * decrements the counter.
* *
* This function helps in managing life-cycles of structures that * This function helps in managing life-cycles of structures that
* reference @FT_Library objects. * reference @FT_Library objects.
@ -537,19 +534,19 @@ FT_BEGIN_HEADER
* FT_New_Library * FT_New_Library
* *
* @description: * @description:
* This function is used to create a new FreeType library instance * This function is used to create a new FreeType library instance from a
* from a given memory object. It is thus possible to use libraries * given memory object. It is thus possible to use libraries with
* with distinct memory allocators within the same program. Note, * distinct memory allocators within the same program. Note, however,
* however, that the used @FT_Memory structure is expected to remain * that the used @FT_Memory structure is expected to remain valid for the
* valid for the life of the @FT_Library object. * life of the @FT_Library object.
* *
* Normally, you would call this function (followed by a call to * Normally, you would call this function (followed by a call to
* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module, * @FT_Add_Default_Modules or a series of calls to @FT_Add_Module, and a
* and a call to @FT_Set_Default_Properties) instead of * call to @FT_Set_Default_Properties) instead of @FT_Init_FreeType to
* @FT_Init_FreeType to initialize the FreeType library. * initialize the FreeType library.
* *
* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a * Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a library
* library instance. * instance.
* *
* @input: * @input:
* memory :: * memory ::
@ -577,8 +574,8 @@ FT_BEGIN_HEADER
* FT_Done_Library * FT_Done_Library
* *
* @description: * @description:
* Discard a given library object. This closes all drivers and * Discard a given library object. This closes all drivers and discards
* discards all resource objects. * all resource objects.
* *
* @input: * @input:
* library :: * library ::
@ -615,20 +612,19 @@ FT_BEGIN_HEADER
* *
* @input: * @input:
* hook_index :: * hook_index ::
* The index of the debug hook. You should use the * The index of the debug hook. You should use the values defined in
* values defined in `ftobjs.h', e.g., * `ftobjs.h`, e.g., `FT_DEBUG_HOOK_TRUETYPE`.
* `FT_DEBUG_HOOK_TRUETYPE'.
* *
* debug_hook :: * debug_hook ::
* The function used to debug the interpreter. * The function used to debug the interpreter.
* *
* @note: * @note:
* Currently, four debug hook slots are available, but only two (for * Currently, four debug hook slots are available, but only two (for the
* the TrueType and the Type~1 interpreter) are defined. * TrueType and the Type~1 interpreter) are defined.
* *
* Since the internal headers of FreeType are no longer installed, * Since the internal headers of FreeType are no longer installed, the
* the symbol `FT_DEBUG_HOOK_TRUETYPE' isn't available publicly. * symbol `FT_DEBUG_HOOK_TRUETYPE` isn't available publicly. This is a
* This is a bug and will be fixed in a forthcoming release. * bug and will be fixed in a forthcoming release.
*/ */
FT_EXPORT( void ) FT_EXPORT( void )
FT_Set_Debug_Hook( FT_Library library, FT_Set_Debug_Hook( FT_Library library,
@ -642,9 +638,9 @@ FT_BEGIN_HEADER
* FT_Add_Default_Modules * FT_Add_Default_Modules
* *
* @description: * @description:
* Add the set of default drivers to a given library object. * Add the set of default drivers to a given library object. This is
* This is only useful when you create a library object with * only useful when you create a library object with @FT_New_Library
* @FT_New_Library (usually to plug a custom memory manager). * (usually to plug a custom memory manager).
* *
* @inout: * @inout:
* library :: * library ::
@ -679,9 +675,9 @@ FT_BEGIN_HEADER
* FT_TrueTypeEngineType * FT_TrueTypeEngineType
* *
* @description: * @description:
* A list of values describing which kind of TrueType bytecode * A list of values describing which kind of TrueType bytecode engine is
* engine is implemented in a given FT_Library instance. It is used * implemented in a given FT_Library instance. It is used by the
* by the @FT_Get_TrueType_Engine_Type function. * @FT_Get_TrueType_Engine_Type function.
* *
* @values: * @values:
* FT_TRUETYPE_ENGINE_TYPE_NONE :: * FT_TRUETYPE_ENGINE_TYPE_NONE ::
@ -691,9 +687,9 @@ FT_BEGIN_HEADER
* Deprecated and removed. * Deprecated and removed.
* *
* FT_TRUETYPE_ENGINE_TYPE_PATENTED :: * FT_TRUETYPE_ENGINE_TYPE_PATENTED ::
* The library implements a bytecode interpreter that covers * The library implements a bytecode interpreter that covers the full
* the full instruction set of the TrueType virtual machine (this * instruction set of the TrueType virtual machine (this was governed
* was governed by patents until May 2010, hence the name). * by patents until May 2010, hence the name).
* *
* @since: * @since:
* 2.2 * 2.2
@ -714,8 +710,8 @@ FT_BEGIN_HEADER
* FT_Get_TrueType_Engine_Type * FT_Get_TrueType_Engine_Type
* *
* @description: * @description:
* Return an @FT_TrueTypeEngineType value to indicate which level of * Return an @FT_TrueTypeEngineType value to indicate which level of the
* the TrueType virtual machine a given library instance supports. * TrueType virtual machine a given library instance supports.
* *
* @input: * @input:
* library :: * library ::

View File

@ -20,26 +20,25 @@
* *
* This file is used to define the FreeType module error codes. * This file is used to define the FreeType module error codes.
* *
* If the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in `ftoption.h' is * If the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in `ftoption.h` is set,
* set, the lower byte of an error value identifies the error code as * the lower byte of an error value identifies the error code as usual. In
* usual. In addition, the higher byte identifies the module. For * addition, the higher byte identifies the module. For example, the error
* example, the error `FT_Err_Invalid_File_Format' has value 0x0003, the * `FT_Err_Invalid_File_Format` has value 0x0003, the error
* error `TT_Err_Invalid_File_Format' has value 0x1303, the error * `TT_Err_Invalid_File_Format` has value 0x1303, the error
* `T1_Err_Invalid_File_Format' has value 0x1403, etc. * `T1_Err_Invalid_File_Format` has value 0x1403, etc.
* *
* Note that `FT_Err_Ok', `TT_Err_Ok', etc. are always equal to zero, * Note that `FT_Err_Ok`, `TT_Err_Ok`, etc. are always equal to zero,
* including the high byte. * including the high byte.
* *
* If FT_CONFIG_OPTION_USE_MODULE_ERRORS isn't set, the higher byte of * If FT_CONFIG_OPTION_USE_MODULE_ERRORS isn't set, the higher byte of an
* an error value is set to zero. * error value is set to zero.
* *
* To hide the various `XXX_Err_' prefixes in the source code, FreeType * To hide the various `XXX_Err_` prefixes in the source code, FreeType
* provides some macros in `fttypes.h'. * provides some macros in `fttypes.h`.
* *
* FT_ERR( err ) * FT_ERR( err )
* Add current error module prefix (as defined with the * Add current error module prefix (as defined with the `FT_ERR_PREFIX`
* `FT_ERR_PREFIX' macro) to `err'. For example, in the BDF module * macro) to 'err'. For example, in the BDF module the line
* the line
* *
* error = FT_ERR( Invalid_Outline ); * error = FT_ERR( Invalid_Outline );
* *
@ -47,33 +46,31 @@
* *
* error = BDF_Err_Invalid_Outline; * error = BDF_Err_Invalid_Outline;
* *
* For simplicity, you can always use `FT_Err_Ok' directly instead * For simplicity, you can always use `FT_Err_Ok` directly instead of
* of `FT_ERR( Ok )'. * 'FT_ERR( Ok )'.
* *
* FT_ERR_EQ( errcode, err ) * FT_ERR_EQ( errcode, err ) FT_ERR_NEQ( errcode, err )
* FT_ERR_NEQ( errcode, err ) * Compare error code 'errcode' with the error 'err' for equality and
* Compare error code `errcode' with the error `err' for equality * inequality, respectively. Example:
* and inequality, respectively. Example:
* *
* if ( FT_ERR_EQ( error, Invalid_Outline ) ) * if ( FT_ERR_EQ( error, Invalid_Outline ) )
* ... * ...
* *
* Using this macro you don't have to think about error prefixes. * Using this macro you don't have to think about error prefixes. Of
* Of course, if module errors are not active, the above example is * course, if module errors are not active, the above example is the
* the same as * same as
* *
* if ( error == FT_Err_Invalid_Outline ) * if ( error == FT_Err_Invalid_Outline )
* ... * ...
* *
* FT_ERROR_BASE( errcode ) * FT_ERROR_BASE( errcode ) FT_ERROR_MODULE( errcode )
* FT_ERROR_MODULE( errcode )
* Get base error and module error code, respectively. * Get base error and module error code, respectively.
* *
* *
* It can also be used to create a module error message table easily * It can also be used to create a module error message table easily with
* with something like * something like
* *
* { * ```
* #undef FTMODERR_H_ * #undef FTMODERR_H_
* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, * #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s },
* #define FT_MODERR_START_LIST { * #define FT_MODERR_START_LIST {
@ -86,7 +83,7 @@
* } ft_mod_errors[] = * } ft_mod_errors[] =
* *
* #include FT_MODULE_ERRORS_H * #include FT_MODULE_ERRORS_H
* } * ```
* *
*/ */

View File

@ -55,8 +55,8 @@ FT_BEGIN_HEADER
* An API to validate OpenType tables. * An API to validate OpenType tables.
* *
* @description: * @description:
* This section contains the declaration of functions to validate * This section contains the declaration of functions to validate some
* some OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH). * OpenType tables (BASE, GDEF, GPOS, GSUB, JSTF, MATH).
* *
* @order: * @order:
* FT_OpenType_Validate * FT_OpenType_Validate
@ -122,8 +122,8 @@ FT_BEGIN_HEADER
* @description: * @description:
* Validate various OpenType tables to assure that all offsets and * Validate various OpenType tables to assure that all offsets and
* indices are valid. The idea is that a higher-level library that * indices are valid. The idea is that a higher-level library that
* actually does the text layout can access those tables without * actually does the text layout can access those tables without error
* error checking (which can be quite time consuming). * checking (which can be quite time consuming).
* *
* @input: * @input:
* face :: * face ::

View File

@ -47,7 +47,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* This section contains routines used to create and destroy scalable * This section contains routines used to create and destroy scalable
* glyph images known as `outlines'. These can also be measured, * glyph images known as 'outlines'. These can also be measured,
* transformed, and converted into bitmaps and pixmaps. * transformed, and converted into bitmaps and pixmaps.
* *
* @order: * @order:
@ -89,7 +89,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Walk over an outline's structure to decompose it into individual * Walk over an outline's structure to decompose it into individual
* segments and Bezier arcs. This function also emits `move to' * segments and Bezier arcs. This function also emits 'move to'
* operations to indicate the start of new contours in the outline. * operations to indicate the start of new contours in the outline.
* *
* @input: * @input:
@ -97,30 +97,28 @@ FT_BEGIN_HEADER
* A pointer to the source target. * A pointer to the source target.
* *
* func_interface :: * func_interface ::
* A table of `emitters', i.e., function pointers * A table of 'emitters', i.e., function pointers called during
* called during decomposition to indicate path * decomposition to indicate path operations.
* operations.
* *
* @inout: * @inout:
* user :: * user ::
* A typeless pointer that is passed to each * A typeless pointer that is passed to each emitter during the
* emitter during the decomposition. It can be * decomposition. It can be used to store the state during the
* used to store the state during the
* decomposition. * decomposition.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* A contour that contains a single point only is represented by a * A contour that contains a single point only is represented by a 'move
* `move to' operation followed by `line to' to the same point. In * to' operation followed by 'line to' to the same point. In most cases,
* most cases, it is best to filter this out before using the * it is best to filter this out before using the outline for stroking
* outline for stroking purposes (otherwise it would result in a * purposes (otherwise it would result in a visible dot when round caps
* visible dot when round caps are used). * are used).
* *
* Similarly, the function returns success for an empty outline also * Similarly, the function returns success for an empty outline also
* (doing nothing, this is, not calling any emitter); if necessary, * (doing nothing, this is, not calling any emitter); if necessary, you
* you should filter this out, too. * should filter this out, too.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Decompose( FT_Outline* outline, FT_Outline_Decompose( FT_Outline* outline,
@ -138,18 +136,17 @@ FT_BEGIN_HEADER
* *
* @input: * @input:
* library :: * library ::
* A handle to the library object from where the * A handle to the library object from where the outline is allocated.
* outline is allocated. Note however that the new * Note however that the new outline will **not** necessarily be
* outline will *not* necessarily be *freed*, when * **freed**, when destroying the library, by @FT_Done_FreeType.
* destroying the library, by @FT_Done_FreeType.
* *
* numPoints :: * numPoints ::
* The maximum number of points within the outline. * The maximum number of points within the outline. Must be smaller
* Must be smaller than or equal to 0xFFFF (65535). * than or equal to 0xFFFF (65535).
* *
* numContours :: * numContours ::
* The maximum number of contours within the outline. * The maximum number of contours within the outline. This value must
* This value must be in the range 0 to `numPoints'. * be in the range 0 to `numPoints`.
* *
* @output: * @output:
* anoutline :: * anoutline ::
@ -159,8 +156,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The reason why this function takes a `library' parameter is simply * The reason why this function takes a 'library' parameter is simply to
* to use the library's memory allocator. * use the library's memory allocator.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_New( FT_Library library, FT_Outline_New( FT_Library library,
@ -186,8 +183,7 @@ FT_BEGIN_HEADER
* *
* @input: * @input:
* library :: * library ::
* A handle of the library object used to allocate the * A handle of the library object used to allocate the outline.
* outline.
* *
* outline :: * outline ::
* A pointer to the outline object to be discarded. * A pointer to the outline object to be discarded.
@ -196,8 +192,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* If the outline's `owner' field is not set, only the outline * If the outline's 'owner' field is not set, only the outline descriptor
* descriptor will be released. * will be released.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Done( FT_Library library, FT_Outline_Done( FT_Library library,
@ -238,16 +234,16 @@ FT_BEGIN_HEADER
* FT_Outline_Get_CBox * FT_Outline_Get_CBox
* *
* @description: * @description:
* Return an outline's `control box'. The control box encloses all * Return an outline's 'control box'. The control box encloses all the
* the outline's points, including Bezier control points. Though it * outline's points, including Bezier control points. Though it
* coincides with the exact bounding box for most glyphs, it can be * coincides with the exact bounding box for most glyphs, it can be
* slightly larger in some situations (like when rotating an outline * slightly larger in some situations (like when rotating an outline that
* that contains Bezier outside arcs). * contains Bezier outside arcs).
* *
* Computing the control box is very fast, while getting the bounding * Computing the control box is very fast, while getting the bounding box
* box can take much more time as it needs to walk over all segments * can take much more time as it needs to walk over all segments and arcs
* and arcs in the outline. To get the latter, you can use the * in the outline. To get the latter, you can use the 'ftbbox'
* `ftbbox' component, which is dedicated to this single task. * component, which is dedicated to this single task.
* *
* @input: * @input:
* outline :: * outline ::
@ -296,9 +292,9 @@ FT_BEGIN_HEADER
* FT_Outline_Copy * FT_Outline_Copy
* *
* @description: * @description:
* Copy an outline into another one. Both objects must have the * Copy an outline into another one. Both objects must have the same
* same sizes (number of points & number of contours) when this * sizes (number of points & number of contours) when this function is
* function is called. * called.
* *
* @input: * @input:
* source :: * source ::
@ -322,8 +318,8 @@ FT_BEGIN_HEADER
* FT_Outline_Transform * FT_Outline_Transform
* *
* @description: * @description:
* Apply a simple 2x2 matrix to all of an outline's points. Useful * Apply a simple 2x2 matrix to all of an outline's points. Useful for
* for applying rotations, slanting, flipping, etc. * applying rotations, slanting, flipping, etc.
* *
* @inout: * @inout:
* outline :: * outline ::
@ -349,10 +345,10 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Embolden an outline. The new outline will be at most 4~times * Embolden an outline. The new outline will be at most 4~times
* `strength' pixels wider and higher. You may think of the left and * 'strength' pixels wider and higher. You may think of the left and
* bottom borders as unchanged. * bottom borders as unchanged.
* *
* Negative `strength' values to reduce the outline thickness are * Negative 'strength' values to reduce the outline thickness are
* possible also. * possible also.
* *
* @inout: * @inout:
@ -361,31 +357,30 @@ FT_BEGIN_HEADER
* *
* @input: * @input:
* strength :: * strength ::
* How strong the glyph is emboldened. Expressed in * How strong the glyph is emboldened. Expressed in 26.6 pixel format.
* 26.6 pixel format.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The used algorithm to increase or decrease the thickness of the * The used algorithm to increase or decrease the thickness of the glyph
* glyph doesn't change the number of points; this means that certain * doesn't change the number of points; this means that certain
* situations like acute angles or intersections are sometimes * situations like acute angles or intersections are sometimes handled
* handled incorrectly. * incorrectly.
* *
* If you need `better' metrics values you should call * If you need 'better' metrics values you should call
* @FT_Outline_Get_CBox or @FT_Outline_Get_BBox. * @FT_Outline_Get_CBox or @FT_Outline_Get_BBox.
* *
* To get meaningful results, font scaling values must be set with * To get meaningful results, font scaling values must be set with
* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. * functions like @FT_Set_Char_Size before calling FT_Render_Glyph.
* *
* @example: * @example:
* { * ```
* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); * FT_Load_Glyph( face, index, FT_LOAD_DEFAULT );
* *
* if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE ) * if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
* FT_Outline_Embolden( &face->glyph->outline, strength ); * FT_Outline_Embolden( &face->glyph->outline, strength );
* } * ```
* *
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
@ -399,10 +394,9 @@ FT_BEGIN_HEADER
* FT_Outline_EmboldenXY * FT_Outline_EmboldenXY
* *
* @description: * @description:
* Embolden an outline. The new outline will be `xstrength' pixels * Embolden an outline. The new outline will be 'xstrength' pixels wider
* wider and `ystrength' pixels higher. Otherwise, it is similar to * and 'ystrength' pixels higher. Otherwise, it is similar to
* @FT_Outline_Embolden, which uses the same strength in both * @FT_Outline_Embolden, which uses the same strength in both directions.
* directions.
* *
* @since: * @since:
* 2.4.10 * 2.4.10
@ -419,19 +413,19 @@ FT_BEGIN_HEADER
* FT_Outline_Reverse * FT_Outline_Reverse
* *
* @description: * @description:
* Reverse the drawing direction of an outline. This is used to * Reverse the drawing direction of an outline. This is used to ensure
* ensure consistent fill conventions for mirrored glyphs. * consistent fill conventions for mirrored glyphs.
* *
* @inout: * @inout:
* outline :: * outline ::
* A pointer to the target outline descriptor. * A pointer to the target outline descriptor.
* *
* @note: * @note:
* This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in * This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in the
* the outline's `flags' field. * outline's 'flags' field.
* *
* It shouldn't be used by a normal client application, unless it * It shouldn't be used by a normal client application, unless it knows
* knows what it is doing. * what it is doing.
*/ */
FT_EXPORT( void ) FT_EXPORT( void )
FT_Outline_Reverse( FT_Outline* outline ); FT_Outline_Reverse( FT_Outline* outline );
@ -461,15 +455,15 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* This function does NOT CREATE the bitmap, it only renders an * This function does NOT CREATE the bitmap, it only renders an outline
* outline image within the one you pass to it! Consequently, the * image within the one you pass to it! Consequently, the various fields
* various fields in `abitmap' should be set accordingly. * in 'abitmap' should be set accordingly.
* *
* It will use the raster corresponding to the default glyph format. * It will use the raster corresponding to the default glyph format.
* *
* The value of the `num_grays' field in `abitmap' is ignored. If * The value of the `num_grays` field in 'abitmap' is ignored. If you
* you select the gray-level rasterizer, and you want less than 256 * select the gray-level rasterizer, and you want less than 256 gray
* gray levels, you have to use @FT_Outline_Render directly. * levels, you have to use @FT_Outline_Render directly.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Get_Bitmap( FT_Library library, FT_Outline_Get_Bitmap( FT_Library library,
@ -485,8 +479,7 @@ FT_BEGIN_HEADER
* @description: * @description:
* Render an outline within a bitmap using the current scan-convert. * Render an outline within a bitmap using the current scan-convert.
* This function uses an @FT_Raster_Params structure as an argument, * This function uses an @FT_Raster_Params structure as an argument,
* allowing advanced features like direct composition, translucency, * allowing advanced features like direct composition, translucency, etc.
* etc.
* *
* @input: * @input:
* library :: * library ::
@ -497,23 +490,23 @@ FT_BEGIN_HEADER
* *
* @inout: * @inout:
* params :: * params ::
* A pointer to an @FT_Raster_Params structure used to * A pointer to an @FT_Raster_Params structure used to describe the
* describe the rendering operation. * rendering operation.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* You should know what you are doing and how @FT_Raster_Params works * You should know what you are doing and how @FT_Raster_Params works to
* to use this function. * use this function.
* *
* The field `params.source' will be set to `outline' before the scan * The field `params.source` will be set to 'outline' before the scan
* converter is called, which means that the value you give to it is * converter is called, which means that the value you give to it is
* actually ignored. * actually ignored.
* *
* The gray-level rasterizer always uses 256 gray levels. If you * The gray-level rasterizer always uses 256 gray levels. If you want
* want less gray levels, you have to provide your own span callback. * less gray levels, you have to provide your own span callback. See the
* See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the * @FT_RASTER_FLAG_DIRECT value of the 'flags' field in the
* @FT_Raster_Params structure for more details. * @FT_Raster_Params structure for more details.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
@ -535,22 +528,22 @@ FT_BEGIN_HEADER
* *
* @values: * @values:
* FT_ORIENTATION_TRUETYPE :: * FT_ORIENTATION_TRUETYPE ::
* According to the TrueType specification, clockwise contours must * According to the TrueType specification, clockwise contours must be
* be filled, and counter-clockwise ones must be unfilled. * filled, and counter-clockwise ones must be unfilled.
* *
* FT_ORIENTATION_POSTSCRIPT :: * FT_ORIENTATION_POSTSCRIPT ::
* According to the PostScript specification, counter-clockwise contours * According to the PostScript specification, counter-clockwise
* must be filled, and clockwise ones must be unfilled. * contours must be filled, and clockwise ones must be unfilled.
* *
* FT_ORIENTATION_FILL_RIGHT :: * FT_ORIENTATION_FILL_RIGHT ::
* This is identical to @FT_ORIENTATION_TRUETYPE, but is used to * This is identical to @FT_ORIENTATION_TRUETYPE, but is used to
* remember that in TrueType, everything that is to the right of * remember that in TrueType, everything that is to the right of the
* the drawing direction of a contour must be filled. * drawing direction of a contour must be filled.
* *
* FT_ORIENTATION_FILL_LEFT :: * FT_ORIENTATION_FILL_LEFT ::
* This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to * This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to
* remember that in PostScript, everything that is to the left of * remember that in PostScript, everything that is to the left of the
* the drawing direction of a contour must be filled. * drawing direction of a contour must be filled.
* *
* FT_ORIENTATION_NONE :: * FT_ORIENTATION_NONE ::
* The orientation cannot be determined. That is, different parts of * The orientation cannot be determined. That is, different parts of
@ -574,11 +567,11 @@ FT_BEGIN_HEADER
* FT_Outline_Get_Orientation * FT_Outline_Get_Orientation
* *
* @description: * @description:
* This function analyzes a glyph outline and tries to compute its * This function analyzes a glyph outline and tries to compute its fill
* fill orientation (see @FT_Orientation). This is done by integrating * orientation (see @FT_Orientation). This is done by integrating the
* the total area covered by the outline. The positive integral * total area covered by the outline. The positive integral corresponds
* corresponds to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT * to the clockwise orientation and @FT_ORIENTATION_POSTSCRIPT is
* is returned. The negative integral corresponds to the counter-clockwise * returned. The negative integral corresponds to the counter-clockwise
* orientation and @FT_ORIENTATION_TRUETYPE is returned. * orientation and @FT_ORIENTATION_TRUETYPE is returned.
* *
* Note that this will return @FT_ORIENTATION_TRUETYPE for empty * Note that this will return @FT_ORIENTATION_TRUETYPE for empty

View File

@ -58,9 +58,9 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A tag for @FT_Parameter to make @FT_Open_Face ignore typographic * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
* family names in the `name' table (introduced in OpenType version * family names in the 'name' table (introduced in OpenType version 1.4).
* 1.4). Use this for backward compatibility with legacy systems that * Use this for backward compatibility with legacy systems that have a
* have a four-faces-per-family restriction. * four-faces-per-family restriction.
* *
* @since: * @since:
* 2.8 * 2.8
@ -82,7 +82,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A tag for @FT_Parameter to make @FT_Open_Face ignore typographic * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic
* subfamily names in the `name' table (introduced in OpenType version * subfamily names in the 'name' table (introduced in OpenType version
* 1.4). Use this for backward compatibility with legacy systems that * 1.4). Use this for backward compatibility with legacy systems that
* have a four-faces-per-family restriction. * have a four-faces-per-family restriction.
* *
@ -121,8 +121,8 @@ FT_BEGIN_HEADER
* @description: * @description:
* An @FT_Parameter tag to be used with @FT_Face_Properties. The * An @FT_Parameter tag to be used with @FT_Face_Properties. The
* corresponding argument specifies the five LCD filter weights for a * corresponding argument specifies the five LCD filter weights for a
* given face (if using @FT_LOAD_TARGET_LCD, for example), overriding * given face (if using @FT_LOAD_TARGET_LCD, for example), overriding the
* the global default values or the values set up with * global default values or the values set up with
* @FT_Library_SetLcdFilterWeights. * @FT_Library_SetLcdFilterWeights.
* *
* @since: * @since:
@ -141,8 +141,7 @@ FT_BEGIN_HEADER
* @description: * @description:
* An @FT_Parameter tag to be used with @FT_Face_Properties. The * An @FT_Parameter tag to be used with @FT_Face_Properties. The
* corresponding 32bit signed integer argument overrides the font * corresponding 32bit signed integer argument overrides the font
* driver's random seed value with a face-specific one; see * driver's random seed value with a face-specific one; see @random-seed.
* @random-seed.
* *
* @since: * @since:
* 2.8 * 2.8
@ -163,10 +162,10 @@ FT_BEGIN_HEADER
* darkening, overriding the global default values or the values set up * darkening, overriding the global default values or the values set up
* with @FT_Property_Set (see @no-stem-darkening). * with @FT_Property_Set (see @no-stem-darkening).
* *
* This is a passive setting that only takes effect if the font driver * This is a passive setting that only takes effect if the font driver or
* or autohinter honors it, which the CFF, Type~1, and CID drivers * autohinter honors it, which the CFF, Type~1, and CID drivers always
* always do, but the autohinter only in `light' hinting mode (as of * do, but the autohinter only in 'light' hinting mode (as of version
* version 2.9). * 2.9).
* *
* @since: * @since:
* 2.8 * 2.8
@ -184,9 +183,9 @@ FT_BEGIN_HEADER
* @description: * @description:
* Deprecated, no effect. * Deprecated, no effect.
* *
* Previously: A constant used as the tag of an @FT_Parameter structure to * Previously: A constant used as the tag of an @FT_Parameter structure
* indicate that unpatented methods only should be used by the TrueType * to indicate that unpatented methods only should be used by the
* bytecode interpreter for a typeface opened by @FT_Open_Face. * TrueType bytecode interpreter for a typeface opened by @FT_Open_Face.
* *
*/ */
#define FT_PARAM_TAG_UNPATENTED_HINTING \ #define FT_PARAM_TAG_UNPATENTED_HINTING \

View File

@ -63,21 +63,21 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* aoutline_resolution :: * aoutline_resolution ::
* Outline resolution. This is equivalent to `face->units_per_EM' * Outline resolution. This is equivalent to `face->units_per_EM` for
* for non-PFR fonts. Optional (parameter can be NULL). * non-PFR fonts. Optional (parameter can be NULL).
* *
* ametrics_resolution :: * ametrics_resolution ::
* Metrics resolution. This is equivalent to `outline_resolution' * Metrics resolution. This is equivalent to `outline_resolution` for
* for non-PFR fonts. Optional (parameter can be NULL). * non-PFR fonts. Optional (parameter can be NULL).
* *
* ametrics_x_scale :: * ametrics_x_scale ::
* A 16.16 fixed-point number used to scale distance expressed * A 16.16 fixed-point number used to scale distance expressed in
* in metrics units to device subpixels. This is equivalent to * metrics units to device subpixels. This is equivalent to
* `face->size->x_scale', but for metrics only. Optional (parameter * `face->size->x_scale`, but for metrics only. Optional (parameter
* can be NULL). * can be NULL).
* *
* ametrics_y_scale :: * ametrics_y_scale ::
* Same as `ametrics_x_scale' but for the vertical direction. * Same as `ametrics_x_scale` but for the vertical direction.
* optional (parameter can be NULL). * optional (parameter can be NULL).
* *
* @return: * @return:
@ -123,11 +123,11 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* This function always return distances in original PFR metrics * This function always return distances in original PFR metrics units.
* units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED * This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED mode,
* mode, which always returns distances converted to outline units. * which always returns distances converted to outline units.
* *
* You can use the value of the `x_scale' and `y_scale' parameters * You can use the value of the `x_scale` and `y_scale` parameters
* returned by @FT_Get_PFR_Metrics to scale these to device subpixels. * returned by @FT_Get_PFR_Metrics to scale these to device subpixels.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
@ -161,7 +161,7 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics * You can use the `x_scale` or `y_scale` results of @FT_Get_PFR_Metrics
* to convert the advance to device subpixels (i.e., 1/64th of pixels). * to convert the advance to device subpixels (i.e., 1/64th of pixels).
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )

View File

@ -132,12 +132,11 @@ FT_BEGIN_HEADER
* The glyph image format this renderer handles. * The glyph image format this renderer handles.
* *
* render_glyph :: * render_glyph ::
* A method used to render the image that is in a * A method used to render the image that is in a given glyph slot into
* given glyph slot into a bitmap. * a bitmap.
* *
* transform_glyph :: * transform_glyph ::
* A method used to transform the image that is in * A method used to transform the image that is in a given glyph slot.
* a given glyph slot.
* *
* get_glyph_cbox :: * get_glyph_cbox ::
* A method used to access the glyph's cbox. * A method used to access the glyph's cbox.
@ -146,8 +145,8 @@ FT_BEGIN_HEADER
* A method used to pass additional parameters. * A method used to pass additional parameters.
* *
* raster_class :: * raster_class ::
* For @FT_GLYPH_FORMAT_OUTLINE renderers only. * For @FT_GLYPH_FORMAT_OUTLINE renderers only. This is a pointer to
* This is a pointer to its raster's class. * its raster's class.
*/ */
typedef struct FT_Renderer_Class_ typedef struct FT_Renderer_Class_
{ {
@ -184,8 +183,8 @@ FT_BEGIN_HEADER
* A renderer handle. 0~if none found. * A renderer handle. 0~if none found.
* *
* @note: * @note:
* An error will be returned if a module already exists by that name, * An error will be returned if a module already exists by that name, or
* or if the module requires a version of FreeType that is too great. * if the module requires a version of FreeType that is too great.
* *
* To add a new renderer, simply use @FT_Add_Module. To retrieve a * To add a new renderer, simply use @FT_Add_Module. To retrieve a
* renderer by its name, use @FT_Get_Module. * renderer by its name, use @FT_Get_Module.
@ -221,13 +220,13 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* In case of success, the renderer will be used to convert glyph * In case of success, the renderer will be used to convert glyph images
* images in the renderer's known format into bitmaps. * in the renderer's known format into bitmaps.
* *
* This doesn't change the current renderer for other formats. * This doesn't change the current renderer for other formats.
* *
* Currently, no FreeType renderer module uses `parameters'; you * Currently, no FreeType renderer module uses 'parameters'; you should
* should thus always pass NULL as the value. * thus always pass NULL as the value.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Set_Renderer( FT_Library library, FT_Set_Renderer( FT_Library library,

View File

@ -19,8 +19,8 @@
/************************************************************************** /**************************************************************************
* *
* Typical application would normally not need to use these functions. * Typical application would normally not need to use these functions.
* However, they have been placed in a public API for the rare cases * However, they have been placed in a public API for the rare cases where
* where they are needed. * they are needed.
* *
*/ */
@ -54,22 +54,20 @@ FT_BEGIN_HEADER
* Managing multiple sizes per face. * Managing multiple sizes per face.
* *
* @description: * @description:
* When creating a new face object (e.g., with @FT_New_Face), an * When creating a new face object (e.g., with @FT_New_Face), an @FT_Size
* @FT_Size object is automatically created and used to store all * object is automatically created and used to store all pixel-size
* pixel-size dependent information, available in the `face->size' * dependent information, available in the `face->size` field.
* field.
* *
* It is however possible to create more sizes for a given face, * It is however possible to create more sizes for a given face, mostly
* mostly in order to manage several character pixel sizes of the * in order to manage several character pixel sizes of the same font
* same font family and style. See @FT_New_Size and @FT_Done_Size. * family and style. See @FT_New_Size and @FT_Done_Size.
* *
* Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only * Note that @FT_Set_Pixel_Sizes and @FT_Set_Char_Size only modify the
* modify the contents of the current `active' size; you thus need * contents of the current 'active' size; you thus need to use
* to use @FT_Activate_Size to change it. * @FT_Activate_Size to change it.
* *
* 99% of applications won't need the functions provided here, * 99% of applications won't need the functions provided here, especially
* especially if they use the caching sub-system, so be cautious * if they use the caching sub-system, so be cautious when using these.
* when using these.
* *
*/ */
@ -94,8 +92,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* You need to call @FT_Activate_Size in order to select the new size * You need to call @FT_Activate_Size in order to select the new size for
* for upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size, * upcoming calls to @FT_Set_Pixel_Sizes, @FT_Set_Char_Size,
* @FT_Load_Glyph, @FT_Load_Char, etc. * @FT_Load_Glyph, @FT_Load_Char, etc.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
@ -109,9 +107,8 @@ FT_BEGIN_HEADER
* FT_Done_Size * FT_Done_Size
* *
* @description: * @description:
* Discard a given size object. Note that @FT_Done_Face * Discard a given size object. Note that @FT_Done_Face automatically
* automatically discards all size objects allocated with * discards all size objects allocated with @FT_New_Size.
* @FT_New_Size.
* *
* @input: * @input:
* size :: * size ::
@ -130,12 +127,12 @@ FT_BEGIN_HEADER
* FT_Activate_Size * FT_Activate_Size
* *
* @description: * @description:
* Even though it is possible to create several size objects for a * Even though it is possible to create several size objects for a given
* given face (see @FT_New_Size for details), functions like * face (see @FT_New_Size for details), functions like @FT_Load_Glyph or
* @FT_Load_Glyph or @FT_Load_Char only use the one that has been * @FT_Load_Char only use the one that has been activated last to
* activated last to determine the `current character pixel size'. * determine the 'current character pixel size'.
* *
* This function can be used to `activate' a previously created size * This function can be used to 'activate' a previously created size
* object. * object.
* *
* @input: * @input:
@ -146,8 +143,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* If `face' is the size's parent face object, this function changes * If 'face' is the size's parent face object, this function changes the
* the value of `face->size' to the input size handle. * value of `face->size` to the input size handle.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Activate_Size( FT_Size size ); FT_Activate_Size( FT_Size size );

View File

@ -2,7 +2,7 @@
* *
* ftsnames.h * ftsnames.h
* *
* Simple interface to access SFNT `name' tables (which are used * Simple interface to access SFNT 'name' tables (which are used
* to hold font names, copyright info, notices, etc.) (specification). * to hold font names, copyright info, notices, etc.) (specification).
* *
* This is _not_ used to retrieve glyph names! * This is _not_ used to retrieve glyph names!
@ -49,10 +49,10 @@ FT_BEGIN_HEADER
* Access the names embedded in TrueType and OpenType files. * Access the names embedded in TrueType and OpenType files.
* *
* @description: * @description:
* The TrueType and OpenType specifications allow the inclusion of * The TrueType and OpenType specifications allow the inclusion of a
* a special names table (`name') in font files. This table contains * special names table ('name') in font files. This table contains
* textual (and internationalized) information regarding the font, * textual (and internationalized) information regarding the font, like
* like family name, copyright, version, etc. * family name, copyright, version, etc.
* *
* The definitions below are used to access them if available. * The definitions below are used to access them if available.
* *
@ -67,43 +67,39 @@ FT_BEGIN_HEADER
* FT_SfntName * FT_SfntName
* *
* @description: * @description:
* A structure used to model an SFNT `name' table entry. * A structure used to model an SFNT 'name' table entry.
* *
* @fields: * @fields:
* platform_id :: * platform_id ::
* The platform ID for `string'. * The platform ID for 'string'. See @TT_PLATFORM_XXX for possible
* See @TT_PLATFORM_XXX for possible values. * values.
* *
* encoding_id :: * encoding_id ::
* The encoding ID for `string'. * The encoding ID for 'string'. See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX,
* See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, * @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX for possible
* @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX * values.
* for possible values.
* *
* language_id :: * language_id ::
* The language ID for `string'. * The language ID for 'string'. See @TT_MAC_LANGID_XXX and
* See @TT_MAC_LANGID_XXX and @TT_MS_LANGID_XXX for * @TT_MS_LANGID_XXX for possible values.
* possible values.
* *
* Registered OpenType values for `language_id' are * Registered OpenType values for `language_id` are always smaller than
* always smaller than 0x8000; values equal or larger * 0x8000; values equal or larger than 0x8000 usually indicate a
* than 0x8000 usually indicate a language tag string * language tag string (introduced in OpenType version 1.6). Use
* (introduced in OpenType version 1.6). Use function * function @FT_Get_Sfnt_LangTag with `language_id` as its argument to
* @FT_Get_Sfnt_LangTag with `language_id' as its * retrieve the associated language tag.
* argument to retrieve the associated language tag.
* *
* name_id :: * name_id ::
* An identifier for `string'. * An identifier for 'string'. See @TT_NAME_ID_XXX for possible
* See @TT_NAME_ID_XXX for possible values. * values.
* *
* string :: * string ::
* The `name' string. Note that its format differs * The 'name' string. Note that its format differs depending on the
* depending on the (platform,encoding) pair, being * (platform,encoding) pair, being either a string of bytes (without a
* either a string of bytes (without a terminating * terminating NULL byte) or containing UTF-16BE entities.
* NULL byte) or containing UTF-16BE entities.
* *
* string_len :: * string_len ::
* The length of `string' in bytes. * The length of 'string' in bytes.
* *
* @note: * @note:
* Please refer to the TrueType or OpenType specification for more * Please refer to the TrueType or OpenType specification for more
@ -128,18 +124,18 @@ FT_BEGIN_HEADER
* FT_Get_Sfnt_Name_Count * FT_Get_Sfnt_Name_Count
* *
* @description: * @description:
* Retrieve the number of name strings in the SFNT `name' table. * Retrieve the number of name strings in the SFNT 'name' table.
* *
* @input: * @input:
* face :: * face ::
* A handle to the source face. * A handle to the source face.
* *
* @return: * @return:
* The number of strings in the `name' table. * The number of strings in the 'name' table.
* *
* @note: * @note:
* This function always returns an error if the config macro * This function always returns an error if the config macro
* `TT_CONFIG_OPTION_SFNT_NAMES' is not defined in `ftoption.h'. * `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`.
*/ */
FT_EXPORT( FT_UInt ) FT_EXPORT( FT_UInt )
FT_Get_Sfnt_Name_Count( FT_Face face ); FT_Get_Sfnt_Name_Count( FT_Face face );
@ -151,14 +147,14 @@ FT_BEGIN_HEADER
* FT_Get_Sfnt_Name * FT_Get_Sfnt_Name
* *
* @description: * @description:
* Retrieve a string of the SFNT `name' table for a given index. * Retrieve a string of the SFNT 'name' table for a given index.
* *
* @input: * @input:
* face :: * face ::
* A handle to the source face. * A handle to the source face.
* *
* idx :: * idx ::
* The index of the `name' string. * The index of the 'name' string.
* *
* @output: * @output:
* aname :: * aname ::
@ -168,19 +164,19 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The `string' array returned in the `aname' structure is not * The 'string' array returned in the 'aname' structure is not
* null-terminated. Note that you don't have to deallocate `string' * null-terminated. Note that you don't have to deallocate 'string' by
* by yourself; FreeType takes care of it if you call @FT_Done_Face. * yourself; FreeType takes care of it if you call @FT_Done_Face.
* *
* Use @FT_Get_Sfnt_Name_Count to get the total number of available * Use @FT_Get_Sfnt_Name_Count to get the total number of available
* `name' table entries, then do a loop until you get the right * 'name' table entries, then do a loop until you get the right platform,
* platform, encoding, and name ID. * encoding, and name ID.
* *
* `name' table format~1 entries can use language tags also, see * 'name' table format~1 entries can use language tags also, see
* @FT_Get_Sfnt_LangTag. * @FT_Get_Sfnt_LangTag.
* *
* This function always returns an error if the config macro * This function always returns an error if the config macro
* `TT_CONFIG_OPTION_SFNT_NAMES' is not defined in `ftoption.h'. * `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Get_Sfnt_Name( FT_Face face, FT_Get_Sfnt_Name( FT_Face face,
@ -194,16 +190,15 @@ FT_BEGIN_HEADER
* FT_SfntLangTag * FT_SfntLangTag
* *
* @description: * @description:
* A structure to model a language tag entry from an SFNT `name' * A structure to model a language tag entry from an SFNT 'name' table.
* table.
* *
* @fields: * @fields:
* string :: * string ::
* The language tag string, encoded in UTF-16BE * The language tag string, encoded in UTF-16BE (without trailing NULL
* (without trailing NULL bytes). * bytes).
* *
* string_len :: * string_len ::
* The length of `string' in *bytes*. * The length of 'string' in **bytes**.
* *
* @note: * @note:
* Please refer to the TrueType or OpenType specification for more * Please refer to the TrueType or OpenType specification for more
@ -227,36 +222,36 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Retrieve the language tag associated with a language ID of an SFNT * Retrieve the language tag associated with a language ID of an SFNT
* `name' table entry. * 'name' table entry.
* *
* @input: * @input:
* face :: * face ::
* A handle to the source face. * A handle to the source face.
* *
* langID :: * langID ::
* The language ID, as returned by @FT_Get_Sfnt_Name. * The language ID, as returned by @FT_Get_Sfnt_Name. This is always a
* This is always a value larger than 0x8000. * value larger than 0x8000.
* *
* @output: * @output:
* alangTag :: * alangTag ::
* The language tag associated with the `name' table * The language tag associated with the 'name' table entry's language
* entry's language ID. * ID.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* The `string' array returned in the `alangTag' structure is not * The 'string' array returned in the `alangTag` structure is not
* null-terminated. Note that you don't have to deallocate `string' * null-terminated. Note that you don't have to deallocate 'string' by
* by yourself; FreeType takes care of it if you call @FT_Done_Face. * yourself; FreeType takes care of it if you call @FT_Done_Face.
* *
* Only `name' table format~1 supports language tags. For format~0 * Only 'name' table format~1 supports language tags. For format~0
* tables, this function always returns FT_Err_Invalid_Table. For * tables, this function always returns FT_Err_Invalid_Table. For
* invalid format~1 language ID values, FT_Err_Invalid_Argument is * invalid format~1 language ID values, FT_Err_Invalid_Argument is
* returned. * returned.
* *
* This function always returns an error if the config macro * This function always returns an error if the config macro
* `TT_CONFIG_OPTION_SFNT_NAMES' is not defined in `ftoption.h'. * `TT_CONFIG_OPTION_SFNT_NAMES` is not defined in `ftoption.h`.
* *
* @since: * @since:
* 2.8 * 2.8

View File

@ -39,11 +39,11 @@ FT_BEGIN_HEADER
* Generating bordered and stroked glyphs. * Generating bordered and stroked glyphs.
* *
* @description: * @description:
* This component generates stroked outlines of a given vectorial * This component generates stroked outlines of a given vectorial glyph.
* glyph. It also allows you to retrieve the `outside' and/or the * It also allows you to retrieve the 'outside' and/or the 'inside'
* `inside' borders of the stroke. * borders of the stroke.
* *
* This can be useful to generate `bordered' glyph, i.e., glyphs * This can be useful to generate 'bordered' glyph, i.e., glyphs
* displayed with a coloured (and anti-aliased) border around their * displayed with a coloured (and anti-aliased) border around their
* shape. * shape.
* *
@ -98,45 +98,42 @@ FT_BEGIN_HEADER
* FT_Stroker_LineJoin * FT_Stroker_LineJoin
* *
* @description: * @description:
* These values determine how two joining lines are rendered * These values determine how two joining lines are rendered in a
* in a stroker. * stroker.
* *
* @values: * @values:
* FT_STROKER_LINEJOIN_ROUND :: * FT_STROKER_LINEJOIN_ROUND ::
* Used to render rounded line joins. Circular arcs are used * Used to render rounded line joins. Circular arcs are used to join
* to join two lines smoothly. * two lines smoothly.
* *
* FT_STROKER_LINEJOIN_BEVEL :: * FT_STROKER_LINEJOIN_BEVEL ::
* Used to render beveled line joins. The outer corner of * Used to render beveled line joins. The outer corner of the joined
* the joined lines is filled by enclosing the triangular * lines is filled by enclosing the triangular region of the corner
* region of the corner with a straight line between the * with a straight line between the outer corners of each stroke.
* outer corners of each stroke.
* *
* FT_STROKER_LINEJOIN_MITER_FIXED :: * FT_STROKER_LINEJOIN_MITER_FIXED ::
* Used to render mitered line joins, with fixed bevels if the * Used to render mitered line joins, with fixed bevels if the miter
* miter limit is exceeded. The outer edges of the strokes * limit is exceeded. The outer edges of the strokes for the two
* for the two segments are extended until they meet at an * segments are extended until they meet at an angle. If the segments
* angle. If the segments meet at too sharp an angle (such * meet at too sharp an angle (such that the miter would extend from
* that the miter would extend from the intersection of the * the intersection of the segments a distance greater than the product
* segments a distance greater than the product of the miter * of the miter limit value and the border radius), then a bevel join
* limit value and the border radius), then a bevel join (see * (see above) is used instead. This prevents long spikes being
* above) is used instead. This prevents long spikes being * created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter line
* created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter * join as used in PostScript and PDF.
* line join as used in PostScript and PDF.
* *
* FT_STROKER_LINEJOIN_MITER_VARIABLE :: * FT_STROKER_LINEJOIN_MITER_VARIABLE ::
* FT_STROKER_LINEJOIN_MITER :: * FT_STROKER_LINEJOIN_MITER ::
* Used to render mitered line joins, with variable bevels if * Used to render mitered line joins, with variable bevels if the miter
* the miter limit is exceeded. The intersection of the * limit is exceeded. The intersection of the strokes is clipped at a
* strokes is clipped at a line perpendicular to the bisector * line perpendicular to the bisector of the angle between the strokes,
* of the angle between the strokes, at the distance from the * at the distance from the intersection of the segments equal to the
* intersection of the segments equal to the product of the * product of the miter limit value and the border radius. This
* miter limit value and the border radius. This prevents * prevents long spikes being created.
* long spikes being created. * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line join as
* FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line * used in XPS. FT_STROKER_LINEJOIN_MITER is an alias for
* join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias * FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for backward
* for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for * compatibility.
* backward compatibility.
*/ */
typedef enum FT_Stroker_LineJoin_ typedef enum FT_Stroker_LineJoin_
{ {
@ -155,21 +152,19 @@ FT_BEGIN_HEADER
* FT_Stroker_LineCap * FT_Stroker_LineCap
* *
* @description: * @description:
* These values determine how the end of opened sub-paths are * These values determine how the end of opened sub-paths are rendered in
* rendered in a stroke. * a stroke.
* *
* @values: * @values:
* FT_STROKER_LINECAP_BUTT :: * FT_STROKER_LINECAP_BUTT ::
* The end of lines is rendered as a full stop on the last * The end of lines is rendered as a full stop on the last point
* point itself. * itself.
* *
* FT_STROKER_LINECAP_ROUND :: * FT_STROKER_LINECAP_ROUND ::
* The end of lines is rendered as a half-circle around the * The end of lines is rendered as a half-circle around the last point.
* last point.
* *
* FT_STROKER_LINECAP_SQUARE :: * FT_STROKER_LINECAP_SQUARE ::
* The end of lines is rendered as a square around the * The end of lines is rendered as a square around the last point.
* last point.
*/ */
typedef enum FT_Stroker_LineCap_ typedef enum FT_Stroker_LineCap_
{ {
@ -186,8 +181,8 @@ FT_BEGIN_HEADER
* FT_StrokerBorder * FT_StrokerBorder
* *
* @description: * @description:
* These values are used to select a given stroke border * These values are used to select a given stroke border in
* in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder. * @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.
* *
* @values: * @values:
* FT_STROKER_BORDER_LEFT :: * FT_STROKER_BORDER_LEFT ::
@ -197,9 +192,9 @@ FT_BEGIN_HEADER
* Select the right border, relative to the drawing direction. * Select the right border, relative to the drawing direction.
* *
* @note: * @note:
* Applications are generally interested in the `inside' and `outside' * Applications are generally interested in the 'inside' and 'outside'
* borders. However, there is no direct mapping between these and the * borders. However, there is no direct mapping between these and the
* `left' and `right' ones, since this really depends on the glyph's * 'left' and 'right' ones, since this really depends on the glyph's
* drawing orientation, which varies between font formats. * drawing orientation, which varies between font formats.
* *
* You can however use @FT_Outline_GetInsideBorder and * You can however use @FT_Outline_GetInsideBorder and
@ -219,8 +214,8 @@ FT_BEGIN_HEADER
* FT_Outline_GetInsideBorder * FT_Outline_GetInsideBorder
* *
* @description: * @description:
* Retrieve the @FT_StrokerBorder value corresponding to the * Retrieve the @FT_StrokerBorder value corresponding to the 'inside'
* `inside' borders of a given outline. * borders of a given outline.
* *
* @input: * @input:
* outline :: * outline ::
@ -240,8 +235,8 @@ FT_BEGIN_HEADER
* FT_Outline_GetOutsideBorder * FT_Outline_GetOutsideBorder
* *
* @description: * @description:
* Retrieve the @FT_StrokerBorder value corresponding to the * Retrieve the @FT_StrokerBorder value corresponding to the 'outside'
* `outside' borders of a given outline. * borders of a given outline.
* *
* @input: * @input:
* outline :: * outline ::
@ -302,12 +297,11 @@ FT_BEGIN_HEADER
* *
* miter_limit :: * miter_limit ::
* The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and * The miter limit for the FT_STROKER_LINEJOIN_MITER_FIXED and
* FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, * FT_STROKER_LINEJOIN_MITER_VARIABLE line join styles, expressed as
* expressed as 16.16 fixed-point value. * 16.16 fixed-point value.
* *
* @note: * @note:
* The radius is expressed in the same units as the outline * The radius is expressed in the same units as the outline coordinates.
* coordinates.
* *
* This function calls @FT_Stroker_Rewind automatically. * This function calls @FT_Stroker_Rewind automatically.
*/ */
@ -325,10 +319,9 @@ FT_BEGIN_HEADER
* FT_Stroker_Rewind * FT_Stroker_Rewind
* *
* @description: * @description:
* Reset a stroker object without changing its attributes. * Reset a stroker object without changing its attributes. You should
* You should call this function before beginning a new * call this function before beginning a new series of calls to
* series of calls to @FT_Stroker_BeginSubPath or * @FT_Stroker_BeginSubPath or @FT_Stroker_EndSubPath.
* @FT_Stroker_EndSubPath.
* *
* @input: * @input:
* stroker :: * stroker ::
@ -344,9 +337,9 @@ FT_BEGIN_HEADER
* FT_Stroker_ParseOutline * FT_Stroker_ParseOutline
* *
* @description: * @description:
* A convenience function used to parse a whole outline with * A convenience function used to parse a whole outline with the stroker.
* the stroker. The resulting outline(s) can be retrieved * The resulting outline(s) can be retrieved later by functions like
* later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export. * @FT_Stroker_GetCounts and @FT_Stroker_Export.
* *
* @input: * @input:
* stroker :: * stroker ::
@ -356,18 +349,18 @@ FT_BEGIN_HEADER
* The source outline. * The source outline.
* *
* opened :: * opened ::
* A boolean. If~1, the outline is treated as an open path instead * A boolean. If~1, the outline is treated as an open path instead of
* of a closed one. * a closed one.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* If `opened' is~0 (the default), the outline is treated as a closed * If 'opened' is~0 (the default), the outline is treated as a closed
* path, and the stroker generates two distinct `border' outlines. * path, and the stroker generates two distinct 'border' outlines.
* *
* If `opened' is~1, the outline is processed as an open path, and the * If 'opened' is~1, the outline is processed as an open path, and the
* stroker generates a single `stroke' outline. * stroker generates a single 'stroke' outline.
* *
* This function calls @FT_Stroker_Rewind automatically. * This function calls @FT_Stroker_Rewind automatically.
*/ */
@ -399,8 +392,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* This function is useful when you need to stroke a path that is * This function is useful when you need to stroke a path that is not
* not stored as an @FT_Outline object. * stored as an @FT_Outline object.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Stroker_BeginSubPath( FT_Stroker stroker, FT_Stroker_BeginSubPath( FT_Stroker stroker,
@ -424,9 +417,9 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* You should call this function after @FT_Stroker_BeginSubPath. * You should call this function after @FT_Stroker_BeginSubPath. If the
* If the subpath was not `opened', this function `draws' a * subpath was not 'opened', this function 'draws' a single line segment
* single line segment to the start position when needed. * to the start position when needed.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Stroker_EndSubPath( FT_Stroker stroker ); FT_Stroker_EndSubPath( FT_Stroker stroker );
@ -438,8 +431,8 @@ FT_BEGIN_HEADER
* FT_Stroker_LineTo * FT_Stroker_LineTo
* *
* @description: * @description:
* `Draw' a single line segment in the stroker's current sub-path, * 'Draw' a single line segment in the stroker's current sub-path, from
* from the last position. * the last position.
* *
* @input: * @input:
* stroker :: * stroker ::
@ -466,7 +459,7 @@ FT_BEGIN_HEADER
* FT_Stroker_ConicTo * FT_Stroker_ConicTo
* *
* @description: * @description:
* `Draw' a single quadratic Bezier in the stroker's current sub-path, * 'Draw' a single quadratic Bezier in the stroker's current sub-path,
* from the last position. * from the last position.
* *
* @input: * @input:
@ -498,8 +491,8 @@ FT_BEGIN_HEADER
* FT_Stroker_CubicTo * FT_Stroker_CubicTo
* *
* @description: * @description:
* `Draw' a single cubic Bezier in the stroker's current sub-path, * 'Draw' a single cubic Bezier in the stroker's current sub-path, from
* from the last position. * the last position.
* *
* @input: * @input:
* stroker :: * stroker ::
@ -534,10 +527,10 @@ FT_BEGIN_HEADER
* FT_Stroker_GetBorderCounts * FT_Stroker_GetBorderCounts
* *
* @description: * @description:
* Call this function once you have finished parsing your paths * Call this function once you have finished parsing your paths with the
* with the stroker. It returns the number of points and * stroker. It returns the number of points and contours necessary to
* contours necessary to export one of the `border' or `stroke' * export one of the 'border' or 'stroke' outlines generated by the
* outlines generated by the stroker. * stroker.
* *
* @input: * @input:
* stroker :: * stroker ::
@ -557,15 +550,15 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* When an outline, or a sub-path, is `closed', the stroker generates * When an outline, or a sub-path, is 'closed', the stroker generates two
* two independent `border' outlines, named `left' and `right'. * independent 'border' outlines, named 'left' and 'right'.
* *
* When the outline, or a sub-path, is `opened', the stroker merges * When the outline, or a sub-path, is 'opened', the stroker merges the
* the `border' outlines with caps. The `left' border receives all * 'border' outlines with caps. The 'left' border receives all points,
* points, while the `right' border becomes empty. * while the 'right' border becomes empty.
* *
* Use the function @FT_Stroker_GetCounts instead if you want to * Use the function @FT_Stroker_GetCounts instead if you want to retrieve
* retrieve the counts associated to both borders. * the counts associated to both borders.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Stroker_GetBorderCounts( FT_Stroker stroker, FT_Stroker_GetBorderCounts( FT_Stroker stroker,
@ -580,13 +573,11 @@ FT_BEGIN_HEADER
* FT_Stroker_ExportBorder * FT_Stroker_ExportBorder
* *
* @description: * @description:
* Call this function after @FT_Stroker_GetBorderCounts to * Call this function after @FT_Stroker_GetBorderCounts to export the
* export the corresponding border to your own @FT_Outline * corresponding border to your own @FT_Outline structure.
* structure.
* *
* Note that this function appends the border points and * Note that this function appends the border points and contours to your
* contours to your outline, but does not try to resize its * outline, but does not try to resize its arrays.
* arrays.
* *
* @input: * @input:
* stroker :: * stroker ::
@ -599,19 +590,19 @@ FT_BEGIN_HEADER
* The target outline handle. * The target outline handle.
* *
* @note: * @note:
* Always call this function after @FT_Stroker_GetBorderCounts to * Always call this function after @FT_Stroker_GetBorderCounts to get
* get sure that there is enough room in your @FT_Outline object to * sure that there is enough room in your @FT_Outline object to receive
* receive all new data. * all new data.
* *
* When an outline, or a sub-path, is `closed', the stroker generates * When an outline, or a sub-path, is 'closed', the stroker generates two
* two independent `border' outlines, named `left' and `right'. * independent 'border' outlines, named 'left' and 'right'.
* *
* When the outline, or a sub-path, is `opened', the stroker merges * When the outline, or a sub-path, is 'opened', the stroker merges the
* the `border' outlines with caps. The `left' border receives all * 'border' outlines with caps. The 'left' border receives all points,
* points, while the `right' border becomes empty. * while the 'right' border becomes empty.
* *
* Use the function @FT_Stroker_Export instead if you want to * Use the function @FT_Stroker_Export instead if you want to retrieve
* retrieve all borders at once. * all borders at once.
*/ */
FT_EXPORT( void ) FT_EXPORT( void )
FT_Stroker_ExportBorder( FT_Stroker stroker, FT_Stroker_ExportBorder( FT_Stroker stroker,
@ -625,10 +616,9 @@ FT_BEGIN_HEADER
* FT_Stroker_GetCounts * FT_Stroker_GetCounts
* *
* @description: * @description:
* Call this function once you have finished parsing your paths * Call this function once you have finished parsing your paths with the
* with the stroker. It returns the number of points and * stroker. It returns the number of points and contours necessary to
* contours necessary to export all points/borders from the stroked * export all points/borders from the stroked outline/path.
* outline/path.
* *
* @input: * @input:
* stroker :: * stroker ::
@ -656,12 +646,11 @@ FT_BEGIN_HEADER
* FT_Stroker_Export * FT_Stroker_Export
* *
* @description: * @description:
* Call this function after @FT_Stroker_GetBorderCounts to * Call this function after @FT_Stroker_GetBorderCounts to export all
* export all borders to your own @FT_Outline structure. * borders to your own @FT_Outline structure.
* *
* Note that this function appends the border points and * Note that this function appends the border points and contours to your
* contours to your outline, but does not try to resize its * outline, but does not try to resize its arrays.
* arrays.
* *
* @input: * @input:
* stroker :: * stroker ::
@ -708,8 +697,7 @@ FT_BEGIN_HEADER
* A stroker handle. * A stroker handle.
* *
* destroy :: * destroy ::
* A Boolean. If~1, the source glyph object is destroyed * A Boolean. If~1, the source glyph object is destroyed on success.
* on success.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -719,8 +707,8 @@ FT_BEGIN_HEADER
* *
* Adding stroke may yield a significantly wider and taller glyph * Adding stroke may yield a significantly wider and taller glyph
* depending on how large of a radius was used to stroke the glyph. You * depending on how large of a radius was used to stroke the glyph. You
* may need to manually adjust horizontal and vertical advance amounts * may need to manually adjust horizontal and vertical advance amounts to
* to account for this added size. * account for this added size.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Glyph_Stroke( FT_Glyph *pglyph, FT_Glyph_Stroke( FT_Glyph *pglyph,
@ -734,8 +722,8 @@ FT_BEGIN_HEADER
* FT_Glyph_StrokeBorder * FT_Glyph_StrokeBorder
* *
* @description: * @description:
* Stroke a given outline glyph object with a given stroker, but * Stroke a given outline glyph object with a given stroker, but only
* only return either its inside or outside border. * return either its inside or outside border.
* *
* @inout: * @inout:
* pglyph :: * pglyph ::
@ -746,12 +734,11 @@ FT_BEGIN_HEADER
* A stroker handle. * A stroker handle.
* *
* inside :: * inside ::
* A Boolean. If~1, return the inside border, otherwise * A Boolean. If~1, return the inside border, otherwise the outside
* the outside border. * border.
* *
* destroy :: * destroy ::
* A Boolean. If~1, the source glyph object is destroyed * A Boolean. If~1, the source glyph object is destroyed on success.
* on success.
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -761,8 +748,8 @@ FT_BEGIN_HEADER
* *
* Adding stroke may yield a significantly wider and taller glyph * Adding stroke may yield a significantly wider and taller glyph
* depending on how large of a radius was used to stroke the glyph. You * depending on how large of a radius was used to stroke the glyph. You
* may need to manually adjust horizontal and vertical advance amounts * may need to manually adjust horizontal and vertical advance amounts to
* to account for this added size. * account for this added size.
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Glyph_StrokeBorder( FT_Glyph *pglyph, FT_Glyph_StrokeBorder( FT_Glyph *pglyph,

View File

@ -38,10 +38,9 @@ FT_BEGIN_HEADER
* How FreeType manages memory and i/o. * How FreeType manages memory and i/o.
* *
* @description: * @description:
* This section contains various definitions related to memory * This section contains various definitions related to memory management
* management and i/o access. You need to understand this * and i/o access. You need to understand this information if you want to
* information if you want to use a custom memory manager or you own * use a custom memory manager or you own i/o streams.
* i/o streams.
* *
*/ */
@ -72,7 +71,7 @@ FT_BEGIN_HEADER
* FT_Alloc_Func * FT_Alloc_Func
* *
* @description: * @description:
* A function used to allocate `size' bytes from `memory'. * A function used to allocate 'size' bytes from 'memory'.
* *
* @input: * @input:
* memory :: * memory ::
@ -193,8 +192,8 @@ FT_BEGIN_HEADER
* A handle to an input stream. * A handle to an input stream.
* *
* @also: * @also:
* See @FT_StreamRec for the publicly accessible fields of a given * See @FT_StreamRec for the publicly accessible fields of a given stream
* stream object. * object.
* *
*/ */
typedef struct FT_StreamRec_* FT_Stream; typedef struct FT_StreamRec_* FT_Stream;
@ -207,7 +206,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A union type used to store either a long or a pointer. This is used * 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. * to store a file descriptor or a 'FILE*' in an input stream.
* *
*/ */
typedef union FT_StreamDesc_ typedef union FT_StreamDesc_
@ -243,9 +242,8 @@ FT_BEGIN_HEADER
* The number of bytes effectively read by the stream. * The number of bytes effectively read by the stream.
* *
* @note: * @note:
* This function might be called to perform a seek or skip operation * This function might be called to perform a seek or skip operation with
* with a `count' of~0. A non-zero return value then indicates an * a 'count' of~0. A non-zero return value then indicates an error.
* error.
* *
*/ */
typedef unsigned long typedef unsigned long
@ -299,7 +297,7 @@ FT_BEGIN_HEADER
* *
* descriptor :: * descriptor ::
* This field is a union that can hold an integer or a pointer. It is * 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*' * used by stream implementations to store file descriptors or 'FILE*'
* pointers. * pointers.
* *
* pathname :: * pathname ::
@ -314,14 +312,13 @@ FT_BEGIN_HEADER
* The stream's close function. * The stream's close function.
* *
* memory :: * memory ::
* The memory manager to use to preload frames. This is set * The memory manager to use to preload frames. This is set internally
* internally by FreeType and shouldn't be touched by stream * by FreeType and shouldn't be touched by stream implementations.
* implementations.
* *
* cursor :: * cursor ::
* This field is set and used internally by FreeType when parsing * This field is set and used internally by FreeType when parsing
* frames. In particular, the `FT_GET_XXX' macros use this instead * frames. In particular, the `FT_GET_XXX` macros use this instead of
* of the `pos' field. * the 'pos' field.
* *
* limit :: * limit ::
* This field is set and used internally by FreeType when parsing * This field is set and used internally by FreeType when parsing

View File

@ -174,8 +174,8 @@ FT_BEGIN_HEADER
* FT_Atan2 * FT_Atan2
* *
* @description: * @description:
* Return the arc-tangent corresponding to a given vector (x,y) in * Return the arc-tangent corresponding to a given vector (x,y) in the 2d
* the 2d plane. * plane.
* *
* @input: * @input:
* x :: * x ::
@ -210,7 +210,7 @@ FT_BEGIN_HEADER
* Second angle. * Second angle.
* *
* @return: * @return:
* Constrained value of `value2-value1'. * Constrained value of 'value2-value1'.
* *
*/ */
FT_EXPORT( FT_Angle ) FT_EXPORT( FT_Angle )
@ -225,8 +225,8 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Return the unit vector corresponding to a given angle. After the * Return the unit vector corresponding to a given angle. After the
* call, the value of `vec.x' will be `cos(angle)', and the value of * call, the value of `vec.x` will be 'cos(angle)', and the value of
* `vec.y' will be `sin(angle)'. * `vec.y` will be 'sin(angle)'.
* *
* This function is useful to retrieve both the sinus and cosinus of a * This function is useful to retrieve both the sinus and cosinus of a
* given angle quickly. * given angle quickly.

View File

@ -126,8 +126,8 @@ FT_BEGIN_HEADER
* FT_UFWord * FT_UFWord
* *
* @description: * @description:
* An unsigned 16-bit integer used to store a distance in original * An unsigned 16-bit integer used to store a distance in original font
* font units. * units.
*/ */
typedef unsigned short FT_UFWord; /* unsigned distance */ typedef unsigned short FT_UFWord; /* unsigned distance */
@ -270,8 +270,7 @@ FT_BEGIN_HEADER
* FT_F26Dot6 * FT_F26Dot6
* *
* @description: * @description:
* A signed 26.6 fixed-point type used for vectorial pixel * A signed 26.6 fixed-point type used for vectorial pixel coordinates.
* coordinates.
*/ */
typedef signed long FT_F26Dot6; typedef signed long FT_F26Dot6;
@ -294,8 +293,8 @@ FT_BEGIN_HEADER
* FT_Error * FT_Error
* *
* @description: * @description:
* The FreeType error code type. A value of~0 is always interpreted * The FreeType error code type. A value of~0 is always interpreted as a
* as a successful operation. * successful operation.
*/ */
typedef int FT_Error; typedef int FT_Error;
@ -317,9 +316,9 @@ FT_BEGIN_HEADER
* FT_Offset * FT_Offset
* *
* @description: * @description:
* This is equivalent to the ANSI~C `size_t' type, i.e., the largest * This is equivalent to the ANSI~C `size_t` type, i.e., the largest
* _unsigned_ integer type used to express a file size or position, * _unsigned_ integer type used to express a file size or position, or a
* or a memory block size. * memory block size.
*/ */
typedef size_t FT_Offset; typedef size_t FT_Offset;
@ -330,9 +329,9 @@ FT_BEGIN_HEADER
* FT_PtrDist * FT_PtrDist
* *
* @description: * @description:
* This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the * This is equivalent to the ANSI~C `ptrdiff_t` type, i.e., the largest
* largest _signed_ integer type used to express the distance * _signed_ integer type used to express the distance between two
* between two pointers. * pointers.
*/ */
typedef ft_ptrdiff_t FT_PtrDist; typedef ft_ptrdiff_t FT_PtrDist;
@ -367,13 +366,13 @@ FT_BEGIN_HEADER
* FT_Matrix * FT_Matrix
* *
* @description: * @description:
* A simple structure used to store a 2x2 matrix. Coefficients are * A simple structure used to store a 2x2 matrix. Coefficients are in
* in 16.16 fixed-point format. The computation performed is: * 16.16 fixed-point format. The computation performed is:
* *
* { * ```
* x' = x*xx + y*xy * x' = x*xx + y*xy
* y' = x*yx + y*yy * y' = x*yx + y*yy
* } * ```
* *
* @fields: * @fields:
* xx :: * xx ::
@ -425,13 +424,13 @@ FT_BEGIN_HEADER
* FT_Generic_Finalizer * FT_Generic_Finalizer
* *
* @description: * @description:
* Describe a function used to destroy the `client' data of any * Describe a function used to destroy the 'client' data of any FreeType
* FreeType object. See the description of the @FT_Generic type for * object. See the description of the @FT_Generic type for details of
* details of usage. * usage.
* *
* @input: * @input:
* The address of the FreeType object that is under finalization. * The address of the FreeType object that is under finalization. Its
* Its client data is accessed through its `generic' field. * client data is accessed through its 'generic' field.
*/ */
typedef void (*FT_Generic_Finalizer)( void* object ); typedef void (*FT_Generic_Finalizer)( void* object );
@ -446,25 +445,24 @@ FT_BEGIN_HEADER
* variety of FreeType core objects. For example, a text layout API * variety of FreeType core objects. For example, a text layout API
* might want to associate a glyph cache to a given size object. * might want to associate a glyph cache to a given size object.
* *
* Some FreeType object contains a `generic' field, of type * Some FreeType object contains a 'generic' field, of type FT_Generic,
* FT_Generic, which usage is left to client applications and font * which usage is left to client applications and font servers.
* servers.
* *
* It can be used to store a pointer to client-specific data, as well * It can be used to store a pointer to client-specific data, as well as
* as the address of a `finalizer' function, which will be called by * the address of a 'finalizer' function, which will be called by
* FreeType when the object is destroyed (for example, the previous * FreeType when the object is destroyed (for example, the previous
* client example would put the address of the glyph cache destructor * client example would put the address of the glyph cache destructor in
* in the `finalizer' field). * the 'finalizer' field).
* *
* @fields: * @fields:
* data :: * data ::
* A typeless pointer to any client-specified data. This * A typeless pointer to any client-specified data. This field is
* field is completely ignored by the FreeType library. * completely ignored by the FreeType library.
* *
* finalizer :: * finalizer ::
* A pointer to a `generic finalizer' function, which * A pointer to a 'generic finalizer' function, which will be called
* will be called when the object is destroyed. If this * when the object is destroyed. If this field is set to NULL, no code
* field is set to NULL, no code will be called. * will be called.
*/ */
typedef struct FT_Generic_ typedef struct FT_Generic_
{ {
@ -480,12 +478,12 @@ FT_BEGIN_HEADER
* FT_MAKE_TAG * FT_MAKE_TAG
* *
* @description: * @description:
* This macro converts four-letter tags that are used to label * This macro converts four-letter tags that are used to label TrueType
* TrueType tables into an unsigned long, to be used within FreeType. * tables into an unsigned long, to be used within FreeType.
* *
* @note: * @note:
* The produced values *must* be 32-bit integers. Don't redefine * The produced values **must** be 32-bit integers. Don't redefine this
* this macro. * macro.
*/ */
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \ #define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
(FT_Tag) \ (FT_Tag) \
@ -518,9 +516,9 @@ FT_BEGIN_HEADER
* FT_ListNode * FT_ListNode
* *
* @description: * @description:
* Many elements and objects in FreeType are listed through an * Many elements and objects in FreeType are listed through an @FT_List
* @FT_List record (see @FT_ListRec). As its name suggests, an * record (see @FT_ListRec). As its name suggests, an FT_ListNode is a
* FT_ListNode is a handle to a single list element. * handle to a single list element.
*/ */
typedef struct FT_ListNodeRec_* FT_ListNode; typedef struct FT_ListNodeRec_* FT_ListNode;
@ -569,8 +567,8 @@ FT_BEGIN_HEADER
* FT_ListRec * FT_ListRec
* *
* @description: * @description:
* A structure used to hold a simple doubly-linked list. These are * A structure used to hold a simple doubly-linked list. These are used
* used in many parts of FreeType. * in many parts of FreeType.
* *
* @fields: * @fields:
* head :: * head ::

View File

@ -56,20 +56,19 @@ FT_BEGIN_HEADER
* FT_WinFNT_ID_XXX * FT_WinFNT_ID_XXX
* *
* @description: * @description:
* A list of valid values for the `charset' byte in * A list of valid values for the 'charset' byte in @FT_WinFNT_HeaderRec.
* @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX * Exact mapping tables for the various cpXXXX encodings (except for
* encodings (except for cp1361) can be found at * cp1361) can be found at ftp://ftp.unicode.org/Public in the
* ftp://ftp.unicode.org/Public in the MAPPINGS/VENDORS/MICSFT/WINDOWS * MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is roughly a
* subdirectory. cp1361 is roughly a superset of * superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
* MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
* *
* @values: * @values:
* FT_WinFNT_ID_DEFAULT :: * FT_WinFNT_ID_DEFAULT ::
* This is used for font enumeration and font creation as a * This is used for font enumeration and font creation as a 'don't
* `don't care' value. Valid font files don't contain this value. * care' value. Valid font files don't contain this value. When
* When querying for information about the character set of the font * querying for information about the character set of the font that is
* that is currently selected into a specified device context, this * currently selected into a specified device context, this return
* return value (of the related Windows API) simply denotes failure. * value (of the related Windows API) simply denotes failure.
* *
* FT_WinFNT_ID_SYMBOL :: * FT_WinFNT_ID_SYMBOL ::
* There is no known mapping table available. * There is no known mapping table available.
@ -80,26 +79,27 @@ FT_BEGIN_HEADER
* FT_WinFNT_ID_OEM :: * FT_WinFNT_ID_OEM ::
* From Michael Poettgen <michael@poettgen.de>: * From Michael Poettgen <michael@poettgen.de>:
* *
* The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM * The 'Windows Font Mapping' article says that FT_WinFNT_ID_OEM is
* is used for the charset of vector fonts, like `modern.fon', * used for the charset of vector fonts, like `modern.fon`,
* `roman.fon', and `script.fon' on Windows. * `roman.fon`, and `script.fon` on Windows.
* *
* The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value * The 'CreateFont' documentation says: The FT_WinFNT_ID_OEM value
* specifies a character set that is operating-system dependent. * specifies a character set that is operating-system dependent.
* *
* The `IFIMETRICS' documentation from the `Windows Driver * The 'IFIMETRICS' documentation from the 'Windows Driver Development
* Development Kit' says: This font supports an OEM-specific * Kit' says: This font supports an OEM-specific character set. The
* character set. The OEM character set is system dependent. * OEM character set is system dependent.
* *
* In general OEM, as opposed to ANSI (i.e., cp1252), denotes the * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the
* second default codepage that most international versions of * second default codepage that most international versions of Windows
* Windows have. It is one of the OEM codepages from * have. It is one of the OEM codepages from
* *
* https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers , * https://docs.microsoft.com/en-us/windows/desktop/intl/code-page-identifiers
* ,
* *
* and is used for the `DOS boxes', to support legacy applications. * and is used for the 'DOS boxes', to support legacy applications. A
* A German Windows version for example usually uses ANSI codepage * German Windows version for example usually uses ANSI codepage 1252
* 1252 and OEM codepage 850. * and OEM codepage 850.
* *
* FT_WinFNT_ID_CP874 :: * FT_WinFNT_ID_CP874 ::
* A superset of Thai TIS 620 and ISO 8859-11. * A superset of Thai TIS 620 and ISO 8859-11.
@ -112,8 +112,8 @@ FT_BEGIN_HEADER
* ordering and minor deviations). * ordering and minor deviations).
* *
* FT_WinFNT_ID_CP949 :: * FT_WinFNT_ID_CP949 ::
* A superset of Korean Hangul KS~C 5601-1987 (with different * A superset of Korean Hangul KS~C 5601-1987 (with different ordering
* ordering and minor deviations). * and minor deviations).
* *
* FT_WinFNT_ID_CP950 :: * FT_WinFNT_ID_CP950 ::
* A superset of traditional Chinese Big~5 ETen (with different * A superset of traditional Chinese Big~5 ETen (with different

View File

@ -2,7 +2,7 @@
* *
* autohint.h * autohint.h
* *
* High-level `autohint' module-specific interface (specification). * High-level 'autohint' module-specific interface (specification).
* *
* Copyright 1996-2018 by * Copyright 1996-2018 by
* David Turner, Robert Wilhelm, and Werner Lemberg. * David Turner, Robert Wilhelm, and Werner Lemberg.
@ -30,31 +30,31 @@
/************************************************************************** /**************************************************************************
* *
* A small technical note regarding automatic hinting in order to * A small technical note regarding automatic hinting in order to clarify
* clarify this module interface. * this module interface.
* *
* An automatic hinter might compute two kinds of data for a given face: * An automatic hinter might compute two kinds of data for a given face:
* *
* - global hints: Usually some metrics that describe global properties * - global hints: Usually some metrics that describe global properties
* of the face. It is computed by scanning more or less * of the face. It is computed by scanning more or less
* aggressively the glyphs in the face, and thus can be * aggressively the glyphs in the face, and thus can be
* very slow to compute (even if the size of global * very slow to compute (even if the size of global hints
* hints is really small). * is really small).
* *
* - glyph hints: These describe some important features of the glyph * - glyph hints: These describe some important features of the glyph
* outline, as well as how to align them. They are * outline, as well as how to align them. They are
* generally much faster to compute than global hints. * generally much faster to compute than global hints.
* *
* The current FreeType auto-hinter does a pretty good job while * The current FreeType auto-hinter does a pretty good job while performing
* performing fast computations for both global and glyph hints. * fast computations for both global and glyph hints. However, we might be
* However, we might be interested in introducing more complex and * interested in introducing more complex and powerful algorithms in the
* powerful algorithms in the future, like the one described in the John * future, like the one described in the John D. Hobby paper, which
* D. Hobby paper, which unfortunately requires a lot more horsepower. * unfortunately requires a lot more horsepower.
* *
* Because a sufficiently sophisticated font management system would * Because a sufficiently sophisticated font management system would
* typically implement an LRU cache of opened face objects to reduce * typically implement an LRU cache of opened face objects to reduce memory
* memory usage, it is a good idea to be able to avoid recomputing * usage, it is a good idea to be able to avoid recomputing global hints
* global hints every time the same face is re-opened. * every time the same face is re-opened.
* *
* We thus provide the ability to cache global hints outside of the face * We thus provide the ability to cache global hints outside of the face
* object, in order to speed up font re-opening time. Of course, this * object, in order to speed up font re-opening time. Of course, this
@ -62,10 +62,10 @@
* it. * it.
* *
* I initially thought that it would be a good idea to cache the glyph * I initially thought that it would be a good idea to cache the glyph
* hints too. However, my general idea now is that if you really need * hints too. However, my general idea now is that if you really need to
* to cache these too, you are simply in need of a new font format, * cache these too, you are simply in need of a new font format, where all
* where all this information could be stored within the font file and * this information could be stored within the font file and decoded on the
* decoded on the fly. * fly.
* *
*/ */
@ -87,8 +87,8 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Retrieve the global hints computed for a given face object. The * Retrieve the global hints computed for a given face object. The
* resulting data is dissociated from the face and will survive a * resulting data is dissociated from the face and will survive a call to
* call to FT_Done_Face(). It must be discarded through the API * FT_Done_Face(). It must be discarded through the API
* FT_AutoHinter_GlobalDoneFunc(). * FT_AutoHinter_GlobalDoneFunc().
* *
* @input: * @input:
@ -119,8 +119,8 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Discard the global hints retrieved through * Discard the global hints retrieved through
* FT_AutoHinter_GlobalGetFunc(). This is the only way these hints * FT_AutoHinter_GlobalGetFunc(). This is the only way these hints are
* are freed from memory. * freed from memory.
* *
* @input: * @input:
* hinter :: * hinter ::
@ -140,9 +140,9 @@ FT_BEGIN_HEADER
* FT_AutoHinter_GlobalResetFunc * FT_AutoHinter_GlobalResetFunc
* *
* @description: * @description:
* This function is used to recompute the global metrics in a given * This function is used to recompute the global metrics in a given font.
* font. This is useful when global font data changes (e.g. Multiple * This is useful when global font data changes (e.g. Multiple Masters
* Masters fonts where blend coordinates change). * fonts where blend coordinates change).
* *
* @input: * @input:
* hinter :: * hinter ::
@ -162,8 +162,8 @@ FT_BEGIN_HEADER
* FT_AutoHinter_GlyphLoadFunc * FT_AutoHinter_GlyphLoadFunc
* *
* @description: * @description:
* This function is used to load, scale, and automatically hint a * This function is used to load, scale, and automatically hint a glyph
* glyph from a given face. * from a given face.
* *
* @input: * @input:
* face :: * face ::
@ -176,8 +176,8 @@ FT_BEGIN_HEADER
* The load flags. * The load flags.
* *
* @note: * @note:
* This function is capable of loading composite glyphs by hinting * This function is capable of loading composite glyphs by hinting each
* each sub-glyph independently (which improves quality). * sub-glyph independently (which improves quality).
* *
* It will call the font driver with @FT_Load_Glyph, with * It will call the font driver with @FT_Load_Glyph, with
* @FT_LOAD_NO_SCALE set. * @FT_LOAD_NO_SCALE set.

View File

@ -76,7 +76,7 @@ FT_BEGIN_HEADER
* CFF_Internal * CFF_Internal
* *
* @description: * @description:
* The interface to the `internal' field of `FT_Size'. * The interface to the 'internal' field of `FT_Size`.
*/ */
typedef struct CFF_InternalRec_ typedef struct CFF_InternalRec_
{ {

View File

@ -46,8 +46,7 @@ FT_BEGIN_HEADER
* The source input stream. * The source input stream.
* *
* start :: * start ::
* The position of the first index byte in the * The position of the first index byte in the input stream.
* input stream.
* *
* count :: * count ::
* The number of elements in the index. * The number of elements in the index.
@ -56,15 +55,13 @@ FT_BEGIN_HEADER
* The size in bytes of object offsets in index. * The size in bytes of object offsets in index.
* *
* data_offset :: * data_offset ::
* The position of first data byte in the index's * The position of first data byte in the index's bytes.
* bytes.
* *
* data_size :: * data_size ::
* The size of the data table in this index. * The size of the data table in this index.
* *
* offsets :: * offsets ::
* A table of element offsets in the index. Must be * A table of element offsets in the index. Must be loaded explicitly.
* loaded explicitly.
* *
* bytes :: * bytes ::
* If the index is loaded in memory, its bytes. * If the index is loaded in memory, its bytes.

View File

@ -252,7 +252,7 @@ FT_BEGIN_HEADER
* FT_MulDiv_No_Round * FT_MulDiv_No_Round
* *
* @description: * @description:
* A very simple function used to perform the computation `(a*b)/c' * A very simple function used to perform the computation '(a*b)/c'
* (without rounding) with maximum accuracy (it uses a 64-bit * (without rounding) with maximum accuracy (it uses a 64-bit
* intermediate integer whenever necessary). * intermediate integer whenever necessary).
* *
@ -268,9 +268,9 @@ FT_BEGIN_HEADER
* The divisor. * The divisor.
* *
* @return: * @return:
* The result of `(a*b)/c'. This function never traps when trying to * The result of '(a*b)/c'. This function never traps when trying to
* divide by zero; it simply returns `MaxInt' or `MinInt' depending * divide by zero; it simply returns 'MaxInt' or 'MinInt' depending on
* on the signs of `a' and `b'. * the signs of 'a' and 'b'.
*/ */
FT_BASE( FT_Long ) FT_BASE( FT_Long )
FT_MulDiv_No_Round( FT_Long a, FT_MulDiv_No_Round( FT_Long a,
@ -279,12 +279,11 @@ FT_BEGIN_HEADER
/* /*
* A variant of FT_Matrix_Multiply which scales its result afterwards. * A variant of FT_Matrix_Multiply which scales its result afterwards. The
* The idea is that both `a' and `b' are scaled by factors of 10 so that * idea is that both `a' and `b' are scaled by factors of 10 so that the
* the values are as precise as possible to get a correct result during * values are as precise as possible to get a correct result during the
* the 64bit multiplication. Let `sa' and `sb' be the scaling factors of * 64bit multiplication. Let `sa' and `sb' be the scaling factors of `a'
* `a' and `b', respectively, then the scaling factor of the result is * and `b', respectively, then the scaling factor of the result is `sa*sb'.
* `sa*sb'.
*/ */
FT_BASE( void ) FT_BASE( void )
FT_Matrix_Multiply_Scaled( const FT_Matrix* a, FT_Matrix_Multiply_Scaled( const FT_Matrix* a,
@ -318,22 +317,22 @@ FT_BEGIN_HEADER
/* /*
* This function normalizes a vector and returns its original length. * This function normalizes a vector and returns its original length. The
* The normalized vector is a 16.16 fixed-point unit vector with length * normalized vector is a 16.16 fixed-point unit vector with length close
* close to 0x10000. The accuracy of the returned length is limited to * to 0x10000. The accuracy of the returned length is limited to 16 bits
* 16 bits also. The function utilizes quick inverse square root * also. The function utilizes quick inverse square root approximation
* approximation without divisions and square roots relying on Newton's * without divisions and square roots relying on Newton's iterations
* iterations instead. * instead.
*/ */
FT_BASE( FT_UInt32 ) FT_BASE( FT_UInt32 )
FT_Vector_NormLen( FT_Vector* vector ); FT_Vector_NormLen( FT_Vector* vector );
/* /*
* Return -1, 0, or +1, depending on the orientation of a given corner. * Return -1, 0, or +1, depending on the orientation of a given corner. We
* We use the Cartesian coordinate system, with positive vertical values * use the Cartesian coordinate system, with positive vertical values going
* going upwards. The function returns +1 if the corner turns to the * upwards. The function returns +1 if the corner turns to the left, -1 to
* left, -1 to the right, and 0 for undecidable cases. * the right, and 0 for undecidable cases.
*/ */
FT_BASE( FT_Int ) FT_BASE( FT_Int )
ft_corner_orientation( FT_Pos in_x, ft_corner_orientation( FT_Pos in_x,
@ -433,7 +432,7 @@ FT_BEGIN_HEADER
* The value to compute the root for. * The value to compute the root for.
* *
* @return: * @return:
* The result of `sqrt(x)'. * The result of 'sqrt(x)'.
* *
* @note: * @note:
* This function is not very fast. * This function is not very fast.

View File

@ -15,7 +15,7 @@
* *
* *
* IMPORTANT: A description of FreeType's debugging support can be * IMPORTANT: A description of FreeType's debugging support can be
* found in `docs/DEBUG.TXT'. Read it if you need to use or * found in 'docs/DEBUG.TXT'. Read it if you need to use or
* understand this code. * understand this code.
* *
*/ */
@ -44,8 +44,8 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Define the trace enums as well as the trace levels array when they * Define the trace enums as well as the trace levels array when they are
* are needed. * needed.
* *
*/ */
@ -115,8 +115,8 @@ FT_BEGIN_HEADER
* FT_DEBUG_LEVEL_TRACE definition. * FT_DEBUG_LEVEL_TRACE definition.
* *
* @note: * @note:
* This function may be useful if you want to access elements of * This function may be useful if you want to access elements of the
* the internal trace levels array by an index. * internal trace levels array by an index.
*/ */
FT_BASE( FT_Int ) FT_BASE( FT_Int )
FT_Trace_Get_Count( void ); FT_Trace_Get_Count( void );
@ -213,8 +213,8 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Define the FT_ASSERT and FT_THROW macros. The call to `FT_Throw' * Define the FT_ASSERT and FT_THROW macros. The call to `FT_Throw` makes
* makes it possible to easily set a breakpoint at this function. * it possible to easily set a breakpoint at this function.
* *
*/ */
@ -245,7 +245,7 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Define `FT_Message' and `FT_Panic' when needed. * Define `FT_Message` and `FT_Panic` when needed.
* *
*/ */

View File

@ -129,46 +129,37 @@ FT_BEGIN_HEADER
* *
* *
* load_glyph :: * load_glyph ::
* A function handle to load a glyph to a slot. * A function handle to load a glyph to a slot. This field is
* This field is mandatory! * mandatory!
* *
* get_kerning :: * get_kerning ::
* A function handle to return the unscaled * A function handle to return the unscaled kerning for a given pair of
* kerning for a given pair of glyphs. Can be * glyphs. Can be set to 0 if the format doesn't support kerning.
* set to 0 if the format doesn't support
* kerning.
* *
* attach_file :: * attach_file ::
* This function handle is used to read * This function handle is used to read additional data for a face from
* additional data for a face from another * another file/stream. For example, this can be used to add data from
* file/stream. For example, this can be used to * AFM or PFM files on a Type 1 face, or a CIDMap on a CID-keyed face.
* add data from AFM or PFM files on a Type 1
* face, or a CIDMap on a CID-keyed face.
* *
* get_advances :: * get_advances ::
* A function handle used to return advance * A function handle used to return advance widths of 'count' glyphs
* widths of `count' glyphs (in font units), * (in font units), starting at 'first'. The 'vertical' flag must be
* starting at `first'. The `vertical' flag must * set to get vertical advance heights. The 'advances' buffer is
* be set to get vertical advance heights. The * caller-allocated. The idea of this function is to be able to
* `advances' buffer is caller-allocated. * perform device-independent text layout without loading a single
* The idea of this function is to be able to * glyph image.
* perform device-independent text layout without
* loading a single glyph image.
* *
* request_size :: * request_size ::
* A handle to a function used to request the new * A handle to a function used to request the new character size. Can
* character size. Can be set to 0 if the * be set to 0 if the scaling done in the base layer suffices.
* scaling done in the base layer suffices.
* *
* select_size :: * select_size ::
* A handle to a function used to select a new * A handle to a function used to select a new fixed size. It is used
* fixed size. It is used only if * only if @FT_FACE_FLAG_FIXED_SIZES is set. Can be set to 0 if the
* @FT_FACE_FLAG_FIXED_SIZES is set. Can be set * scaling done in the base layer suffices.
* to 0 if the scaling done in the base layer
* suffices.
* @note: * @note:
* Most function pointers, with the exception of `load_glyph', can be * Most function pointers, with the exception of `load_glyph`, can be set
* set to 0 to indicate a default behaviour. * to 0 to indicate a default behaviour.
*/ */
typedef struct FT_Driver_ClassRec_ typedef struct FT_Driver_ClassRec_
{ {
@ -206,8 +197,8 @@ FT_BEGIN_HEADER
* FT_DECLARE_DRIVER * FT_DECLARE_DRIVER
* *
* @description: * @description:
* Used to create a forward declaration of an FT_Driver_ClassRec * Used to create a forward declaration of an FT_Driver_ClassRec struct
* struct instance. * instance.
* *
* @macro: * @macro:
* FT_DEFINE_DRIVER * FT_DEFINE_DRIVER
@ -215,12 +206,12 @@ FT_BEGIN_HEADER
* @description: * @description:
* Used to initialize an instance of FT_Driver_ClassRec struct. * Used to initialize an instance of FT_Driver_ClassRec struct.
* *
* `ftinit.c' (ft_create_default_module_classes) already contains a * `ftinit.c` (ft_create_default_module_classes) already contains a
* mechanism to call these functions for the default modules * mechanism to call these functions for the default modules described in
* described in `ftmodule.h'. * `ftmodule.h`.
* *
* The struct will be allocated in the global scope (or the scope * The struct will be allocated in the global scope (or the scope where
* where the macro is used). * the macro is used).
*/ */
#define FT_DECLARE_DRIVER( class_ ) \ #define FT_DECLARE_DRIVER( class_ ) \
FT_CALLBACK_TABLE \ FT_CALLBACK_TABLE \

View File

@ -34,7 +34,7 @@ FT_BEGIN_HEADER
* FT_SET_ERROR * FT_SET_ERROR
* *
* @description: * @description:
* This macro is used to set an implicit `error' variable to a given * This macro is used to set an implicit 'error' variable to a given
* expression's value (usually a function call), and convert it to a * expression's value (usually a function call), and convert it to a
* boolean which is set whenever the value is != 0. * boolean which is set whenever the value is != 0.
*/ */
@ -59,8 +59,8 @@ FT_BEGIN_HEADER
/* /*
* C++ refuses to handle statements like p = (void*)anything, with `p' a * C++ refuses to handle statements like p = (void*)anything, with `p' a
* typed pointer. Since we don't have a `typeof' operator in standard * typed pointer. Since we don't have a `typeof' operator in standard C++,
* C++, we have to use a template to emulate it. * we have to use a template to emulate it.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
@ -107,8 +107,8 @@ extern "C++"
/* /*
* The allocation functions return a pointer, and the error code * The allocation functions return a pointer, and the error code is written
* is written to through the `p_error' parameter. * to through the `p_error' parameter.
*/ */
/* The `q' variants of the functions below (`q' for `quick') don't fill */ /* The `q' variants of the functions below (`q' for `quick') don't fill */
@ -253,9 +253,8 @@ extern "C++"
/* /*
* Return the maximum number of addressable elements in an array. * Return the maximum number of addressable elements in an array. We limit
* We limit ourselves to INT_MAX, rather than UINT_MAX, to avoid * ourselves to INT_MAX, rather than UINT_MAX, to avoid any problems.
* any problems.
*/ */
#define FT_ARRAY_MAX( ptr ) ( FT_INT_MAX / sizeof ( *(ptr) ) ) #define FT_ARRAY_MAX( ptr ) ( FT_INT_MAX / sizeof ( *(ptr) ) )

View File

@ -73,9 +73,9 @@ FT_BEGIN_HEADER
#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) ) #define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) )
/* /*
* Approximate sqrt(x*x+y*y) using the `alpha max plus beta min' * Approximate sqrt(x*x+y*y) using the `alpha max plus beta min' algorithm.
* algorithm. We use alpha = 1, beta = 3/8, giving us results with a * We use alpha = 1, beta = 3/8, giving us results with a largest error
* largest error less than 7% compared to the exact value. * less than 7% compared to the exact value.
*/ */
#define FT_HYPOT( x, y ) \ #define FT_HYPOT( x, y ) \
( x = FT_ABS( x ), \ ( x = FT_ABS( x ), \
@ -110,9 +110,8 @@ FT_BEGIN_HEADER
/* /*
* character classification functions -- since these are used to parse * character classification functions -- since these are used to parse font
* font files, we must not use those in <ctypes.h> which are * files, we must not use those in <ctypes.h> which are locale-dependent
* locale-dependent
*/ */
#define ft_isdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U ) #define ft_isdigit( x ) ( ( (unsigned)(x) - '0' ) < 10U )
@ -297,67 +296,65 @@ FT_BEGIN_HEADER
* FT_Face_InternalRec * FT_Face_InternalRec
* *
* @description: * @description:
* This structure contains the internal fields of each FT_Face * This structure contains the internal fields of each FT_Face object.
* object. These fields may change between different releases of * These fields may change between different releases of FreeType.
* FreeType.
* *
* @fields: * @fields:
* max_points :: * max_points ::
* The maximum number of points used to store the vectorial outline * The maximum number of points used to store the vectorial outline of
* any glyph in this face. If this value cannot be known in advance,
* or if the face isn't scalable, this should be set to 0. Only
* relevant for scalable formats.
*
* max_contours ::
* The maximum number of contours used to store the vectorial outline
* of any glyph in this face. If this value cannot be known in * of any glyph in this face. If this value cannot be known in
* advance, or if the face isn't scalable, this should be set to 0. * advance, or if the face isn't scalable, this should be set to 0.
* Only relevant for scalable formats. * Only relevant for scalable formats.
* *
* max_contours ::
* The maximum number of contours used to store the vectorial
* outline of any glyph in this face. If this value cannot be
* known in advance, or if the face isn't scalable, this should be
* set to 0. Only relevant for scalable formats.
*
* transform_matrix :: * transform_matrix ::
* A 2x2 matrix of 16.16 coefficients used to transform glyph * A 2x2 matrix of 16.16 coefficients used to transform glyph outlines
* outlines after they are loaded from the font. Only used by the * after they are loaded from the font. Only used by the convenience
* convenience functions. * functions.
* *
* transform_delta :: * transform_delta ::
* A translation vector used to transform glyph outlines after they * A translation vector used to transform glyph outlines after they are
* are loaded from the font. Only used by the convenience * loaded from the font. Only used by the convenience functions.
* functions.
* *
* transform_flags :: * transform_flags ::
* Some flags used to classify the transform. Only used by the * Some flags used to classify the transform. Only used by the
* convenience functions. * convenience functions.
* *
* services :: * services ::
* A cache for frequently used services. It should be only * A cache for frequently used services. It should be only accessed
* accessed with the macro `FT_FACE_LOOKUP_SERVICE'. * with the macro `FT_FACE_LOOKUP_SERVICE`.
* *
* incremental_interface :: * incremental_interface ::
* If non-null, the interface through which glyph data and metrics * If non-null, the interface through which glyph data and metrics are
* are loaded incrementally for faces that do not provide all of * loaded incrementally for faces that do not provide all of this data
* this data when first opened. This field exists only if * when first opened. This field exists only if
* @FT_CONFIG_OPTION_INCREMENTAL is defined. * @FT_CONFIG_OPTION_INCREMENTAL is defined.
* *
* no_stem_darkening :: * no_stem_darkening ::
* Overrides the module-level default, see @stem-darkening[cff], * Overrides the module-level default, see @stem-darkening[cff], for
* for example. FALSE and TRUE toggle stem darkening on and off, * example. FALSE and TRUE toggle stem darkening on and off,
* respectively, value~-1 means to use the module/driver default. * respectively, value~-1 means to use the module/driver default.
* *
* random_seed :: * random_seed ::
* If positive, override the seed value for the CFF `random' * If positive, override the seed value for the CFF 'random' operator.
* operator. Value~0 means to use the font's value. Value~-1 * Value~0 means to use the font's value. Value~-1 means to use the
* means to use the CFF driver's default. * CFF driver's default.
* *
* lcd_weights :: * lcd_weights ::
* lcd_filter_func :: * lcd_filter_func ::
* These fields specify the LCD filtering weights and callback * These fields specify the LCD filtering weights and callback function
* function for ClearType-style subpixel rendering. * for ClearType-style subpixel rendering.
* *
* refcount :: * refcount ::
* A counter initialized to~1 at the time an @FT_Face structure is * A counter initialized to~1 at the time an @FT_Face structure is
* created. @FT_Reference_Face increments this counter, and * created. @FT_Reference_Face increments this counter, and
* @FT_Done_Face only destroys a face if the counter is~1, * @FT_Done_Face only destroys a face if the counter is~1, otherwise it
* otherwise it simply decrements it. * simply decrements it.
*/ */
typedef struct FT_Face_InternalRec_ typedef struct FT_Face_InternalRec_
{ {
@ -396,29 +393,24 @@ FT_BEGIN_HEADER
* *
* @fields: * @fields:
* loader :: * loader ::
* The glyph loader object used to load outlines * The glyph loader object used to load outlines into the glyph slot.
* into the glyph slot.
* *
* flags :: * flags ::
* Possible values are zero or * Possible values are zero or FT_GLYPH_OWN_BITMAP. The latter
* FT_GLYPH_OWN_BITMAP. The latter indicates * indicates that the FT_GlyphSlot structure owns the bitmap buffer.
* that the FT_GlyphSlot structure owns the
* bitmap buffer.
* *
* glyph_transformed :: * glyph_transformed ::
* Boolean. Set to TRUE when the loaded glyph * Boolean. Set to TRUE when the loaded glyph must be transformed
* must be transformed through a specific * through a specific font transformation. This is _not_ the same as
* font transformation. This is _not_ the same * the face transform set through FT_Set_Transform().
* as the face transform set through
* FT_Set_Transform().
* *
* glyph_matrix :: * glyph_matrix ::
* The 2x2 matrix corresponding to the glyph * The 2x2 matrix corresponding to the glyph transformation, if
* transformation, if necessary. * necessary.
* *
* glyph_delta :: * glyph_delta ::
* The 2d translation vector corresponding to * The 2d translation vector corresponding to the glyph transformation,
* the glyph transformation, if necessary. * if necessary.
* *
* glyph_hints :: * glyph_hints ::
* Format-specific glyph hints management. * Format-specific glyph hints management.
@ -450,8 +442,7 @@ FT_BEGIN_HEADER
* FT_Size_InternalRec * FT_Size_InternalRec
* *
* @description: * @description:
* This structure contains the internal fields of each FT_Size * This structure contains the internal fields of each FT_Size object.
* object.
* *
* @fields: * @fields:
* module_data :: * module_data ::
@ -568,8 +559,8 @@ FT_BEGIN_HEADER
* A module-specific interface if available, 0 otherwise. * A module-specific interface if available, 0 otherwise.
* *
* @note: * @note:
* You should better be familiar with FreeType internals to know * You should better be familiar with FreeType internals to know which
* which module to look for, and what its interface is :-) * module to look for, and what its interface is :-)
*/ */
FT_BASE( const void* ) FT_BASE( const void* )
FT_Get_Module_Interface( FT_Library library, FT_Get_Module_Interface( FT_Library library,
@ -627,10 +618,9 @@ FT_BEGIN_HEADER
* FT_New_GlyphSlot * FT_New_GlyphSlot
* *
* @description: * @description:
* It is sometimes useful to have more than one glyph slot for a * It is sometimes useful to have more than one glyph slot for a given
* given face object. This function is used to create additional * face object. This function is used to create additional slots. All
* slots. All of them are automatically discarded when the face is * of them are automatically discarded when the face is destroyed.
* destroyed.
* *
* @input: * @input:
* face :: * face ::
@ -655,8 +645,8 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Destroys a given glyph slot. Remember however that all slots are * Destroys a given glyph slot. Remember however that all slots are
* automatically destroyed with its parent. Using this function is * automatically destroyed with its parent. Using this function is not
* not always mandatory. * always mandatory.
* *
* @input: * @input:
* slot :: * slot ::
@ -789,25 +779,23 @@ FT_BEGIN_HEADER
* FT_DriverRec * FT_DriverRec
* *
* @description: * @description:
* The root font driver class. A font driver is responsible for * The root font driver class. A font driver is responsible for managing
* managing and loading font files of a given format. * and loading font files of a given format.
* *
* @fields: * @fields:
* root :: * root ::
* Contains the fields of the root module class. * Contains the fields of the root module class.
* *
* clazz :: * clazz ::
* A pointer to the font driver's class. Note that * A pointer to the font driver's class. Note that this is NOT
* this is NOT root.clazz. `class' wasn't used * root.clazz. 'class' wasn't used as it is a reserved word in C++.
* as it is a reserved word in C++.
* *
* faces_list :: * faces_list ::
* The list of faces currently opened by this * The list of faces currently opened by this driver.
* driver.
* *
* glyph_loader :: * glyph_loader ::
* Unused. Used to be glyph loader for all faces * Unused. Used to be glyph loader for all faces managed by this
* managed by this driver. * driver.
*/ */
typedef struct FT_DriverRec_ typedef struct FT_DriverRec_
{ {
@ -843,14 +831,13 @@ FT_BEGIN_HEADER
* FT_LibraryRec * FT_LibraryRec
* *
* @description: * @description:
* The FreeType library class. This is the root of all FreeType * The FreeType library class. This is the root of all FreeType data.
* data. Use FT_New_Library() to create a library object, and * Use FT_New_Library() to create a library object, and FT_Done_Library()
* FT_Done_Library() to discard it and all child objects. * to discard it and all child objects.
* *
* @fields: * @fields:
* memory :: * memory ::
* The library's memory object. Manages memory * The library's memory object. Manages memory allocation.
* allocation.
* *
* version_major :: * version_major ::
* The major version number of the library. * The major version number of the library.
@ -862,60 +849,52 @@ FT_BEGIN_HEADER
* The current patch level of the library. * The current patch level of the library.
* *
* num_modules :: * num_modules ::
* The number of modules currently registered * The number of modules currently registered within this library.
* within this library. This is set to 0 for new * This is set to 0 for new libraries. New modules are added through
* libraries. New modules are added through the * the FT_Add_Module() API function.
* FT_Add_Module() API function.
* *
* modules :: * modules ::
* A table used to store handles to the currently * A table used to store handles to the currently registered
* registered modules. Note that each font driver * modules. Note that each font driver contains a list of its opened
* contains a list of its opened faces. * faces.
* *
* renderers :: * renderers ::
* The list of renderers currently registered * The list of renderers currently registered within the library.
* within the library.
* *
* cur_renderer :: * cur_renderer ::
* The current outline renderer. This is a * The current outline renderer. This is a shortcut used to avoid
* shortcut used to avoid parsing the list on * parsing the list on each call to FT_Outline_Render(). It is a
* each call to FT_Outline_Render(). It is a * handle to the current renderer for the FT_GLYPH_FORMAT_OUTLINE
* handle to the current renderer for the * format.
* FT_GLYPH_FORMAT_OUTLINE format.
* *
* auto_hinter :: * auto_hinter ::
* The auto-hinter module interface. * The auto-hinter module interface.
* *
* debug_hooks :: * debug_hooks ::
* An array of four function pointers that allow * An array of four function pointers that allow debuggers to hook into
* debuggers to hook into a font format's * a font format's interpreter. Currently, only the TrueType bytecode
* interpreter. Currently, only the TrueType * debugger uses this.
* bytecode debugger uses this.
* *
* lcd_weights :: * lcd_weights ::
* The LCD filter weights for ClearType-style * The LCD filter weights for ClearType-style subpixel rendering.
* subpixel rendering.
* *
* lcd_filter_func :: * lcd_filter_func ::
* The LCD filtering callback function for * The LCD filtering callback function for for ClearType-style subpixel
* for ClearType-style subpixel rendering. * rendering.
* *
* lcd_geometry :: * lcd_geometry ::
* This array specifies LCD subpixel geometry * This array specifies LCD subpixel geometry and controls Harmony LCD
* and controls Harmony LCD rendering technique, * rendering technique, alternative to ClearType.
* alternative to ClearType.
* *
* pic_container :: * pic_container ::
* Contains global structs and tables, instead * Contains global structs and tables, instead of defining them
* of defining them globally. * globally.
* *
* refcount :: * refcount ::
* A counter initialized to~1 at the time an * A counter initialized to~1 at the time an @FT_Library structure is
* @FT_Library structure is created. * created. @FT_Reference_Library increments this counter, and
* @FT_Reference_Library increments this counter, * @FT_Done_Library only destroys a library if the counter is~1,
* and @FT_Done_Library only destroys a library * otherwise it simply decrements it.
* if the counter is~1, otherwise it simply
* decrements it.
*/ */
typedef struct FT_LibraryRec_ typedef struct FT_LibraryRec_
{ {
@ -1022,9 +1001,9 @@ FT_BEGIN_HEADER
* FT_DEFINE_OUTLINE_FUNCS * FT_DEFINE_OUTLINE_FUNCS
* *
* @description: * @description:
* Used to initialize an instance of FT_Outline_Funcs struct. * Used to initialize an instance of FT_Outline_Funcs struct. The struct
* The struct will be allocated in the global scope (or the scope * will be allocated in the global scope (or the scope where the macro is
* where the macro is used). * used).
*/ */
#define FT_DEFINE_OUTLINE_FUNCS( \ #define FT_DEFINE_OUTLINE_FUNCS( \
class_, \ class_, \
@ -1051,9 +1030,9 @@ FT_BEGIN_HEADER
* FT_DEFINE_RASTER_FUNCS * FT_DEFINE_RASTER_FUNCS
* *
* @description: * @description:
* Used to initialize an instance of FT_Raster_Funcs struct. * Used to initialize an instance of FT_Raster_Funcs struct. The struct
* The struct will be allocated in the global scope (or the scope * will be allocated in the global scope (or the scope where the macro is
* where the macro is used). * used).
*/ */
#define FT_DEFINE_RASTER_FUNCS( \ #define FT_DEFINE_RASTER_FUNCS( \
class_, \ class_, \
@ -1081,8 +1060,8 @@ FT_BEGIN_HEADER
* FT_DEFINE_GLYPH * FT_DEFINE_GLYPH
* *
* @description: * @description:
* The struct will be allocated in the global scope (or the scope * The struct will be allocated in the global scope (or the scope where
* where the macro is used). * the macro is used).
*/ */
#define FT_DEFINE_GLYPH( \ #define FT_DEFINE_GLYPH( \
class_, \ class_, \
@ -1114,8 +1093,8 @@ FT_BEGIN_HEADER
* FT_DECLARE_RENDERER * FT_DECLARE_RENDERER
* *
* @description: * @description:
* Used to create a forward declaration of a * Used to create a forward declaration of a FT_Renderer_Class struct
* FT_Renderer_Class struct instance. * instance.
* *
* @macro: * @macro:
* FT_DEFINE_RENDERER * FT_DEFINE_RENDERER
@ -1123,8 +1102,8 @@ FT_BEGIN_HEADER
* @description: * @description:
* Used to initialize an instance of FT_Renderer_Class struct. * Used to initialize an instance of FT_Renderer_Class struct.
* *
* The struct will be allocated in the global scope (or the scope * The struct will be allocated in the global scope (or the scope where
* where the macro is used). * the macro is used).
*/ */
#define FT_DECLARE_RENDERER( class_ ) \ #define FT_DECLARE_RENDERER( class_ ) \
FT_EXPORT_VAR( const FT_Renderer_Class ) class_; FT_EXPORT_VAR( const FT_Renderer_Class ) class_;
@ -1175,8 +1154,8 @@ FT_BEGIN_HEADER
* FT_DECLARE_MODULE * FT_DECLARE_MODULE
* *
* @description: * @description:
* Used to create a forward declaration of a * Used to create a forward declaration of a FT_Module_Class struct
* FT_Module_Class struct instance. * instance.
* *
* @macro: * @macro:
* FT_DEFINE_MODULE * FT_DEFINE_MODULE
@ -1184,16 +1163,16 @@ FT_BEGIN_HEADER
* @description: * @description:
* Used to initialize an instance of an FT_Module_Class struct. * Used to initialize an instance of an FT_Module_Class struct.
* *
* The struct will be allocated in the global scope (or the scope * The struct will be allocated in the global scope (or the scope where
* where the macro is used). * the macro is used).
* *
* @macro: * @macro:
* FT_DEFINE_ROOT_MODULE * FT_DEFINE_ROOT_MODULE
* *
* @description: * @description:
* Used to initialize an instance of an FT_Module_Class struct inside * Used to initialize an instance of an FT_Module_Class struct inside
* another struct that contains it or in a function that initializes * another struct that contains it or in a function that initializes that
* that containing struct. * containing struct.
*/ */
#define FT_DECLARE_MODULE( class_ ) \ #define FT_DECLARE_MODULE( class_ ) \
FT_CALLBACK_TABLE \ FT_CALLBACK_TABLE \

View File

@ -72,8 +72,8 @@ FT_BEGIN_HEADER
} FT_RFork_Rule; } FT_RFork_Rule;
/* For fast translation between rule index and rule type, /* For fast translation between rule index and rule type,
* the macros FT_RFORK_xxx should be kept consistent with * the macros FT_RFORK_xxx should be kept consistent with the
* the raccess_guess_funcs table * raccess_guess_funcs table
*/ */
typedef struct ft_raccess_guess_rec_ { typedef struct ft_raccess_guess_rec_ {
ft_raccess_guess_func func; ft_raccess_guess_func func;
@ -98,11 +98,11 @@ FT_BEGIN_HEADER
* FT_Raccess_Guess * FT_Raccess_Guess
* *
* @description: * @description:
* Guess a file name and offset where the actual resource fork is * Guess a file name and offset where the actual resource fork is stored.
* stored. The macro FT_RACCESS_N_RULES holds the number of * The macro FT_RACCESS_N_RULES holds the number of guessing rules; the
* guessing rules; the guessed result for the Nth rule is * guessed result for the Nth rule is represented as a triplet: a new
* represented as a triplet: a new file name (new_names[N]), a file * file name (new_names[N]), a file offset (offsets[N]), and an error
* offset (offsets[N]), and an error code (errors[N]). * code (errors[N]).
* *
* @input: * @input:
* library :: * library ::
@ -112,24 +112,24 @@ FT_BEGIN_HEADER
* A file stream containing the resource fork. * A file stream containing the resource fork.
* *
* base_name :: * base_name ::
* The (base) file name of the resource fork used for some * The (base) file name of the resource fork used for some guessing
* guessing rules. * rules.
* *
* @output: * @output:
* new_names :: * new_names ::
* An array of guessed file names in which the resource forks may * An array of guessed file names in which the resource forks may
* exist. If `new_names[N]' is NULL, the guessed file name is * exist. If 'new_names[N]' is NULL, the guessed file name is equal to
* equal to `base_name'. * `base_name`.
* *
* offsets :: * offsets ::
* An array of guessed file offsets. `offsets[N]' holds the file * An array of guessed file offsets. 'offsets[N]' holds the file
* offset of the possible start of the resource fork in file * offset of the possible start of the resource fork in file
* `new_names[N]'. * 'new_names[N]'.
* *
* errors :: * errors ::
* An array of FreeType error codes. `errors[N]' is the error * An array of FreeType error codes. 'errors[N]' is the error code of
* code of Nth guessing rule function. If `errors[N]' is not * Nth guessing rule function. If 'errors[N]' is not FT_Err_Ok,
* FT_Err_Ok, `new_names[N]' and `offsets[N]' are meaningless. * 'new_names[N]' and 'offsets[N]' are meaningless.
*/ */
FT_BASE( void ) FT_BASE( void )
FT_Raccess_Guess( FT_Library library, FT_Raccess_Guess( FT_Library library,
@ -146,10 +146,10 @@ FT_BEGIN_HEADER
* FT_Raccess_Get_HeaderInfo * FT_Raccess_Get_HeaderInfo
* *
* @description: * @description:
* Get the information from the header of resource fork. The * Get the information from the header of resource fork. The information
* information includes the file offset where the resource map * includes the file offset where the resource map starts, and the file
* starts, and the file offset where the resource data starts. * offset where the resource data starts. `FT_Raccess_Get_DataOffsets`
* `FT_Raccess_Get_DataOffsets' requires these two data. * requires these two data.
* *
* @input: * @input:
* library :: * library ::
@ -185,9 +185,9 @@ FT_BEGIN_HEADER
* FT_Raccess_Get_DataOffsets * FT_Raccess_Get_DataOffsets
* *
* @description: * @description:
* Get the data offsets for a tag in a resource fork. Offsets are * Get the data offsets for a tag in a resource fork. Offsets are stored
* stored in an array because, in some cases, resources in a resource * in an array because, in some cases, resources in a resource fork have
* fork have the same tag. * the same tag.
* *
* @input: * @input:
* library :: * library ::
@ -206,17 +206,16 @@ FT_BEGIN_HEADER
* The resource tag. * The resource tag.
* *
* sort_by_res_id :: * sort_by_res_id ::
* A Boolean to sort the fragmented resource by their ids. * A Boolean to sort the fragmented resource by their ids. The
* The fragmented resources for `POST' resource should be sorted * fragmented resources for 'POST' resource should be sorted to restore
* to restore Type1 font properly. For `sfnt' resources, sorting * Type1 font properly. For 'sfnt' resources, sorting may induce a
* may induce a different order of the faces in comparison to that * different order of the faces in comparison to that by QuickDraw API.
* by QuickDraw API.
* *
* @output: * @output:
* offsets :: * offsets ::
* The stream offsets for the resource data specified by `tag'. * The stream offsets for the resource data specified by 'tag'. This
* This array is allocated by the function, so you have to call * array is allocated by the function, so you have to call @ft_mem_free
* @ft_mem_free after use. * after use.
* *
* count :: * count ::
* The length of offsets array. * The length of offsets array.
@ -225,8 +224,8 @@ FT_BEGIN_HEADER
* FreeType error code. FT_Err_Ok means success. * FreeType error code. FT_Err_Ok means success.
* *
* @note: * @note:
* Normally you should use `FT_Raccess_Get_HeaderInfo' to get the * Normally you should use `FT_Raccess_Get_HeaderInfo` to get the value
* value for `map_offset' and `rdata_pos'. * for `map_offset` and `rdata_pos`.
*/ */
FT_BASE( FT_Error ) FT_BASE( FT_Error )
FT_Raccess_Get_DataOffsets( FT_Library library, FT_Raccess_Get_DataOffsets( FT_Library library,

View File

@ -17,13 +17,13 @@
/************************************************************************** /**************************************************************************
* *
* Each module can export one or more `services'. Each service is * Each module can export one or more 'services'. Each service is
* identified by a constant string and modeled by a pointer; the latter * identified by a constant string and modeled by a pointer; the latter
* generally corresponds to a structure containing function pointers. * generally corresponds to a structure containing function pointers.
* *
* Note that a service's data cannot be a mere function pointer because * Note that a service's data cannot be a mere function pointer because in
* in C it is possible that function pointers might be implemented * C it is possible that function pointers might be implemented differently
* differently than data pointers (e.g. 48 bits instead of 32). * than data pointers (e.g. 48 bits instead of 32).
* *
*/ */
@ -47,15 +47,15 @@ FT_BEGIN_HEADER
* The source face handle. * The source face handle.
* *
* id :: * id ::
* A string describing the service as defined in the service's * A string describing the service as defined in the service's header
* header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to * files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
* `multi-masters'). It is automatically prefixed with * 'multi-masters'). It is automatically prefixed with
* `FT_SERVICE_ID_'. * `FT_SERVICE_ID_`.
* *
* @output: * @output:
* ptr :: * ptr ::
* A variable that receives the service pointer. Will be NULL * A variable that receives the service pointer. Will be NULL if not
* if not found. * found.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
@ -99,15 +99,15 @@ FT_BEGIN_HEADER
* The source face handle. * The source face handle.
* *
* id :: * id ::
* A string describing the service as defined in the service's * A string describing the service as defined in the service's header
* header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to * files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
* `multi-masters'). It is automatically prefixed with * 'multi-masters'). It is automatically prefixed with
* `FT_SERVICE_ID_'. * `FT_SERVICE_ID_`.
* *
* @output: * @output:
* ptr :: * ptr ::
* A variable that receives the service pointer. Will be NULL * A variable that receives the service pointer. Will be NULL if not
* if not found. * found.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
@ -146,8 +146,8 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* /*
* The following structure is used to _describe_ a given service * The following structure is used to _describe_ a given service to the
* to the library. This is useful to build simple static service lists. * library. This is useful to build simple static service lists.
*/ */
typedef struct FT_ServiceDescRec_ typedef struct FT_ServiceDescRec_
{ {
@ -176,8 +176,8 @@ FT_BEGIN_HEADER
* @description: * @description:
* Used to initialize an array of FT_ServiceDescRec structures. * Used to initialize an array of FT_ServiceDescRec structures.
* *
* The array will be allocated in the global scope (or the scope * The array will be allocated in the global scope (or the scope where
* where the macro is used). * the macro is used).
*/ */
#define FT_DEFINE_SERVICEDESCREC1( class_, \ #define FT_DEFINE_SERVICEDESCREC1( class_, \
serv_id_1, serv_data_1 ) \ serv_id_1, serv_data_1 ) \
@ -351,13 +351,13 @@ FT_BEGIN_HEADER
/* /*
* Parse a list of FT_ServiceDescRec descriptors and look for * Parse a list of FT_ServiceDescRec descriptors and look for a specific
* a specific service by ID. Note that the last element in the * service by ID. Note that the last element in the array must be { NULL,
* array must be { NULL, NULL }, and that the function should * NULL }, and that the function should return NULL if the service isn't
* return NULL if the service isn't available. * available.
* *
* This function can be used by modules to implement their * This function can be used by modules to implement their `get_service'
* `get_service' method. * method.
*/ */
FT_BASE( FT_Pointer ) FT_BASE( FT_Pointer )
ft_service_list_lookup( FT_ServiceDesc service_descriptors, ft_service_list_lookup( FT_ServiceDesc service_descriptors,
@ -374,14 +374,14 @@ FT_BEGIN_HEADER
/* /*
* This structure is used to store a cache for several frequently used * This structure is used to store a cache for several frequently used
* services. It is the type of `face->internal->services'. You * services. It is the type of `face->internal->services'. You should
* should only use FT_FACE_LOOKUP_SERVICE to access it. * only use FT_FACE_LOOKUP_SERVICE to access it.
* *
* All fields should have the type FT_Pointer to relax compilation * All fields should have the type FT_Pointer to relax compilation
* dependencies. We assume the developer isn't completely stupid. * dependencies. We assume the developer isn't completely stupid.
* *
* Each field must be named `service_XXXX' where `XXX' corresponds to * Each field must be named `service_XXXX' where `XXX' corresponds to the
* the correct FT_SERVICE_ID_XXXX macro. See the definition of * correct FT_SERVICE_ID_XXXX macro. See the definition of
* FT_FACE_LOOKUP_SERVICE below how this is implemented. * FT_FACE_LOOKUP_SERVICE below how this is implemented.
* *
*/ */

View File

@ -149,8 +149,8 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Integer extraction macros -- the `buffer' parameter must ALWAYS be of * Integer extraction macros -- the 'buffer' parameter must ALWAYS be of
* type `char*' or equivalent (1-byte elements). * type 'char*' or equivalent (1-byte elements).
*/ */
#define FT_BYTE_( p, i ) ( ((const FT_Byte*)(p))[(i)] ) #define FT_BYTE_( p, i ) ( ((const FT_Byte*)(p))[(i)] )
@ -166,8 +166,8 @@ FT_BEGIN_HEADER
/* /*
* `FT_PEEK_XXX' are generic macros to get data from a buffer position. * `FT_PEEK_XXX' are generic macros to get data from a buffer position. No
* No safety checks are performed. * safety checks are performed.
*/ */
#define FT_PEEK_SHORT( p ) FT_INT16( FT_BYTE_U16( p, 0, 8 ) | \ #define FT_PEEK_SHORT( p ) FT_INT16( FT_BYTE_U16( p, 0, 8 ) | \
FT_BYTE_U16( p, 1, 0 ) ) FT_BYTE_U16( p, 1, 0 ) )
@ -267,11 +267,11 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* The `FT_GET_XXX' macros use an implicit `stream' variable. * The `FT_GET_XXX` macros use an implicit 'stream' variable.
* *
* Note that a call to `FT_STREAM_SEEK' or `FT_STREAM_POS' has *no* effect * Note that a call to `FT_STREAM_SEEK` or `FT_STREAM_POS` has **no**
* on `FT_GET_XXX'! They operate on `stream->pos', while `FT_GET_XXX' use * effect on `FT_GET_XXX`! They operate on `stream->pos`, while
* `stream->cursor'. * `FT_GET_XXX` use `stream->cursor`.
*/ */
#if 0 #if 0
#define FT_GET_MACRO( type ) FT_NEXT_ ## type ( stream->cursor ) #define FT_GET_MACRO( type ) FT_NEXT_ ## type ( stream->cursor )
@ -319,8 +319,8 @@ FT_BEGIN_HEADER
* The `FT_READ_XXX' macros use implicit `stream' and `error' variables. * The `FT_READ_XXX' macros use implicit `stream' and `error' variables.
* *
* `FT_READ_XXX' can be controlled with `FT_STREAM_SEEK' and * `FT_READ_XXX' can be controlled with `FT_STREAM_SEEK' and
* `FT_STREAM_POS'. They use the full machinery to check whether a read * `FT_STREAM_POS'. They use the full machinery to check whether a read is
* is valid. * valid.
*/ */
#define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var ) #define FT_READ_BYTE( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var )
#define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var ) #define FT_READ_CHAR( var ) FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var )

View File

@ -54,17 +54,17 @@ FT_BEGIN_HEADER
* FT_VALIDATE_TIGHT :: * FT_VALIDATE_TIGHT ::
* A table that passes this validation level can be used reliably and * A table that passes this validation level can be used reliably and
* doesn't contain invalid data. For example, a charmap table that * doesn't contain invalid data. For example, a charmap table that
* returns invalid glyph indices will not pass, even though it can * returns invalid glyph indices will not pass, even though it can be
* be used with FreeType in default mode (the library will simply * used with FreeType in default mode (the library will simply return an
* return an error later when trying to load the glyph). * error later when trying to load the glyph).
* *
* It also checks that fields which must be a multiple of 2, 4, or 8, * It also checks that fields which must be a multiple of 2, 4, or 8,
* don't have incorrect values, etc. * don't have incorrect values, etc.
* *
* FT_VALIDATE_PARANOID :: * FT_VALIDATE_PARANOID ::
* Only for font debugging. Checks that a table follows the * Only for font debugging. Checks that a table follows the
* specification by 100%. Very few fonts will be able to pass this * specification by 100%. Very few fonts will be able to pass this level
* level anyway but it can be useful for certain tools like font * anyway but it can be useful for certain tools like font
* editors/converters. * editors/converters.
*/ */
typedef enum FT_ValidationLevel_ typedef enum FT_ValidationLevel_

View File

@ -18,8 +18,8 @@
/************************************************************************** /**************************************************************************
* *
* This file is automatically included by `ft2build.h'. * This file is automatically included by `ft2build.h`. Do not include it
* Do not include it manually! * manually!
* *
*/ */

View File

@ -113,25 +113,22 @@ FT_BEGIN_HEADER
* PS_TableRec * PS_TableRec
* *
* @description: * @description:
* A PS_Table is a simple object used to store an array of objects in * A PS_Table is a simple object used to store an array of objects in a
* a single memory block. * single memory block.
* *
* @fields: * @fields:
* block :: * block ::
* The address in memory of the growheap's block. This * The address in memory of the growheap's block. This can change
* can change between two object adds, due to * between two object adds, due to reallocation.
* reallocation.
* *
* cursor :: * cursor ::
* The current top of the grow heap within its block. * The current top of the grow heap within its block.
* *
* capacity :: * capacity ::
* The current size of the heap block. Increments by * The current size of the heap block. Increments by 1kByte chunks.
* 1kByte chunks.
* *
* init :: * init ::
* Set to 0xDEADBEEF if `elements' and `lengths' have * Set to 0xDEADBEEF if 'elements' and 'lengths' have been allocated.
* been allocated.
* *
* max_elems :: * max_elems ::
* The maximum number of elements in table. * The maximum number of elements in table.
@ -146,8 +143,7 @@ FT_BEGIN_HEADER
* A table of element sizes within the block. * A table of element sizes within the block.
* *
* memory :: * memory ::
* The object used for memory operations * The object used for memory operations (alloc/realloc).
* (alloc/realloc).
* *
* funcs :: * funcs ::
* A table of method pointers for this object. * A table of method pointers for this object.
@ -556,9 +552,8 @@ FT_BEGIN_HEADER
* Set but not used. * Set but not used.
* *
* metrics_only :: * metrics_only ::
* A boolean indicating that we only want to compute * A boolean indicating that we only want to compute the metrics of a
* the metrics of a given glyph, not load all of its * given glyph, not load all of its points.
* points.
* *
* is_t1 :: * is_t1 ::
* Set if current font type is Type 1. * Set if current font type is Type 1.
@ -815,8 +810,7 @@ FT_BEGIN_HEADER
* Unused. * Unused.
* *
* parse_state :: * parse_state ::
* An enumeration which controls the charstring * An enumeration which controls the charstring parsing state.
* parsing state.
* *
* load_points :: * load_points ::
* If this flag is not set, no points are loaded. * If this flag is not set, no points are loaded.
@ -825,9 +819,8 @@ FT_BEGIN_HEADER
* Set but not used. * Set but not used.
* *
* metrics_only :: * metrics_only ::
* A boolean indicating that we only want to compute * A boolean indicating that we only want to compute the metrics of a
* the metrics of a given glyph, not load all of its * given glyph, not load all of its points.
* points.
* *
* funcs :: * funcs ::
* An array of function pointers for the builder. * An array of function pointers for the builder.
@ -1100,9 +1093,8 @@ FT_BEGIN_HEADER
* Set but not used. * Set but not used.
* *
* metrics_only :: * metrics_only ::
* A boolean indicating that we only want to compute * A boolean indicating that we only want to compute the metrics of a
* the metrics of a given glyph, not load all of its * given glyph, not load all of its points.
* points.
* *
* hints_funcs :: * hints_funcs ::
* Auxiliary pointer for hinting. * Auxiliary pointer for hinting.
@ -1294,8 +1286,7 @@ FT_BEGIN_HEADER
* *
* @fields: * @fields:
* memory :: * memory ::
* The object used for memory operations (alloc and * The object used for memory operations (alloc and realloc).
* realloc).
* *
* stream :: * stream ::
* This is an opaque object. * This is an opaque object.
@ -1304,8 +1295,7 @@ FT_BEGIN_HEADER
* The result will be stored here. * The result will be stored here.
* *
* get_index :: * get_index ::
* A user provided function to get a glyph index by its * A user provided function to get a glyph index by its name.
* name.
*/ */
typedef struct AFM_ParserRec_ typedef struct AFM_ParserRec_
{ {

View File

@ -4,7 +4,7 @@
* *
* Interface to Postscript-specific (Type 1 and Type 2) hints * Interface to Postscript-specific (Type 1 and Type 2) hints
* recorders (specification only). These are used to support native * 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-2018 by * Copyright 2001-2018 by
* David Turner, Robert Wilhelm, and Werner Lemberg. * David Turner, Robert Wilhelm, and Werner Lemberg.
@ -86,16 +86,16 @@ FT_BEGIN_HEADER
* @T1_Hints_FuncsRec structure. Recording glyph hints is normally * @T1_Hints_FuncsRec structure. Recording glyph hints is normally
* achieved through the following scheme: * achieved through the following scheme:
* *
* - Open a new hint recording session by calling the `open' method. * - Open a new hint recording session by calling the 'open' method.
* This rewinds the recorder and prepare it for new input. * This rewinds the recorder and prepare it for new input.
* *
* - For each hint found in the glyph charstring, call the corresponding * - For each hint found in the glyph charstring, call the corresponding
* method (`stem', `stem3', or `reset'). Note that these functions do * method ('stem', 'stem3', or 'reset'). Note that these functions do
* not return an error code. * not return an error code.
* *
* - Close the recording session by calling the `close' method. It * - Close the recording session by calling the 'close' method. It
* returns an error code if the hints were invalid or something * returns an error code if the hints were invalid or something strange
* strange happened (e.g., memory shortage). * happened (e.g., memory shortage).
* *
* The hints accumulated in the object can later be used by the * The hints accumulated in the object can later be used by the
* PostScript hinter. * PostScript hinter.
@ -146,7 +146,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A method of the @T1_Hints class used to record a new horizontal or * 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' * vertical stem. This corresponds to the Type 1 'hstem' and 'vstem'
* operators. * operators.
* *
* @input: * @input:
@ -164,15 +164,15 @@ FT_BEGIN_HEADER
* Use vertical coordinates (y) for horizontal stems (dim=0). Use * Use vertical coordinates (y) for horizontal stems (dim=0). Use
* horizontal coordinates (x) for vertical stems (dim=1). * horizontal coordinates (x) for vertical stems (dim=1).
* *
* `coords[0]' is the absolute stem position (lowest coordinate); * 'coords[0]' is the absolute stem position (lowest coordinate);
* `coords[1]' is the length. * 'coords[1]' is the length.
* *
* The length can be negative, in which case it must be either -20 or * 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 * -21. It is interpreted as a 'ghost' stem, according to the Type 1
* specification. * specification.
* *
* If the length is -21 (corresponding to a bottom ghost stem), then * If the length is -21 (corresponding to a bottom ghost stem), then the
* the real stem position is `coords[0]+coords[1]'. * real stem position is 'coords[0]+coords[1]'.
* *
*/ */
typedef void typedef void
@ -297,7 +297,7 @@ FT_BEGIN_HEADER
* On input, all points within the outline are in font coordinates. On * On input, all points within the outline are in font coordinates. On
* output, they are in 1/64th of pixels. * output, they are in 1/64th of pixels.
* *
* The scaling transformation is taken from the `globals' object which * The scaling transformation is taken from the 'globals' object which
* must correspond to the same font as the glyph. * must correspond to the same font as the glyph.
* *
*/ */
@ -373,16 +373,16 @@ FT_BEGIN_HEADER
* @T2_Hints_FuncsRec structure. Recording glyph hints is normally * @T2_Hints_FuncsRec structure. Recording glyph hints is normally
* achieved through the following scheme: * achieved through the following scheme:
* *
* - Open a new hint recording session by calling the `open' method. * - Open a new hint recording session by calling the 'open' method.
* This rewinds the recorder and prepare it for new input. * This rewinds the recorder and prepare it for new input.
* *
* - For each hint found in the glyph charstring, call the corresponding * - For each hint found in the glyph charstring, call the corresponding
* method (`stems', `hintmask', `counters'). Note that these * method ('stems', 'hintmask', 'counters'). Note that these functions
* functions do not return an error code. * do not return an error code.
* *
* - Close the recording session by calling the `close' method. It * - Close the recording session by calling the 'close' method. It
* returns an error code if the hints were invalid or something * returns an error code if the hints were invalid or something strange
* strange happened (e.g., memory shortage). * happened (e.g., memory shortage).
* *
* The hints accumulated in the object can later be used by the * The hints accumulated in the object can later be used by the
* Postscript hinter. * Postscript hinter.
@ -434,7 +434,7 @@ FT_BEGIN_HEADER
* @description: * @description:
* A method of the @T2_Hints class used to set the table of stems in * A method of the @T2_Hints class used to set the table of stems in
* either the vertical or horizontal dimension. Equivalent to the * either the vertical or horizontal dimension. Equivalent to the
* `hstem', `vstem', `hstemhm', and `vstemhm' Type 2 operators. * 'hstem', 'vstem', 'hstemhm', and 'vstemhm' Type 2 operators.
* *
* @input: * @input:
* hints :: * hints ::
@ -447,18 +447,18 @@ FT_BEGIN_HEADER
* The number of stems. * The number of stems.
* *
* coords :: * coords ::
* An array of `count' (position,length) pairs in 16.16 format. * An array of 'count' (position,length) pairs in 16.16 format.
* *
* @note: * @note:
* Use vertical coordinates (y) for horizontal stems (dim=0). Use * Use vertical coordinates (y) for horizontal stems (dim=0). Use
* horizontal coordinates (x) for vertical stems (dim=1). * horizontal coordinates (x) for vertical stems (dim=1).
* *
* There are `2*count' elements in the `coords' array. Each even * There are '2*count' elements in the 'coords' array. Each even element
* element is an absolute position in font units, each odd element is a * is an absolute position in font units, each odd element is a length in
* length in font units. * font units.
* *
* A length can be negative, in which case it must be either -20 or * A length can be negative, in which case it must be either -20 or -21.
* -21. It is interpreted as a `ghost' stem, according to the Type 1 * It is interpreted as a 'ghost' stem, according to the Type 1
* specification. * specification.
* *
*/ */
@ -476,15 +476,15 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A method of the @T2_Hints class used to set a given hintmask (this * A method of the @T2_Hints class used to set a given hintmask (this
* corresponds to the `hintmask' Type 2 operator). * corresponds to the 'hintmask' Type 2 operator).
* *
* @input: * @input:
* hints :: * hints ::
* A handle to the Type 2 hints recorder. * A handle to the Type 2 hints recorder.
* *
* end_point :: * end_point ::
* The glyph index of the last point to which the previously defined * The glyph index of the last point to which the previously defined or
* or activated hints apply. * activated hints apply.
* *
* bit_count :: * bit_count ::
* The number of bits in the hint mask. * The number of bits in the hint mask.
@ -494,13 +494,13 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* If the hintmask starts the charstring (before any glyph point * If the hintmask starts the charstring (before any glyph point
* definition), the value of `end_point' should be 0. * definition), the value of `end_point` should be 0.
* *
* `bit_count' is the number of meaningful bits in the `bytes' array; it * `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., * must be equal to the total number of hints defined so far (i.e.,
* horizontal+verticals). * horizontal+verticals).
* *
* The `bytes' array can come directly from the Type 2 charstring and * The 'bytes' array can come directly from the Type 2 charstring and
* respects the same format. * respects the same format.
* *
*/ */
@ -517,8 +517,8 @@ FT_BEGIN_HEADER
* T2_Hints_CounterFunc * T2_Hints_CounterFunc
* *
* @description: * @description:
* A method of the @T2_Hints class used to set a given counter mask * A method of the @T2_Hints class used to set a given counter mask (this
* (this corresponds to the `hintmask' Type 2 operator). * corresponds to the 'hintmask' Type 2 operator).
* *
* @input: * @input:
* hints :: * hints ::
@ -536,13 +536,13 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* If the hintmask starts the charstring (before any glyph point * If the hintmask starts the charstring (before any glyph point
* definition), the value of `end_point' should be 0. * definition), the value of `end_point` should be 0.
* *
* `bit_count' is the number of meaningful bits in the `bytes' array; it * `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., * must be equal to the total number of hints defined so far (i.e.,
* horizontal+verticals). * horizontal+verticals).
* *
* The `bytes' array can come directly from the Type 2 charstring and * The 'bytes' array can come directly from the Type 2 charstring and
* respects the same format. * respects the same format.
* *
*/ */
@ -588,8 +588,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A method of the @T2_Hints class used to apply hints to the * A method of the @T2_Hints class used to apply hints to the
* corresponding glyph outline. Must be called after the `close' * corresponding glyph outline. Must be called after the 'close' method.
* method.
* *
* @input: * @input:
* hints :: * hints ::
@ -611,7 +610,7 @@ FT_BEGIN_HEADER
* On input, all points within the outline are in font coordinates. On * On input, all points within the outline are in font coordinates. On
* output, they are in 1/64th of pixels. * output, they are in 1/64th of pixels.
* *
* The scaling transformation is taken from the `globals' object which * The scaling transformation is taken from the 'globals' object which
* must correspond to the same font than the glyph. * must correspond to the same font than the glyph.
* *
*/ */

View File

@ -27,8 +27,8 @@ FT_BEGIN_HEADER
/* /*
* A trivial service used to return the name of a face's font driver, * A trivial service used to return the name of a face's font driver,
* according to the XFree86 nomenclature. Note that the service data * according to the XFree86 nomenclature. Note that the service data is a
* is a simple constant string pointer. * simple constant string pointer.
*/ */
#define FT_SERVICE_ID_FONT_FORMAT "font-format" #define FT_SERVICE_ID_FONT_FORMAT "font-format"

View File

@ -26,8 +26,8 @@ FT_BEGIN_HEADER
/* /*
* A service used to retrieve glyph names, as well as to find the * A service used to retrieve glyph names, as well as to find the index of
* index of a given glyph name in a font. * a given glyph name in a font.
* *
*/ */

View File

@ -25,8 +25,8 @@
FT_BEGIN_HEADER FT_BEGIN_HEADER
/* /*
* A trivial service used to retrieve the PostScript name of a given * A trivial service used to retrieve the PostScript name of a given font
* font when available. The `get_name' field should never be NULL. * when available. The `get_name' field should never be NULL.
* *
* The corresponding function can return NULL to indicate that the * The corresponding function can return NULL to indicate that the
* PostScript name is not available. * PostScript name is not available.

View File

@ -48,8 +48,7 @@ FT_BEGIN_HEADER
/* /*
* Simple unicode -> glyph index charmap built from font glyph names * Simple unicode -> glyph index charmap built from font glyph names table.
* table.
*/ */
typedef struct PS_UniMap_ typedef struct PS_UniMap_
{ {
@ -71,8 +70,8 @@ FT_BEGIN_HEADER
/* /*
* A function which returns a glyph name for a given index. Returns * A function which returns a glyph name for a given index. Returns NULL
* NULL if invalid index. * if invalid index.
*/ */
typedef const char* typedef const char*
(*PS_GetGlyphNameFunc)( FT_Pointer data, (*PS_GetGlyphNameFunc)( FT_Pointer data,

View File

@ -45,15 +45,14 @@ FT_BEGIN_HEADER
* @fields: * @fields:
* language :: * language ::
* The language ID used in Mac fonts. Definitions of values are in * The language ID used in Mac fonts. Definitions of values are in
* `ttnameid.h'. * `ttnameid.h`.
* *
* format :: * format ::
* The cmap format. OpenType 1.6 defines the formats 0 (byte * The cmap format. OpenType 1.6 defines the formats 0 (byte encoding
* encoding table), 2~(high-byte mapping through table), 4~(segment * table), 2~(high-byte mapping through table), 4~(segment mapping to
* mapping to delta values), 6~(trimmed table mapping), 8~(mixed * delta values), 6~(trimmed table mapping), 8~(mixed 16-bit and 32-bit
* 16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented * coverage), 10~(trimmed array), 12~(segmented coverage), 13~(last
* coverage), 13~(last resort font), and 14 (Unicode Variation * resort font), and 14 (Unicode Variation Sequences).
* Sequences).
*/ */
typedef struct TT_CMapInfo_ typedef struct TT_CMapInfo_
{ {

View File

@ -2,7 +2,7 @@
* *
* sfnt.h * sfnt.h
* *
* High-level `sfnt' driver interface (specification). * High-level 'sfnt' driver interface (specification).
* *
* Copyright 1996-2018 by * Copyright 1996-2018 by
* David Turner, Robert Wilhelm, and Werner Lemberg. * David Turner, Robert Wilhelm, and Werner Lemberg.
@ -34,8 +34,8 @@ FT_BEGIN_HEADER
* TT_Init_Face_Func * TT_Init_Face_Func
* *
* @description: * @description:
* First part of the SFNT face object initialization. This finds * First part of the SFNT face object initialization. This finds the
* the face in a SFNT file or collection, and load its format tag in * face in a SFNT file or collection, and load its format tag in
* face->format_tag. * face->format_tag.
* *
* @input: * @input:
@ -46,10 +46,9 @@ FT_BEGIN_HEADER
* A handle to the target face object. * A handle to the target face object.
* *
* face_index :: * face_index ::
* The index of the TrueType font, if we are opening a * The index of the TrueType font, if we are opening a collection, in
* collection, in bits 0-15. The numbered instance * bits 0-15. The numbered instance index~+~1 of a GX (sub)font, if
* index~+~1 of a GX (sub)font, if applicable, in bits * applicable, in bits 16-30.
* 16-30.
* *
* num_params :: * num_params ::
* The number of additional parameters. * The number of additional parameters.
@ -63,12 +62,11 @@ FT_BEGIN_HEADER
* @note: * @note:
* The stream cursor must be at the font file's origin. * The stream cursor must be at the font file's origin.
* *
* This function recognizes fonts embedded in a `TrueType * This function recognizes fonts embedded in a 'TrueType collection'.
* collection'.
* *
* Once the format tag has been validated by the font driver, it * Once the format tag has been validated by the font driver, it should
* should then call the TT_Load_Face_Func() callback to read the rest * then call the TT_Load_Face_Func() callback to read the rest of the
* of the SFNT tables in the object. * SFNT tables in the object.
*/ */
typedef FT_Error typedef FT_Error
(*TT_Init_Face_Func)( FT_Stream stream, (*TT_Init_Face_Func)( FT_Stream stream,
@ -84,9 +82,9 @@ FT_BEGIN_HEADER
* TT_Load_Face_Func * TT_Load_Face_Func
* *
* @description: * @description:
* Second part of the SFNT face object initialization. This loads * Second part of the SFNT face object initialization. This loads the
* the common SFNT tables (head, OS/2, maxp, metrics, etc.) in the * common SFNT tables (head, OS/2, maxp, metrics, etc.) in the face
* face object. * object.
* *
* @input: * @input:
* stream :: * stream ::
@ -96,10 +94,9 @@ FT_BEGIN_HEADER
* A handle to the target face object. * A handle to the target face object.
* *
* face_index :: * face_index ::
* The index of the TrueType font, if we are opening a * The index of the TrueType font, if we are opening a collection, in
* collection, in bits 0-15. The numbered instance * bits 0-15. The numbered instance index~+~1 of a GX (sub)font, if
* index~+~1 of a GX (sub)font, if applicable, in bits * applicable, in bits 16-30.
* 16-30.
* *
* num_params :: * num_params ::
* The number of additional parameters. * The number of additional parameters.
@ -153,30 +150,24 @@ FT_BEGIN_HEADER
* The face object to look for. * The face object to look for.
* *
* tag :: * tag ::
* The tag of table to load. Use the value 0 if you want * The tag of table to load. Use the value 0 if you want to access the
* to access the whole font file, else set this parameter * whole font file, else set this parameter to a valid TrueType table
* to a valid TrueType table tag that you can forge with * tag that you can forge with the MAKE_TT_TAG macro.
* the MAKE_TT_TAG macro.
* *
* offset :: * offset ::
* The starting offset in the table (or the file if * The starting offset in the table (or the file if tag == 0).
* tag == 0).
* *
* length :: * length ::
* The address of the decision variable: * The address of the decision variable:
* *
* If length == NULL: * If length == NULL: Loads the whole table. Returns an error if
* Loads the whole table. Returns an error if * 'offset' == 0!
* `offset' == 0!
* *
* If *length == 0: * If *length == 0: Exits immediately; returning the length of the
* Exits immediately; returning the length of the given * given table or of the font file, depending on the value of 'tag'.
* table or of the font file, depending on the value of
* `tag'.
* *
* If *length != 0: * If *length != 0: Loads the next 'length' bytes of table or font,
* Loads the next `length' bytes of table or font, * starting at offset 'offset' (in table or font too).
* starting at offset `offset' (in table or font too).
* *
* @output: * @output:
* buffer :: * buffer ::
@ -199,8 +190,8 @@ FT_BEGIN_HEADER
* TT_Find_SBit_Image_Func * TT_Find_SBit_Image_Func
* *
* @description: * @description:
* Check whether an embedded bitmap (an `sbit') exists for a given * Check whether an embedded bitmap (an 'sbit') exists for a given glyph,
* glyph, at a given strike. * at a given strike.
* *
* @input: * @input:
* face :: * face ::
@ -220,12 +211,11 @@ FT_BEGIN_HEADER
* The SBit strike containing the glyph index. * The SBit strike containing the glyph index.
* *
* aglyph_offset :: * aglyph_offset ::
* The offset of the glyph data in `EBDT' table. * The offset of the glyph data in 'EBDT' table.
* *
* @return: * @return:
* FreeType error code. 0 means success. Returns * FreeType error code. 0 means success. Returns
* SFNT_Err_Invalid_Argument if no sbit exists for the requested * SFNT_Err_Invalid_Argument if no sbit exists for the requested glyph.
* glyph.
*/ */
typedef FT_Error typedef FT_Error
(*TT_Find_SBit_Image_Func)( TT_Face face, (*TT_Find_SBit_Image_Func)( TT_Face face,
@ -259,11 +249,11 @@ FT_BEGIN_HEADER
* FreeType error code. 0 means success. * FreeType error code. 0 means success.
* *
* @note: * @note:
* The stream cursor must be positioned at the glyph's offset within * The stream cursor must be positioned at the glyph's offset within the
* the `EBDT' table before the call. * 'EBDT' table before the call.
* *
* If the image format uses variable metrics, the stream cursor is * If the image format uses variable metrics, the stream cursor is
* positioned just after the metrics header in the `EBDT' table on * positioned just after the metrics header in the 'EBDT' table on
* function exit. * function exit.
*/ */
typedef FT_Error typedef FT_Error
@ -305,11 +295,11 @@ FT_BEGIN_HEADER
* A big sbit metrics structure for the glyph image. * A big sbit metrics structure for the glyph image.
* *
* @return: * @return:
* FreeType error code. 0 means success. Returns an error if no * FreeType error code. 0 means success. Returns an error if no glyph
* glyph sbit exists for the index. * sbit exists for the index.
* *
* @note: * @note:
* The `map.buffer' field is always freed before the glyph is loaded. * The `map.buffer` field is always freed before the glyph is loaded.
*/ */
typedef FT_Error typedef FT_Error
(*TT_Load_SBit_Image_Func)( TT_Face face, (*TT_Load_SBit_Image_Func)( TT_Face face,
@ -341,8 +331,8 @@ FT_BEGIN_HEADER
* The index of the sbit strike. * The index of the sbit strike.
* *
* @return: * @return:
* FreeType error code. 0 means success. Returns an error if no * FreeType error code. 0 means success. Returns an error if no sbit
* sbit strike exists for the selected ppem values. * strike exists for the selected ppem values.
*/ */
typedef FT_Error typedef FT_Error
(*TT_Set_SBit_Strike_Func)( TT_Face face, (*TT_Set_SBit_Strike_Func)( TT_Face face,
@ -370,8 +360,8 @@ FT_BEGIN_HEADER
* the metrics of the strike. * the metrics of the strike.
* *
* @return: * @return:
* FreeType error code. 0 means success. Returns an error if no * FreeType error code. 0 means success. Returns an error if no such
* such sbit strike exists. * sbit strike exists.
*/ */
typedef FT_Error typedef FT_Error
(*TT_Load_Strike_Metrics_Func)( TT_Face face, (*TT_Load_Strike_Metrics_Func)( TT_Face face,
@ -392,8 +382,8 @@ FT_BEGIN_HEADER
* The glyph index. * The glyph index.
* *
* PSname :: * PSname ::
* The address of a string pointer. Will be NULL in case * The address of a string pointer. Will be NULL in case of error,
* of error, otherwise it is a pointer to the glyph name. * otherwise it is a pointer to the glyph name.
* *
* You must not modify the returned string! * You must not modify the returned string!
* *
@ -454,12 +444,10 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* abearing :: * abearing ::
* The horizontal (or vertical) bearing. Set to zero in * The horizontal (or vertical) bearing. Set to zero in case of error.
* case of error.
* *
* aadvance :: * aadvance ::
* The horizontal (or vertical) advance. Set to zero in * The horizontal (or vertical) advance. Set to zero in case of error.
* case of error.
*/ */
typedef void typedef void
(*TT_Get_Metrics_Func)( TT_Face face, (*TT_Get_Metrics_Func)( TT_Face face,
@ -475,7 +463,7 @@ FT_BEGIN_HEADER
* TT_Set_Palette_Func * TT_Set_Palette_Func
* *
* @description: * @description:
* Load the colors into `face->palette' for a given palette index. * Load the colors into `face->palette` for a given palette index.
* *
* @input: * @input:
* face :: * face ::
@ -510,8 +498,8 @@ FT_BEGIN_HEADER
* @inout: * @inout:
* iterator :: * iterator ::
* An @FT_LayerIterator object. For the first call you should set * An @FT_LayerIterator object. For the first call you should set
* `iterator->p' to NULL. For all following calls, simply use the * `iterator->p` to NULL. For all following calls, simply use the same
* same object again. * object again.
* *
* @output: * @output:
* aglyph_index :: * aglyph_index ::
@ -524,9 +512,9 @@ FT_BEGIN_HEADER
* instead (to be set up by the application outside of FreeType). * instead (to be set up by the application outside of FreeType).
* *
* @return: * @return:
* Value~1 if everything is OK. If there are no more layers (or if * Value~1 if everything is OK. If there are no more layers (or if there
* there are no layers at all), value~0 gets returned. In case of an * are no layers at all), value~0 gets returned. In case of an error,
* error, value~0 is returned also. * value~0 is returned also.
*/ */
typedef FT_Bool typedef FT_Bool
(*TT_Get_Colr_Layer_Func)( TT_Face face, (*TT_Get_Colr_Layer_Func)( TT_Face face,
@ -542,10 +530,10 @@ FT_BEGIN_HEADER
* TT_Blend_Colr_Func * TT_Blend_Colr_Func
* *
* @description: * @description:
* Blend the bitmap in `new_glyph' into `base_glyph' using the color * Blend the bitmap in `new_glyph` into `base_glyph` using the color
* specified by `color_index'. If `color_index' is 0xFFFF, use * specified by `color_index`. If `color_index` is 0xFFFF, use
* `face->foreground_color' if `face->have_foreground_color' is set. * `face->foreground_color` if `face->have_foreground_color` is set.
* Otherwise check `face->palette_data.palette_flags': If present and * Otherwise check `face->palette_data.palette_flags`: If present and
* @FT_PALETTE_FOR_DARK_BACKGROUND is set, use BGRA value 0xFFFFFFFF * @FT_PALETTE_FOR_DARK_BACKGROUND is set, use BGRA value 0xFFFFFFFF
* (white opaque). Otherwise use BGRA value 0x000000FF (black opaque). * (white opaque). Otherwise use BGRA value 0x000000FF (black opaque).
* *
@ -557,11 +545,11 @@ FT_BEGIN_HEADER
* Color index from the COLR table. * Color index from the COLR table.
* *
* base_glyph :: * base_glyph ::
* Slot for bitmap to be merged into. The underlying * Slot for bitmap to be merged into. The underlying bitmap may get
* bitmap may get reallocated. * reallocated.
* *
* new_glyph :: * new_glyph ::
* Slot to be incooperated into `base_glyph'. * Slot to be incooperated into `base_glyph`.
* *
* @return: * @return:
* FreeType error code. 0 means success. Returns an error if * FreeType error code. 0 means success. Returns an error if
@ -580,8 +568,7 @@ FT_BEGIN_HEADER
* TT_Get_Name_Func * TT_Get_Name_Func
* *
* @description: * @description:
* From the `name' table, return a given ENGLISH name record in * From the 'name' table, return a given ENGLISH name record in ASCII.
* ASCII.
* *
* @input: * @input:
* face :: * face ::
@ -592,8 +579,8 @@ FT_BEGIN_HEADER
* *
* @inout: * @inout:
* name :: * name ::
* The address of an allocated string pointer. NULL if * The address of an allocated string pointer. NULL if no name is
* no name is present. * present.
* *
* @return: * @return:
* FreeType error code. 0 means success. * FreeType error code. 0 means success.
@ -610,8 +597,8 @@ FT_BEGIN_HEADER
* TT_Get_Name_ID_Func * TT_Get_Name_ID_Func
* *
* @description: * @description:
* Search whether an ENGLISH version for a given name ID is in the * Search whether an ENGLISH version for a given name ID is in the 'name'
* `name' table. * table.
* *
* @input: * @input:
* face :: * face ::
@ -622,12 +609,12 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* win :: * win ::
* If non-negative, an index into the `name' table with * If non-negative, an index into the 'name' table with the
* the corresponding (3,1) or (3,0) Windows entry. * corresponding (3,1) or (3,0) Windows entry.
* *
* apple :: * apple ::
* If non-negative, an index into the `name' table with * If non-negative, an index into the 'name' table with the
* the corresponding (1,0) Apple entry. * corresponding (1,0) Apple entry.
* *
* @return: * @return:
* 1 if there is either a win or apple entry (or both), 0 otheriwse. * 1 if there is either a win or apple entry (or both), 0 otheriwse.
@ -658,8 +645,8 @@ FT_BEGIN_HEADER
* FreeType error code. 0 means success. * FreeType error code. 0 means success.
* *
* @note: * @note:
* The function uses `face->goto_table' to seek the stream to the * The function uses `face->goto_table` to seek the stream to the start
* start of the table, except while loading the font directory. * of the table, except while loading the font directory.
*/ */
typedef FT_Error typedef FT_Error
(*TT_Load_Table_Func)( TT_Face face, (*TT_Load_Table_Func)( TT_Face face,
@ -690,8 +677,8 @@ FT_BEGIN_HEADER
* Return the horizontal kerning value between two glyphs. * Return the horizontal kerning value between two glyphs.
* *
* @input: * @input:
* face :: A handle to the source face object. * face :: A handle to the source face object. left_glyph :: The left
* left_glyph :: The left glyph index. * glyph index.
* right_glyph :: The right glyph index. * right_glyph :: The right glyph index.
* *
* @return: * @return:
@ -709,8 +696,8 @@ FT_BEGIN_HEADER
* SFNT_Interface * SFNT_Interface
* *
* @description: * @description:
* This structure holds pointers to the functions used to load and * This structure holds pointers to the functions used to load and free
* free the basic tables that are required in a `sfnt' font file. * the basic tables that are required in a 'sfnt' font file.
* *
* @fields: * @fields:
* Check the various xxx_Func() descriptions for details. * Check the various xxx_Func() descriptions for details.

View File

@ -55,16 +55,14 @@ FT_BEGIN_HEADER
* *
* @fields: * @fields:
* num_chars :: * num_chars ::
* The number of character codes in the encoding. * The number of character codes in the encoding. Usually 256.
* Usually 256.
* *
* code_first :: * code_first ::
* The lowest valid character code in the encoding. * The lowest valid character code in the encoding.
* *
* code_last :: * code_last ::
* The highest valid character code in the encoding * The highest valid character code in the encoding + 1. When equal to
* + 1. When equal to code_first there are no valid * code_first there are no valid character codes.
* character codes.
* *
* char_index :: * char_index ::
* An array of corresponding glyph indices. * An array of corresponding glyph indices.

View File

@ -53,21 +53,20 @@ FT_BEGIN_HEADER
* TTC_HeaderRec * TTC_HeaderRec
* *
* @description: * @description:
* TrueType collection header. This table contains the offsets of * TrueType collection header. This table contains the offsets of the
* the font headers of each distinct TrueType face in the file. * font headers of each distinct TrueType face in the file.
* *
* @fields: * @fields:
* tag :: * tag ::
* Must be `ttc ' to indicate a TrueType collection. * Must be 'ttc ' to indicate a TrueType collection.
* *
* version :: * version ::
* The version number. * The version number.
* *
* count :: * count ::
* The number of faces in the collection. The * The number of faces in the collection. The specification says this
* specification says this should be an unsigned long, but * should be an unsigned long, but we use a signed long since we need
* we use a signed long since we need the value -1 for * the value -1 for specific purposes.
* specific purposes.
* *
* offsets :: * offsets ::
* The offsets of the font headers, one per face. * The offsets of the font headers, one per face.
@ -98,13 +97,13 @@ FT_BEGIN_HEADER
* The number of tables in file. * The number of tables in file.
* *
* search_range :: * search_range ::
* Must be `16 * (max power of 2 <= num_tables)'. * Must be '16 * (max power of 2 <= num_tables)'.
* *
* entry_selector :: * entry_selector ::
* Must be log2 of `search_range / 16'. * Must be log2 of 'search_range / 16'.
* *
* range_shift :: * range_shift ::
* Must be `num_tables * 16 - search_range'. * Must be 'num_tables * 16 - search_range'.
*/ */
typedef struct SFNT_HeaderRec_ typedef struct SFNT_HeaderRec_
{ {
@ -135,8 +134,8 @@ FT_BEGIN_HEADER
* The table checksum. This value can be ignored. * The table checksum. This value can be ignored.
* *
* Offset :: * Offset ::
* The offset of the table from the start of the TrueType * The offset of the table from the start of the TrueType font in its
* font in its resource. * resource.
* *
* Length :: * Length ::
* The table length (in bytes). * The table length (in bytes).
@ -196,8 +195,8 @@ FT_BEGIN_HEADER
* A four-bytes tag describing the table. * A four-bytes tag describing the table.
* *
* Offset :: * Offset ::
* The offset of the table from the start of the WOFF * The offset of the table from the start of the WOFF font in its
* font in its resource. * resource.
* *
* CompLength :: * CompLength ::
* Compressed table length (in bytes). * Compressed table length (in bytes).
@ -209,9 +208,9 @@ FT_BEGIN_HEADER
* The table checksum. This value can be ignored. * The table checksum. This value can be ignored.
* *
* OrigOffset :: * OrigOffset ::
* The uncompressed table file offset. This value gets * The uncompressed table file offset. This value gets computed while
* computed while constructing the (uncompressed) SFNT * constructing the (uncompressed) SFNT header. It is not contained in
* header. It is not contained in the WOFF file. * the WOFF file.
*/ */
typedef struct WOFF_TableRec_ typedef struct WOFF_TableRec_
{ {
@ -232,7 +231,7 @@ FT_BEGIN_HEADER
* TT_LongMetricsRec * TT_LongMetricsRec
* *
* @description: * @description:
* A structure modeling the long metrics of the `hmtx' and `vmtx' * A structure modeling the long metrics of the 'hmtx' and 'vmtx'
* TrueType tables. The values are expressed in font units. * TrueType tables. The values are expressed in font units.
* *
* @fields: * @fields:
@ -256,7 +255,7 @@ FT_BEGIN_HEADER
* TT_ShortMetrics * TT_ShortMetrics
* *
* @description: * @description:
* A simple type to model the short metrics of the `hmtx' and `vmtx' * A simple type to model the short metrics of the 'hmtx' and 'vmtx'
* tables. * tables.
*/ */
typedef FT_Short TT_ShortMetrics; typedef FT_Short TT_ShortMetrics;
@ -268,10 +267,9 @@ FT_BEGIN_HEADER
* TT_NameRec * TT_NameRec
* *
* @description: * @description:
* A structure modeling TrueType name records. Name records are used * A structure modeling TrueType name records. Name records are used to
* to store important strings like family name, style name, * store important strings like family name, style name, copyright,
* copyright, etc. in _localized_ versions (i.e., language, encoding, * etc. in _localized_ versions (i.e., language, encoding, etc).
* etc).
* *
* @fields: * @fields:
* platformID :: * platformID ::
@ -290,11 +288,11 @@ FT_BEGIN_HEADER
* The length of the string in bytes. * The length of the string in bytes.
* *
* stringOffset :: * stringOffset ::
* The offset to the string in the `name' table. * The offset to the string in the 'name' table.
* *
* string :: * string ::
* A pointer to the string's bytes. Note that these * A pointer to the string's bytes. Note that these are usually UTF-16
* are usually UTF-16 encoded characters. * encoded characters.
*/ */
typedef struct TT_NameRec_ typedef struct TT_NameRec_
{ {
@ -319,7 +317,7 @@ FT_BEGIN_HEADER
* TT_LangTagRec * TT_LangTagRec
* *
* @description: * @description:
* A structure modeling language tag records in SFNT `name' tables, * A structure modeling language tag records in SFNT 'name' tables,
* introduced in OpenType version 1.6. * introduced in OpenType version 1.6.
* *
* @fields: * @fields:
@ -327,11 +325,11 @@ FT_BEGIN_HEADER
* The length of the string in bytes. * The length of the string in bytes.
* *
* stringOffset :: * stringOffset ::
* The offset to the string in the `name' table. * The offset to the string in the 'name' table.
* *
* string :: * string ::
* A pointer to the string's bytes. Note that these * A pointer to the string's bytes. Note that these are UTF-16BE
* are UTF-16BE encoded characters. * encoded characters.
*/ */
typedef struct TT_LangTagRec_ typedef struct TT_LangTagRec_
{ {
@ -362,8 +360,7 @@ FT_BEGIN_HEADER
* The number of names in table. * The number of names in table.
* *
* storageOffset :: * storageOffset ::
* The offset of the name table in the `name' * The offset of the name table in the 'name' TrueType table.
* TrueType table.
* *
* names :: * names ::
* An array of name records. * An array of name records.
@ -409,16 +406,16 @@ FT_BEGIN_HEADER
* TT_GaspRangeRec * TT_GaspRangeRec
* *
* @description: * @description:
* A tiny structure used to model a gasp range according to the * A tiny structure used to model a gasp range according to the TrueType
* TrueType specification. * specification.
* *
* @fields: * @fields:
* maxPPEM :: * maxPPEM ::
* The maximum ppem value to which `gaspFlag' applies. * The maximum ppem value to which `gaspFlag` applies.
* *
* gaspFlag :: * gaspFlag ::
* A flag describing the grid-fitting and anti-aliasing * A flag describing the grid-fitting and anti-aliasing modes to be
* modes to be used. * used.
*/ */
typedef struct TT_GaspRangeRec_ typedef struct TT_GaspRangeRec_
{ {
@ -438,7 +435,7 @@ FT_BEGIN_HEADER
* TT_GaspRec * TT_GaspRec
* *
* @description: * @description:
* A structure modeling the TrueType `gasp' table used to specify * A structure modeling the TrueType 'gasp' table used to specify
* grid-fitting and anti-aliasing behaviour. * grid-fitting and anti-aliasing behaviour.
* *
* @fields: * @fields:
@ -479,9 +476,9 @@ FT_BEGIN_HEADER
* TT_SBit_MetricsRec * TT_SBit_MetricsRec
* *
* @description: * @description:
* A structure used to hold the big metrics of a given glyph bitmap * A structure used to hold the big metrics of a given glyph bitmap in a
* in a TrueType or OpenType font. These are usually found in the * TrueType or OpenType font. These are usually found in the 'EBDT'
* `EBDT' (Microsoft) or `bloc' (Apple) table. * (Microsoft) or 'bloc' (Apple) table.
* *
* @fields: * @fields:
* height :: * height ::
@ -530,9 +527,9 @@ FT_BEGIN_HEADER
* TT_SBit_SmallMetricsRec * TT_SBit_SmallMetricsRec
* *
* @description: * @description:
* A structure used to hold the small metrics of a given glyph bitmap * A structure used to hold the small metrics of a given glyph bitmap in
* in a TrueType or OpenType font. These are usually found in the * a TrueType or OpenType font. These are usually found in the 'EBDT'
* `EBDT' (Microsoft) or the `bdat' (Apple) table. * (Microsoft) or the 'bdat' (Apple) table.
* *
* @fields: * @fields:
* height :: * height ::
@ -568,8 +565,8 @@ FT_BEGIN_HEADER
* TT_SBit_LineMetricsRec * TT_SBit_LineMetricsRec
* *
* @description: * @description:
* A structure used to describe the text line metrics of a given * A structure used to describe the text line metrics of a given bitmap
* bitmap strike, for either a horizontal or vertical layout. * strike, for either a horizontal or vertical layout.
* *
* @fields: * @fields:
* ascender :: * ascender ::
@ -582,34 +579,27 @@ FT_BEGIN_HEADER
* The maximum glyph width in pixels. * The maximum glyph width in pixels.
* *
* caret_slope_enumerator :: * caret_slope_enumerator ::
* Rise of the caret slope, typically set * Rise of the caret slope, typically set to 1 for non-italic fonts.
* to 1 for non-italic fonts.
* *
* caret_slope_denominator :: * caret_slope_denominator ::
* Rise of the caret slope, typically set * Rise of the caret slope, typically set to 0 for non-italic fonts.
* to 0 for non-italic fonts.
* *
* caret_offset :: * caret_offset ::
* Offset in pixels to move the caret for * Offset in pixels to move the caret for proper positioning.
* proper positioning.
* *
* min_origin_SB :: * min_origin_SB ::
* Minimum of horiBearingX (resp. * Minimum of horiBearingX (resp. vertBearingY).
* vertBearingY).
* min_advance_SB :: * min_advance_SB ::
* Minimum of * Minimum of
* *
* horizontal advance - * horizontal advance - ( horiBearingX + width )
* ( horiBearingX + width )
* *
* resp. * resp.
* *
* vertical advance - * vertical advance - ( vertBearingY + height )
* ( vertBearingY + height )
* *
* max_before_BL :: * max_before_BL ::
* Maximum of horiBearingY (resp. * Maximum of horiBearingY (resp. vertBearingY).
* vertBearingY).
* *
* min_after_BL :: * min_after_BL ::
* Minimum of * Minimum of
@ -621,8 +611,7 @@ FT_BEGIN_HEADER
* vertBearingX - width * vertBearingX - width
* *
* pads :: * pads ::
* Unused (to make the size of the record * Unused (to make the size of the record a multiple of 32 bits.
* a multiple of 32 bits.
*/ */
typedef struct TT_SBit_LineMetricsRec_ typedef struct TT_SBit_LineMetricsRec_
{ {
@ -647,8 +636,8 @@ FT_BEGIN_HEADER
* TT_SBit_RangeRec * TT_SBit_RangeRec
* *
* @description: * @description:
* A TrueType/OpenType subIndexTable as defined in the `EBLC' * A TrueType/OpenType subIndexTable as defined in the 'EBLC' (Microsoft)
* (Microsoft) or `bloc' (Apple) tables. * or 'bloc' (Apple) tables.
* *
* @fields: * @fields:
* first_glyph :: * first_glyph ::
@ -658,26 +647,25 @@ FT_BEGIN_HEADER
* The last glyph index in the range. * The last glyph index in the range.
* *
* index_format :: * index_format ::
* The format of index table. Valid values are 1 * The format of index table. Valid values are 1 to 5.
* to 5.
* *
* image_format :: * image_format ::
* The format of `EBDT' image data. * The format of 'EBDT' image data.
* *
* image_offset :: * image_offset ::
* The offset to image data in `EBDT'. * The offset to image data in 'EBDT'.
* *
* image_size :: * image_size ::
* For index formats 2 and 5. This is the size in * For index formats 2 and 5. This is the size in bytes of each glyph
* bytes of each glyph bitmap. * bitmap.
* *
* big_metrics :: * big_metrics ::
* For index formats 2 and 5. This is the big * For index formats 2 and 5. This is the big metrics for each glyph
* metrics for each glyph bitmap. * bitmap.
* *
* num_glyphs :: * num_glyphs ::
* For index formats 4 and 5. This is the number of * For index formats 4 and 5. This is the number of glyphs in the code
* glyphs in the code array. * array.
* *
* glyph_offsets :: * glyph_offsets ::
* For index formats 1 and 3. * For index formats 1 and 3.
@ -686,8 +674,8 @@ FT_BEGIN_HEADER
* For index formats 4 and 5. * For index formats 4 and 5.
* *
* table_offset :: * table_offset ::
* The offset of the index table in the `EBLC' * The offset of the index table in the 'EBLC' table. Only used during
* table. Only used during strike loading. * strike loading.
*/ */
typedef struct TT_SBit_RangeRec_ typedef struct TT_SBit_RangeRec_
{ {
@ -716,8 +704,8 @@ FT_BEGIN_HEADER
* TT_SBit_StrikeRec * TT_SBit_StrikeRec
* *
* @description: * @description:
* A structure used describe a given bitmap strike in the `EBLC' * A structure used describe a given bitmap strike in the 'EBLC'
* (Microsoft) or `bloc' (Apple) tables. * (Microsoft) or 'bloc' (Apple) tables.
* *
* @fields: * @fields:
* num_index_ranges :: * num_index_ranges ::
@ -727,10 +715,9 @@ FT_BEGIN_HEADER
* An array of glyph index ranges. * An array of glyph index ranges.
* *
* color_ref :: * color_ref ::
* Unused. `color_ref' is put in for future * Unused. `color_ref` is put in for future enhancements, but these
* enhancements, but these fields are already * fields are already in use by other platforms (e.g. Newton). For
* in use by other platforms (e.g. Newton). * details, please see
* For details, please see
* *
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bloc.html * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bloc.html
* *
@ -753,12 +740,10 @@ FT_BEGIN_HEADER
* The number of vertical pixels per EM. * The number of vertical pixels per EM.
* *
* bit_depth :: * bit_depth ::
* The bit depth. Valid values are 1, 2, 4, * The bit depth. Valid values are 1, 2, 4, and 8.
* and 8.
* *
* flags :: * flags ::
* Is this a vertical or horizontal strike? For * Is this a vertical or horizontal strike? For details, please see
* details, please see
* *
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bloc.html * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6bloc.html
*/ */
@ -818,8 +803,8 @@ FT_BEGIN_HEADER
* TT_SBit_ScaleRec * TT_SBit_ScaleRec
* *
* @description: * @description:
* A structure used describe a given bitmap scaling table, as defined * A structure used describe a given bitmap scaling table, as defined in
* in the `EBSC' table. * the 'EBSC' table.
* *
* @fields: * @fields:
* hori :: * hori ::
@ -873,8 +858,8 @@ FT_BEGIN_HEADER
* TT_Post_20Rec * TT_Post_20Rec
* *
* @description: * @description:
* Postscript names sub-table, format 2.0. Stores the PS name of * Postscript names sub-table, format 2.0. Stores the PS name of each
* each glyph in the font face. * glyph in the font face.
* *
* @fields: * @fields:
* num_glyphs :: * num_glyphs ::
@ -905,16 +890,15 @@ FT_BEGIN_HEADER
* TT_Post_25Rec * TT_Post_25Rec
* *
* @description: * @description:
* Postscript names sub-table, format 2.5. Stores the PS name of * Postscript names sub-table, format 2.5. Stores the PS name of each
* each glyph in the font face. * glyph in the font face.
* *
* @fields: * @fields:
* num_glyphs :: * num_glyphs ::
* The number of glyphs in the table. * The number of glyphs in the table.
* *
* offsets :: * offsets ::
* An array of signed offsets in a normal Mac * An array of signed offsets in a normal Mac Postscript name encoding.
* Postscript name encoding.
*/ */
typedef struct TT_Post_25_ typedef struct TT_Post_25_
{ {
@ -987,25 +971,25 @@ FT_BEGIN_HEADER
/* /*
* These types are used to support a `BDF ' table that isn't part of the * These types are used to support a `BDF ' table that isn't part of the
* official TrueType specification. It is mainly used in SFNT-based * official TrueType specification. It is mainly used in SFNT-based bitmap
* bitmap fonts that were generated from a set of BDF fonts. * fonts that were generated from a set of BDF fonts.
* *
* The format of the table is as follows. * The format of the table is as follows.
* *
* USHORT version `BDF ' table version number, should be 0x0001. * USHORT version `BDF ' table version number, should be 0x0001. USHORT
* USHORT strikeCount Number of strikes (bitmap sizes) in this table. * strikeCount Number of strikes (bitmap sizes) in this table. ULONG
* ULONG stringTable Offset (from start of BDF table) to string * stringTable Offset (from start of BDF table) to string
* table. * table.
* *
* This is followed by an array of `strikeCount' descriptors, having the * This is followed by an array of `strikeCount' descriptors, having the
* following format. * following format.
* *
* USHORT ppem Vertical pixels per EM for this strike. * USHORT ppem Vertical pixels per EM for this strike. USHORT numItems
* USHORT numItems Number of items for this strike (properties and * Number of items for this strike (properties and
* atoms). Maximum is 255. * atoms). Maximum is 255.
* *
* This array in turn is followed by `strikeCount' value sets. Each * This array in turn is followed by `strikeCount' value sets. Each `value
* `value set' is an array of `numItems' items with the following format. * set' is an array of `numItems' items with the following format.
* *
* ULONG item_name Offset in string table to item name. * ULONG item_name Offset in string table to item name.
* USHORT item_type The item type. Possible values are * USHORT item_type The item type. Possible values are
@ -1058,8 +1042,8 @@ FT_BEGIN_HEADER
* This structure/class is defined here because it is common to the * This structure/class is defined here because it is common to the
* following formats: TTF, OpenType-TT, and OpenType-CFF. * following formats: TTF, OpenType-TT, and OpenType-CFF.
* *
* Note, however, that the classes TT_Size and TT_GlyphSlot are not * Note, however, that the classes TT_Size and TT_GlyphSlot are not shared
* shared between font drivers, and are thus defined in `ttobjs.h'. * between font drivers, and are thus defined in `ttobjs.h`.
* *
*/ */
@ -1070,12 +1054,11 @@ FT_BEGIN_HEADER
* TT_Face * TT_Face
* *
* @description: * @description:
* A handle to a TrueType face/font object. A TT_Face encapsulates * A handle to a TrueType face/font object. A TT_Face encapsulates the
* the resolution and scaling independent parts of a TrueType font * resolution and scaling independent parts of a TrueType font resource.
* resource.
* *
* @note: * @note:
* The TT_Face structure is also used as a `parent class' for the * The TT_Face structure is also used as a 'parent class' for the
* OpenType-CFF class (T2_Face). * OpenType-CFF class (T2_Face).
*/ */
typedef struct TT_FaceRec_* TT_Face; typedef struct TT_FaceRec_* TT_Face;
@ -1109,8 +1092,7 @@ FT_BEGIN_HEADER
* *
* @output: * @output:
* length :: * length ::
* The length of the table in bytes. Set to 0 if not * The length of the table in bytes. Set to 0 if not needed.
* needed.
* *
* @return: * @return:
* FreeType error code. 0 means success. * FreeType error code. 0 means success.
@ -1141,8 +1123,7 @@ FT_BEGIN_HEADER
* glyph index :: The index of the glyph to access. * glyph index :: The index of the glyph to access.
* *
* offset :: * offset ::
* The offset of the glyph according to the * The offset of the glyph according to the 'locations' table.
* `locations' table.
* *
* byte_count :: * byte_count ::
* The size of the frame in bytes. * The size of the frame in bytes.
@ -1152,8 +1133,8 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* This function is normally equivalent to FT_STREAM_SEEK(offset) * This function is normally equivalent to FT_STREAM_SEEK(offset)
* followed by FT_FRAME_ENTER(byte_count) with the loader's stream, * followed by FT_FRAME_ENTER(byte_count) with the loader's stream, but
* but alternative formats (e.g. compressed ones) might use something * alternative formats (e.g. compressed ones) might use something
* different. * different.
*/ */
typedef FT_Error typedef FT_Error
@ -1169,8 +1150,8 @@ FT_BEGIN_HEADER
* TT_Loader_ReadGlyphFunc * TT_Loader_ReadGlyphFunc
* *
* @description: * @description:
* Reads one glyph element (its header, a simple glyph, or a * Reads one glyph element (its header, a simple glyph, or a composite)
* composite) from the loader's current stream frame. * from the loader's current stream frame.
* *
* @input: * @input:
* loader :: * loader ::
@ -1254,111 +1235,90 @@ FT_BEGIN_HEADER
* *
* @fields: * @fields:
* root :: * root ::
* The base FT_Face structure, managed by the * The base FT_Face structure, managed by the base layer.
* base layer.
* *
* ttc_header :: * ttc_header ::
* The TrueType collection header, used when * The TrueType collection header, used when the file is a 'ttc' rather
* the file is a `ttc' rather than a `ttf'. * than a 'ttf'. For ordinary font files, the field `ttc_header.count`
* For ordinary font files, the field * is set to 0.
* `ttc_header.count' is set to 0.
* *
* format_tag :: * format_tag ::
* The font format tag. * The font format tag.
* *
* num_tables :: * num_tables ::
* The number of TrueType tables in this font * The number of TrueType tables in this font file.
* file.
* *
* dir_tables :: * dir_tables ::
* The directory of TrueType tables for this * The directory of TrueType tables for this font file.
* font file.
* *
* header :: * header ::
* The font's font header (`head' table). * The font's font header ('head' table). Read on font opening.
* Read on font opening.
* *
* horizontal :: * horizontal ::
* The font's horizontal header (`hhea' * The font's horizontal header ('hhea' table). This field also
* table). This field also contains the * contains the associated horizontal metrics table ('hmtx').
* associated horizontal metrics table
* (`hmtx').
* *
* max_profile :: * max_profile ::
* The font's maximum profile table. Read on * The font's maximum profile table. Read on font opening. Note that
* font opening. Note that some maximum * some maximum values cannot be taken directly from this table. We
* values cannot be taken directly from this * thus define additional fields below to hold the computed maxima.
* table. We thus define additional fields
* below to hold the computed maxima.
* *
* vertical_info :: * vertical_info ::
* A boolean which is set when the font file * A boolean which is set when the font file contains vertical metrics.
* contains vertical metrics. If not, the * If not, the value of the 'vertical' field is undefined.
* value of the `vertical' field is
* undefined.
* *
* vertical :: * vertical ::
* The font's vertical header (`vhea' table). * The font's vertical header ('vhea' table). This field also contains
* This field also contains the associated * the associated vertical metrics table ('vmtx'), if found.
* vertical metrics table (`vmtx'), if found. * IMPORTANT: The contents of this field is undefined if the
* IMPORTANT: The contents of this field is * `vertical_info` field is unset.
* undefined if the `vertical_info' field is
* unset.
* *
* num_names :: * num_names ::
* The number of name records within this * The number of name records within this TrueType font.
* TrueType font.
* *
* name_table :: * name_table ::
* The table of name records (`name'). * The table of name records ('name').
* *
* os2 :: * os2 ::
* The font's OS/2 table (`OS/2'). * The font's OS/2 table ('OS/2').
* *
* postscript :: * postscript ::
* The font's PostScript table (`post' * The font's PostScript table ('post' table). The PostScript glyph
* table). The PostScript glyph names are * names are not loaded by the driver on face opening. See the
* not loaded by the driver on face opening. * 'ttpost' module for more details.
* See the `ttpost' module for more details.
* *
* cmap_table :: * cmap_table ::
* Address of the face's `cmap' SFNT table * Address of the face's 'cmap' SFNT table in memory (it's an extracted
* in memory (it's an extracted frame). * frame).
* *
* cmap_size :: * cmap_size ::
* The size in bytes of the `cmap_table' * The size in bytes of the `cmap_table` described above.
* described above.
* *
* goto_table :: * goto_table ::
* A function called by each TrueType table * A function called by each TrueType table loader to position a
* loader to position a stream's cursor to * stream's cursor to the start of a given table according to its tag.
* the start of a given table according to * It defaults to TT_Goto_Face but can be different for strange formats
* its tag. It defaults to TT_Goto_Face but * (e.g. Type 42).
* can be different for strange formats (e.g.
* Type 42).
* *
* access_glyph_frame :: * access_glyph_frame ::
* A function used to access the frame of a * A function used to access the frame of a given glyph within the
* given glyph within the face's font file. * face's font file.
* *
* forget_glyph_frame :: * forget_glyph_frame ::
* A function used to forget the frame of a * A function used to forget the frame of a given glyph when all data
* given glyph when all data has been loaded. * has been loaded.
* *
* read_glyph_header :: * read_glyph_header ::
* A function used to read a glyph header. * A function used to read a glyph header. It must be called between
* It must be called between an `access' and * an 'access' and 'forget'.
* `forget'.
* *
* read_simple_glyph :: * read_simple_glyph ::
* A function used to read a simple glyph. * A function used to read a simple glyph. It must be called after the
* It must be called after the header was * header was read, and before the 'forget'.
* read, and before the `forget'.
* *
* read_composite_glyph :: * read_composite_glyph ::
* A function used to read a composite glyph. * A function used to read a composite glyph. It must be called after
* It must be called after the header was * the header was read, and before the 'forget'.
* read, and before the `forget'.
* *
* sfnt :: * sfnt ::
* A pointer to the SFNT service. * A pointer to the SFNT service.
@ -1370,38 +1330,33 @@ FT_BEGIN_HEADER
* A pointer to the Multiple Masters service. * A pointer to the Multiple Masters service.
* *
* var :: * var ::
* A pointer to the Metrics Variations * A pointer to the Metrics Variations service.
* service.
* *
* hdmx :: * hdmx ::
* The face's horizontal device metrics * The face's horizontal device metrics ('hdmx' table). This table is
* (`hdmx' table). This table is optional in * optional in TrueType/OpenType fonts.
* TrueType/OpenType fonts.
* *
* gasp :: * gasp ::
* The grid-fitting and scaling properties * The grid-fitting and scaling properties table ('gasp'). This table
* table (`gasp'). This table is optional in * is optional in TrueType/OpenType fonts.
* TrueType/OpenType fonts.
* *
* pclt :: * pclt ::
* The `pclt' SFNT table. * The 'pclt' SFNT table.
* *
* num_sbit_scales :: * num_sbit_scales ::
* The number of sbit scales for this font. * The number of sbit scales for this font.
* *
* sbit_scales :: * sbit_scales ::
* Array of sbit scales embedded in this * Array of sbit scales embedded in this font. This table is optional
* font. This table is optional in a * in a TrueType/OpenType font.
* TrueType/OpenType font.
* *
* postscript_names :: * postscript_names ::
* A table used to store the Postscript names * A table used to store the Postscript names of the glyphs for this
* of the glyphs for this font. See the * font. See the file `ttconfig.h` for comments on the
* file `ttconfig.h' for comments on the
* TT_CONFIG_OPTION_POSTSCRIPT_NAMES option. * TT_CONFIG_OPTION_POSTSCRIPT_NAMES option.
* *
* palette_data :: * palette_data ::
* Some fields from the `CPAL' table that are directly indexed. * Some fields from the 'CPAL' table that are directly indexed.
* *
* palette_index :: * palette_index ::
* The current palette index, as set by @FT_Palette_Select. * The current palette index, as set by @FT_Palette_Select.
@ -1413,109 +1368,95 @@ FT_BEGIN_HEADER
* There was a call to @FT_Palette_Set_Foreground_Color. * There was a call to @FT_Palette_Set_Foreground_Color.
* *
* foreground_color :: * foreground_color ::
* The current foreground color corresponding to `CPAL' color index * The current foreground color corresponding to 'CPAL' color index
* 0xFFFF. Only valid if `have_foreground_color' is set. * 0xFFFF. Only valid if `have_foreground_color` is set.
* *
* font_program_size :: * font_program_size ::
* Size in bytecodes of the face's font * Size in bytecodes of the face's font program. 0 if none defined.
* program. 0 if none defined. Ignored for
* Type 2 fonts.
*
* font_program ::
* The face's font program (bytecode stream)
* executed at load time, also used during
* glyph rendering. Comes from the `fpgm'
* table. Ignored for Type 2 font fonts.
*
* cvt_program_size ::
* The size in bytecodes of the face's cvt
* program. Ignored for Type 2 fonts.
*
* cvt_program ::
* The face's cvt program (bytecode stream)
* executed each time an instance/size is
* changed/reset. Comes from the `prep'
* table. Ignored for Type 2 fonts.
*
* cvt_size ::
* Size of the control value table (in
* entries). Ignored for Type 2 fonts.
*
* cvt ::
* The face's original control value table.
* Coordinates are expressed in unscaled font
* units. Comes from the `cvt ' table.
* Ignored for Type 2 fonts. * Ignored for Type 2 fonts.
* *
* font_program ::
* The face's font program (bytecode stream) executed at load time,
* also used during glyph rendering. Comes from the 'fpgm' table.
* Ignored for Type 2 font fonts.
*
* cvt_program_size ::
* The size in bytecodes of the face's cvt program. Ignored for Type 2
* fonts.
*
* cvt_program ::
* The face's cvt program (bytecode stream) executed each time an
* instance/size is changed/reset. Comes from the 'prep' table.
* Ignored for Type 2 fonts.
*
* cvt_size ::
* Size of the control value table (in entries). Ignored for Type 2
* fonts.
*
* cvt ::
* The face's original control value table. Coordinates are expressed
* in unscaled font units. Comes from the 'cvt ' table. Ignored for
* Type 2 fonts.
*
* interpreter :: * interpreter ::
* A pointer to the TrueType bytecode * A pointer to the TrueType bytecode interpreters field is also used
* interpreters field is also used to hook * to hook the debugger in 'ttdebug'.
* the debugger in `ttdebug'.
* *
* extra :: * extra ::
* Reserved for third-party font drivers. * Reserved for third-party font drivers.
* *
* postscript_name :: * postscript_name ::
* The PS name of the font. Used by the * The PS name of the font. Used by the postscript name service.
* postscript name service.
* *
* glyf_len :: * glyf_len ::
* The length of the `glyf' table. Needed * The length of the 'glyf' table. Needed for malformed 'loca' tables.
* for malformed `loca' tables.
* *
* glyf_offset :: * glyf_offset ::
* The file offset of the `glyf' table. * The file offset of the 'glyf' table.
* *
* is_cff2 :: * is_cff2 ::
* Set if the font format is CFF2. * Set if the font format is CFF2.
* *
* doblend :: * doblend ::
* A boolean which is set if the font should * A boolean which is set if the font should be blended (this is for GX
* be blended (this is for GX var). * var).
* *
* blend :: * blend ::
* Contains the data needed to control GX * Contains the data needed to control GX variation tables (rather like
* variation tables (rather like Multiple * Multiple Master data).
* Master data).
* *
* variation_support :: * variation_support ::
* Flags that indicate which OpenType * Flags that indicate which OpenType functionality related to font
* functionality related to font variation * variation support is present, valid, and usable. For example,
* support is present, valid, and usable. * TT_FACE_FLAG_VAR_FVAR is only set if we have at least one design
* For example, TT_FACE_FLAG_VAR_FVAR is only * axis.
* set if we have at least one design axis.
* *
* var_postscript_prefix :: * var_postscript_prefix ::
* The PostScript name prefix needed for * The PostScript name prefix needed for constructing a variation font
* constructing a variation font instance's * instance's PS name .
* PS name .
* *
* var_postscript_prefix_len :: * var_postscript_prefix_len ::
* The length of the `var_postscript_prefix' * The length of the `var_postscript_prefix` string.
* string.
* *
* horz_metrics_size :: * horz_metrics_size ::
* The size of the `hmtx' table. * The size of the 'hmtx' table.
* *
* vert_metrics_size :: * vert_metrics_size ::
* The size of the `vmtx' table. * The size of the 'vmtx' table.
* *
* num_locations :: * num_locations ::
* The number of glyph locations in this * The number of glyph locations in this TrueType file. This should be
* TrueType file. This should be * identical to the number of glyphs. Ignored for Type 2 fonts.
* identical to the number of glyphs.
* Ignored for Type 2 fonts.
* *
* glyph_locations :: * glyph_locations ::
* An array of longs. These are offsets to * An array of longs. These are offsets to glyph data within the
* glyph data within the `glyf' table. * 'glyf' table. Ignored for Type 2 font faces.
* Ignored for Type 2 font faces.
* *
* hdmx_table :: * hdmx_table ::
* A pointer to the `hdmx' table. * A pointer to the 'hdmx' table.
* *
* hdmx_table_size :: * hdmx_table_size ::
* The size of the `hdmx' table. * The size of the 'hdmx' table.
* *
* hdmx_record_count :: * hdmx_record_count ::
* The number of hdmx records. * The number of hdmx records.
@ -1524,79 +1465,70 @@ FT_BEGIN_HEADER
* The size of a single hdmx record. * The size of a single hdmx record.
* *
* hdmx_record_sizes :: * hdmx_record_sizes ::
* An array holding the ppem sizes available * An array holding the ppem sizes available in the 'hdmx' table.
* in the `hdmx' table.
* *
* sbit_table :: * sbit_table ::
* A pointer to the font's embedded bitmap * A pointer to the font's embedded bitmap location table.
* location table.
* *
* sbit_table_size :: * sbit_table_size ::
* The size of `sbit_table'. * The size of `sbit_table`.
* *
* sbit_table_type :: * sbit_table_type ::
* The sbit table type (CBLC, sbix, etc.). * The sbit table type (CBLC, sbix, etc.).
* *
* sbit_num_strikes :: * sbit_num_strikes ::
* The number of sbit strikes exposed by * The number of sbit strikes exposed by FreeType's API, omitting
* FreeType's API, omitting invalid strikes. * invalid strikes.
* *
* sbit_strike_map :: * sbit_strike_map ::
* A mapping between the strike indices * A mapping between the strike indices exposed by the API and the
* exposed by the API and the indices used in * indices used in the font's sbit table.
* the font's sbit table.
* *
* cpal :: * cpal ::
* A pointer to data related to the `CPAL' table. NULL if the table * A pointer to data related to the 'CPAL' table. NULL if the table is
* is not available. * not available.
* *
* colr :: * colr ::
* A pointer to data related to the `COLR' table. NULL if the table * A pointer to data related to the 'COLR' table. NULL if the table is
* is not available. * not available.
* *
* kern_table :: * kern_table ::
* A pointer to the `kern' table. * A pointer to the 'kern' table.
* *
* kern_table_size :: * kern_table_size ::
* The size of the `kern' table. * The size of the 'kern' table.
* *
* num_kern_tables :: * num_kern_tables ::
* The number of supported kern subtables * The number of supported kern subtables (up to 32; FreeType
* (up to 32; FreeType recognizes only * recognizes only horizontal ones with format 0).
* horizontal ones with format 0).
* *
* kern_avail_bits :: * kern_avail_bits ::
* The availability status of kern subtables; * The availability status of kern subtables; if bit n is set, table n
* if bit n is set, table n is available. * is available.
* *
* kern_order_bits :: * kern_order_bits ::
* The sortedness status of kern subtables; * The sortedness status of kern subtables; if bit n is set, table n is
* if bit n is set, table n is sorted. * sorted.
* *
* bdf :: * bdf ::
* Data related to an SFNT font's `bdf' * Data related to an SFNT font's 'bdf' table; see `tttypes.h`.
* table; see `tttypes.h'.
* *
* horz_metrics_offset :: * horz_metrics_offset ::
* The file offset of the `hmtx' table. * The file offset of the 'hmtx' table.
* *
* vert_metrics_offset :: * vert_metrics_offset ::
* The file offset of the `vmtx' table. * The file offset of the 'vmtx' table.
* *
* sph_found_func_flags :: * sph_found_func_flags ::
* Flags identifying special bytecode * Flags identifying special bytecode functions (used by the v38
* functions (used by the v38 implementation * implementation of the bytecode interpreter).
* of the bytecode interpreter).
* *
* sph_compatibility_mode :: * sph_compatibility_mode ::
* This flag is set if we are in ClearType * This flag is set if we are in ClearType backward compatibility mode
* backward compatibility mode (used by the * (used by the v38 implementation of the bytecode interpreter).
* v38 implementation of the bytecode
* interpreter).
* *
* ebdt_start :: * ebdt_start ::
* The file offset of the sbit data table * The file offset of the sbit data table (CBDT, bdat, etc.).
* (CBDT, bdat, etc.).
* *
* ebdt_size :: * ebdt_size ::
* The size of the sbit data table. * The size of the sbit data table.
@ -1815,8 +1747,7 @@ FT_BEGIN_HEADER
* The current number of contours in the zone. * The current number of contours in the zone.
* *
* org :: * org ::
* The original glyph coordinates (font * The original glyph coordinates (font units/scaled).
* units/scaled).
* *
* cur :: * cur ::
* The current glyph coordinates (scaled/hinted). * The current glyph coordinates (scaled/hinted).

View File

@ -118,9 +118,8 @@ FT_BEGIN_HEADER
* T1_FontInfo * T1_FontInfo
* *
* @description: * @description:
* This type is equivalent to @PS_FontInfoRec. It is deprecated but * This type is equivalent to @PS_FontInfoRec. It is deprecated but kept
* kept to maintain source compatibility between various versions of * to maintain source compatibility between various versions of FreeType.
* FreeType.
*/ */
typedef PS_FontInfoRec T1_FontInfo; typedef PS_FontInfoRec T1_FontInfo;
@ -131,9 +130,9 @@ FT_BEGIN_HEADER
* PS_PrivateRec * PS_PrivateRec
* *
* @description: * @description:
* A structure used to model a Type~1 or Type~2 private dictionary. * A structure used to model a Type~1 or Type~2 private dictionary. Note
* Note that for Multiple Master fonts, each instance has its own * that for Multiple Master fonts, each instance has its own Private
* Private dictionary. * dictionary.
*/ */
typedef struct PS_PrivateRec_ typedef struct PS_PrivateRec_
{ {
@ -193,9 +192,8 @@ FT_BEGIN_HEADER
* T1_Private * T1_Private
* *
* @description: * @description:
* This type is equivalent to @PS_PrivateRec. It is deprecated but * This type is equivalent to @PS_PrivateRec. It is deprecated but kept
* kept to maintain source compatibility between various versions of * to maintain source compatibility between various versions of FreeType.
* FreeType.
*/ */
typedef PS_PrivateRec T1_Private; typedef PS_PrivateRec T1_Private;
@ -206,9 +204,9 @@ FT_BEGIN_HEADER
* T1_Blend_Flags * T1_Blend_Flags
* *
* @description: * @description:
* A set of flags used to indicate which fields are present in a * A set of flags used to indicate which fields are present in a given
* given blend dictionary (font info or private). Used to support * blend dictionary (font info or private). Used to support Multiple
* Multiple Masters fonts. * Masters fonts.
* *
* @values: * @values:
* T1_BLEND_UNDERLINE_POSITION :: * T1_BLEND_UNDERLINE_POSITION ::
@ -337,14 +335,14 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* A structure used to represent data in a CID top-level dictionary. In * A structure used to represent data in a CID top-level dictionary. In
* most cases, they are part of the font's `/FDArray' array. Within a * most cases, they are part of the font's '/FDArray' array. Within a
* CID font file, such (internal) subfont dictionaries are enclosed by * CID font file, such (internal) subfont dictionaries are enclosed by
* `%ADOBeginFontDict' and `%ADOEndFontDict' comments. * '%ADOBeginFontDict' and '%ADOEndFontDict' comments.
* *
* Note that `CID_FaceDictRec' misses a field for the `/FontName' * Note that `CID_FaceDictRec` misses a field for the '/FontName'
* keyword, specifying the subfont's name (the top-level font name is * keyword, specifying the subfont's name (the top-level font name is
* given by the `/CIDFontName' keyword). This is an oversight, but it * given by the '/CIDFontName' keyword). This is an oversight, but it
* doesn't limit the `cid' font module's functionality because FreeType * doesn't limit the 'cid' font module's functionality because FreeType
* neither needs this entry nor gives access to CID subfonts. * neither needs this entry nor gives access to CID subfonts.
*/ */
typedef struct CID_FaceDictRec_ typedef struct CID_FaceDictRec_
@ -447,9 +445,8 @@ FT_BEGIN_HEADER
* CID_Info * CID_Info
* *
* @description: * @description:
* This type is equivalent to @CID_FaceInfoRec. It is deprecated but * This type is equivalent to @CID_FaceInfoRec. It is deprecated but kept
* kept to maintain source compatibility between various versions of * to maintain source compatibility between various versions of FreeType.
* FreeType.
*/ */
typedef CID_FaceInfoRec CID_Info; typedef CID_FaceInfoRec CID_Info;
@ -460,10 +457,9 @@ FT_BEGIN_HEADER
* FT_Has_PS_Glyph_Names * FT_Has_PS_Glyph_Names
* *
* @description: * @description:
* Return true if a given face provides reliable PostScript glyph * Return true if a given face provides reliable PostScript glyph names.
* names. This is similar to using the @FT_HAS_GLYPH_NAMES macro, * This is similar to using the @FT_HAS_GLYPH_NAMES macro, except that
* except that certain fonts (mostly TrueType) contain incorrect * certain fonts (mostly TrueType) contain incorrect glyph name tables.
* glyph name tables.
* *
* When this function returns true, the caller is sure that the glyph * When this function returns true, the caller is sure that the glyph
* names returned by @FT_Get_Glyph_Name are reliable. * names returned by @FT_Get_Glyph_Name are reliable.
@ -501,12 +497,12 @@ FT_BEGIN_HEADER
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
* *
* @note: * @note:
* String pointers within the @PS_FontInfoRec structure are owned by * String pointers within the @PS_FontInfoRec structure are owned by the
* the face and don't need to be freed by the caller. Missing entries * face and don't need to be freed by the caller. Missing entries in
* in the font's FontInfo dictionary are represented by NULL pointers. * the font's FontInfo dictionary are represented by NULL pointers.
* *
* If the font's format is not PostScript-based, this function will * If the font's format is not PostScript-based, this function will
* return the `FT_Err_Invalid_Argument' error code. * return the `FT_Err_Invalid_Argument` error code.
* *
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
@ -539,7 +535,7 @@ FT_BEGIN_HEADER
* the face and don't need to be freed by the caller. * the face and don't need to be freed by the caller.
* *
* If the font's format is not PostScript-based, this function returns * If the font's format is not PostScript-based, this function returns
* the `FT_Err_Invalid_Argument' error code. * the `FT_Err_Invalid_Argument` error code.
* *
*/ */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
@ -553,8 +549,7 @@ FT_BEGIN_HEADER
* T1_EncodingType * T1_EncodingType
* *
* @description: * @description:
* An enumeration describing the `Encoding' entry in a Type 1 * An enumeration describing the 'Encoding' entry in a Type 1 dictionary.
* dictionary.
* *
* @values: * @values:
* T1_ENCODING_TYPE_NONE :: * T1_ENCODING_TYPE_NONE ::
@ -583,8 +578,8 @@ FT_BEGIN_HEADER
* PS_Dict_Keys * PS_Dict_Keys
* *
* @description: * @description:
* An enumeration used in calls to @FT_Get_PS_Font_Value to identify * An enumeration used in calls to @FT_Get_PS_Font_Value to identify the
* the Type~1 dictionary entry to retrieve. * Type~1 dictionary entry to retrieve.
* *
* @values: * @values:
* PS_DICT_FONT_TYPE :: * PS_DICT_FONT_TYPE ::
@ -725,38 +720,38 @@ FT_BEGIN_HEADER
* The value matching the above key, if it exists. * The value matching the above key, if it exists.
* *
* @return: * @return:
* The amount of memory (in bytes) required to hold the requested * The amount of memory (in bytes) required to hold the requested value
* value (if it exists, -1 otherwise). * (if it exists, -1 otherwise).
* *
* @note: * @note:
* The values returned are not pointers into the internal structures of * The values returned are not pointers into the internal structures of
* the face, but are `fresh' copies, so that the memory containing them * the face, but are 'fresh' copies, so that the memory containing them
* belongs to the calling application. This also enforces the * belongs to the calling application. This also enforces the
* `read-only' nature of these values, i.e., this function cannot be * 'read-only' nature of these values, i.e., this function cannot be
* used to manipulate the face. * used to manipulate the face.
* *
* `value' is a void pointer because the values returned can be of * 'value' is a void pointer because the values returned can be of
* various types. * various types.
* *
* If either `value' is NULL or `value_len' is too small, just the * If either 'value' is NULL or `value_len` is too small, just the
* required memory size for the requested entry is returned. * required memory size for the requested entry is returned.
* *
* The `idx' parameter is used, not only to retrieve elements of, for * The 'idx' parameter is used, not only to retrieve elements of, for
* example, the FontMatrix or FontBBox, but also to retrieve name keys * example, the FontMatrix or FontBBox, but also to retrieve name keys
* from the CharStrings dictionary, and the charstrings themselves. It * from the CharStrings dictionary, and the charstrings themselves. It
* is ignored for atomic values. * is ignored for atomic values.
* *
* PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To * PS_DICT_BLUE_SCALE returns a value that is scaled up by 1000. To get
* get the value as in the font stream, you need to divide by * the value as in the font stream, you need to divide by 65536000.0 (to
* 65536000.0 (to remove the FT_Fixed scale, and the x1000 scale). * remove the FT_Fixed scale, and the x1000 scale).
* *
* IMPORTANT: Only key/value pairs read by the FreeType interpreter can * IMPORTANT: Only key/value pairs read by the FreeType interpreter can
* be retrieved. So, for example, PostScript procedures such as NP, * be retrieved. So, for example, PostScript procedures such as NP, ND,
* ND, and RD are not available. Arbitrary keys are, obviously, not be * and RD are not available. Arbitrary keys are, obviously, not be
* available either. * available either.
* *
* If the font's format is not PostScript-based, this function returns * If the font's format is not PostScript-based, this function returns
* the `FT_Err_Invalid_Argument' error code. * the `FT_Err_Invalid_Argument` error code.
* *
* @since: * @since:
* 2.4.8 * 2.4.8

View File

@ -35,8 +35,8 @@ FT_BEGIN_HEADER
/************************************************************************** /**************************************************************************
* *
* Possible values for the `platform' identifier code in the name * Possible values for the 'platform' identifier code in the name records
* records of an SFNT `name' table. * of an SFNT 'name' table.
* *
*/ */
@ -47,30 +47,31 @@ FT_BEGIN_HEADER
* TT_PLATFORM_XXX * TT_PLATFORM_XXX
* *
* @description: * @description:
* A list of valid values for the `platform_id' identifier code in * A list of valid values for the `platform_id` identifier code in
* @FT_CharMapRec and @FT_SfntName structures. * @FT_CharMapRec and @FT_SfntName structures.
* *
* @values: * @values:
* TT_PLATFORM_APPLE_UNICODE :: * TT_PLATFORM_APPLE_UNICODE ::
* Used by Apple to indicate a Unicode character map and/or name entry. * Used by Apple to indicate a Unicode character map and/or name entry.
* See @TT_APPLE_ID_XXX for corresponding `encoding_id' values. Note * See @TT_APPLE_ID_XXX for corresponding `encoding_id` values. Note
* that name entries in this format are coded as big-endian UCS-2 * that name entries in this format are coded as big-endian UCS-2
* character codes _only_. * character codes _only_.
* *
* TT_PLATFORM_MACINTOSH :: * TT_PLATFORM_MACINTOSH ::
* Used by Apple to indicate a MacOS-specific charmap and/or name entry. * Used by Apple to indicate a MacOS-specific charmap and/or name
* See @TT_MAC_ID_XXX for corresponding `encoding_id' values. Note that * entry. See @TT_MAC_ID_XXX for corresponding `encoding_id` values.
* most TrueType fonts contain an Apple roman charmap to be usable on * Note that most TrueType fonts contain an Apple roman charmap to be
* MacOS systems (even if they contain a Microsoft charmap as well). * usable on MacOS systems (even if they contain a Microsoft charmap as
* well).
* *
* TT_PLATFORM_ISO :: * TT_PLATFORM_ISO ::
* This value was used to specify ISO/IEC 10646 charmaps. It is however * This value was used to specify ISO/IEC 10646 charmaps. It is
* now deprecated. See @TT_ISO_ID_XXX for a list of corresponding * however now deprecated. See @TT_ISO_ID_XXX for a list of
* `encoding_id' values. * corresponding `encoding_id` values.
* *
* TT_PLATFORM_MICROSOFT :: * TT_PLATFORM_MICROSOFT ::
* Used by Microsoft to indicate Windows-specific charmaps. See * Used by Microsoft to indicate Windows-specific charmaps. See
* @TT_MS_ID_XXX for a list of corresponding `encoding_id' values. * @TT_MS_ID_XXX for a list of corresponding `encoding_id` values.
* Note that most fonts contain a Unicode charmap using * Note that most fonts contain a Unicode charmap using
* (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS). * (TT_PLATFORM_MICROSOFT, @TT_MS_ID_UNICODE_CS).
* *
@ -97,7 +98,7 @@ FT_BEGIN_HEADER
* TT_APPLE_ID_XXX * TT_APPLE_ID_XXX
* *
* @description: * @description:
* A list of valid values for the `encoding_id' for * A list of valid values for the `encoding_id` for
* @TT_PLATFORM_APPLE_UNICODE charmaps and name entries. * @TT_PLATFORM_APPLE_UNICODE charmaps and name entries.
* *
* @values: * @values:
@ -117,8 +118,8 @@ FT_BEGIN_HEADER
* Unicode 3.1 and beyond, using UTF-32. * Unicode 3.1 and beyond, using UTF-32.
* *
* TT_APPLE_ID_VARIANT_SELECTOR :: * TT_APPLE_ID_VARIANT_SELECTOR ::
* From Adobe, not Apple. Not a normal cmap. Specifies variations * From Adobe, not Apple. Not a normal cmap. Specifies variations on
* on a real cmap. * a real cmap.
* *
* TT_APPLE_ID_FULL_UNICODE :: * TT_APPLE_ID_FULL_UNICODE ::
* Used for fallback fonts that provide complete Unicode coverage with * Used for fallback fonts that provide complete Unicode coverage with
@ -140,7 +141,7 @@ FT_BEGIN_HEADER
* TT_MAC_ID_XXX * TT_MAC_ID_XXX
* *
* @description: * @description:
* A list of valid values for the `encoding_id' for * A list of valid values for the `encoding_id` for
* @TT_PLATFORM_MACINTOSH charmaps and name entries. * @TT_PLATFORM_MACINTOSH charmaps and name entries.
*/ */
@ -186,8 +187,8 @@ FT_BEGIN_HEADER
* TT_ISO_ID_XXX * TT_ISO_ID_XXX
* *
* @description: * @description:
* A list of valid values for the `encoding_id' for * A list of valid values for the `encoding_id` for @TT_PLATFORM_ISO
* @TT_PLATFORM_ISO charmaps and name entries. * charmaps and name entries.
* *
* Their use is now deprecated. * Their use is now deprecated.
* *
@ -211,7 +212,7 @@ FT_BEGIN_HEADER
* TT_MS_ID_XXX * TT_MS_ID_XXX
* *
* @description: * @description:
* A list of valid values for the `encoding_id' for * A list of valid values for the `encoding_id` for
* @TT_PLATFORM_MICROSOFT charmaps and name entries. * @TT_PLATFORM_MICROSOFT charmaps and name entries.
* *
* @values: * @values:
@ -219,16 +220,15 @@ FT_BEGIN_HEADER
* Microsoft symbol encoding. See @FT_ENCODING_MS_SYMBOL. * Microsoft symbol encoding. See @FT_ENCODING_MS_SYMBOL.
* *
* TT_MS_ID_UNICODE_CS :: * TT_MS_ID_UNICODE_CS ::
* Microsoft WGL4 charmap, matching Unicode. See * Microsoft WGL4 charmap, matching Unicode. See @FT_ENCODING_UNICODE.
* @FT_ENCODING_UNICODE.
* *
* TT_MS_ID_SJIS :: * TT_MS_ID_SJIS ::
* Shift JIS Japanese encoding. See @FT_ENCODING_SJIS. * Shift JIS Japanese encoding. See @FT_ENCODING_SJIS.
* *
* TT_MS_ID_PRC :: * TT_MS_ID_PRC ::
* Chinese encodings as used in the People's Republic of China (PRC). * Chinese encodings as used in the People's Republic of China (PRC).
* This means the encodings GB~2312 and its supersets GBK and * This means the encodings GB~2312 and its supersets GBK and GB~18030.
* GB~18030. See @FT_ENCODING_PRC. * See @FT_ENCODING_PRC.
* *
* TT_MS_ID_BIG_5 :: * TT_MS_ID_BIG_5 ::
* Traditional Chinese as used in Taiwan and Hong Kong. See * Traditional Chinese as used in Taiwan and Hong Kong. See
@ -264,8 +264,8 @@ FT_BEGIN_HEADER
* TT_ADOBE_ID_XXX * TT_ADOBE_ID_XXX
* *
* @description: * @description:
* A list of valid values for the `encoding_id' for * A list of valid values for the `encoding_id` for @TT_PLATFORM_ADOBE
* @TT_PLATFORM_ADOBE charmaps. This is a FreeType-specific extension! * charmaps. This is a FreeType-specific extension!
* *
* @values: * @values:
* TT_ADOBE_ID_STANDARD :: * TT_ADOBE_ID_STANDARD ::
@ -291,7 +291,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Possible values of the language identifier field in the name records * Possible values of the language identifier field in the name records
* of the SFNT `name' table if the `platform' identifier code is * of the SFNT 'name' table if the 'platform' identifier code is
* @TT_PLATFORM_MACINTOSH. These values are also used as return values * @TT_PLATFORM_MACINTOSH. These values are also used as return values
* for function @FT_Get_CMap_Language_ID. * for function @FT_Get_CMap_Language_ID.
* *
@ -431,7 +431,7 @@ FT_BEGIN_HEADER
* *
* @description: * @description:
* Possible values of the language identifier field in the name records * Possible values of the language identifier field in the name records
* of the SFNT `name' table if the `platform' identifier code is * of the SFNT 'name' table if the 'platform' identifier code is
* @TT_PLATFORM_MICROSOFT. These values are also used as return values * @TT_PLATFORM_MICROSOFT. These values are also used as return values
* for function @FT_Get_CMap_Language_ID. * for function @FT_Get_CMap_Language_ID.
* *
@ -441,7 +441,7 @@ FT_BEGIN_HEADER
* *
* however, we only provide macros for language identifiers present in * however, we only provide macros for language identifiers present in
* the OpenType specification: Microsoft has abandoned the concept of * the OpenType specification: Microsoft has abandoned the concept of
* LCIDs (language code identifiers), and format~1 of the `name' table * LCIDs (language code identifiers), and format~1 of the 'name' table
* provides a better mechanism for languages not covered here. * provides a better mechanism for languages not covered here.
* *
* More legacy values not listed in the reference can be found in the * More legacy values not listed in the reference can be found in the
@ -786,8 +786,8 @@ FT_BEGIN_HEADER
* TT_NAME_ID_XXX * TT_NAME_ID_XXX
* *
* @description: * @description:
* Possible values of the `name' identifier field in the name records of * Possible values of the 'name' identifier field in the name records of
* an SFNT `name' table. These values are platform independent. * an SFNT 'name' table. These values are platform independent.
*/ */
#define TT_NAME_ID_COPYRIGHT 0 #define TT_NAME_ID_COPYRIGHT 0
@ -840,8 +840,8 @@ FT_BEGIN_HEADER
* TT_UCR_XXX * TT_UCR_XXX
* *
* @description: * @description:
* Possible bit mask values for the `ulUnicodeRangeX' fields in an SFNT * Possible bit mask values for the `ulUnicodeRangeX` fields in an SFNT
* `OS/2' table. * 'OS/2' table.
*/ */
/* ulUnicodeRange1 */ /* ulUnicodeRange1 */

View File

@ -77,8 +77,8 @@ FT_BEGIN_HEADER
* TT_Header * TT_Header
* *
* @description: * @description:
* A structure to model a TrueType font header table. All fields * A structure to model a TrueType font header table. All fields follow
* follow the OpenType specification. * the OpenType specification.
*/ */
typedef struct TT_Header_ typedef struct TT_Header_
{ {
@ -115,76 +115,61 @@ FT_BEGIN_HEADER
* TT_HoriHeader * TT_HoriHeader
* *
* @description: * @description:
* A structure to model a TrueType horizontal header, the `hhea' * A structure to model a TrueType horizontal header, the 'hhea' table,
* table, as well as the corresponding horizontal metrics table, * as well as the corresponding horizontal metrics table, 'hmtx'.
* `hmtx'.
* *
* @fields: * @fields:
* Version :: * Version ::
* The table version. * The table version.
* *
* Ascender :: * Ascender ::
* The font's ascender, i.e., the distance * The font's ascender, i.e., the distance from the baseline to the
* from the baseline to the top-most of all * top-most of all glyph points found in the font.
* glyph points found in the font.
* *
* This value is invalid in many fonts, as * This value is invalid in many fonts, as it is usually set by the
* it is usually set by the font designer, * font designer, and often reflects only a portion of the glyphs found
* and often reflects only a portion of the * in the font (maybe ASCII).
* glyphs found in the font (maybe ASCII).
* *
* You should use the `sTypoAscender' field * You should use the `sTypoAscender` field of the 'OS/2' table instead
* of the `OS/2' table instead if you want * if you want the correct one.
* the correct one.
* *
* Descender :: * Descender ::
* The font's descender, i.e., the distance * The font's descender, i.e., the distance from the baseline to the
* from the baseline to the bottom-most of * bottom-most of all glyph points found in the font. It is negative.
* all glyph points found in the font. It
* is negative.
* *
* This value is invalid in many fonts, as * This value is invalid in many fonts, as it is usually set by the
* it is usually set by the font designer, * font designer, and often reflects only a portion of the glyphs found
* and often reflects only a portion of the * in the font (maybe ASCII).
* glyphs found in the font (maybe ASCII).
* *
* You should use the `sTypoDescender' * You should use the `sTypoDescender` field of the 'OS/2' table
* field of the `OS/2' table instead if you * instead if you want the correct one.
* want the correct one.
* *
* Line_Gap :: * Line_Gap ::
* The font's line gap, i.e., the distance * The font's line gap, i.e., the distance to add to the ascender and
* to add to the ascender and descender to * descender to get the BTB, i.e., the baseline-to-baseline distance
* get the BTB, i.e., the * for the font.
* baseline-to-baseline distance for the
* font.
* *
* advance_Width_Max :: * advance_Width_Max ::
* This field is the maximum of all advance * This field is the maximum of all advance widths found in the font.
* widths found in the font. It can be * It can be used to compute the maximum width of an arbitrary string
* used to compute the maximum width of an * of text.
* arbitrary string of text.
* *
* min_Left_Side_Bearing :: * min_Left_Side_Bearing ::
* The minimum left side bearing of all * The minimum left side bearing of all glyphs within the font.
* glyphs within the font.
* *
* min_Right_Side_Bearing :: * min_Right_Side_Bearing ::
* The minimum right side bearing of all * The minimum right side bearing of all glyphs within the font.
* glyphs within the font.
* *
* xMax_Extent :: * xMax_Extent ::
* The maximum horizontal extent (i.e., the * The maximum horizontal extent (i.e., the 'width' of a glyph's
* `width' of a glyph's bounding box) for * bounding box) for all glyphs in the font.
* all glyphs in the font.
* *
* caret_Slope_Rise :: * caret_Slope_Rise ::
* The rise coefficient of the cursor's * The rise coefficient of the cursor's slope of the cursor
* slope of the cursor (slope=rise/run). * (slope=rise/run).
* *
* caret_Slope_Run :: * caret_Slope_Run ::
* The run coefficient of the cursor's * The run coefficient of the cursor's slope.
* slope.
* *
* caret_Offset :: * caret_Offset ::
* The cursor's offset for slanted fonts. * The cursor's offset for slanted fonts.
@ -196,21 +181,20 @@ FT_BEGIN_HEADER
* Always~0. * Always~0.
* *
* number_Of_HMetrics :: * number_Of_HMetrics ::
* Number of HMetrics entries in the `hmtx' * Number of HMetrics entries in the 'hmtx' table -- this value can be
* table -- this value can be smaller than * smaller than the total number of glyphs in the font.
* the total number of glyphs in the font.
* *
* long_metrics :: * long_metrics ::
* A pointer into the `hmtx' table. * A pointer into the 'hmtx' table.
* *
* short_metrics :: * short_metrics ::
* A pointer into the `hmtx' table. * A pointer into the 'hmtx' table.
* *
* @note: * @note:
* For an OpenType variation font, the values of the following fields * For an OpenType variation font, the values of the following fields can
* can change after a call to @FT_Set_Var_Design_Coordinates (and * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if
* friends) if the font contains an `MVAR' table: `caret_Slope_Rise', * the font contains an 'MVAR' table: `caret_Slope_Rise`,
* `caret_Slope_Run', and `caret_Offset'. * `caret_Slope_Run`, and `caret_Offset`.
*/ */
typedef struct TT_HoriHeader_ typedef struct TT_HoriHeader_
{ {
@ -249,78 +233,61 @@ FT_BEGIN_HEADER
* TT_VertHeader * TT_VertHeader
* *
* @description: * @description:
* A structure used to model a TrueType vertical header, the `vhea' * A structure used to model a TrueType vertical header, the 'vhea'
* table, as well as the corresponding vertical metrics table, * table, as well as the corresponding vertical metrics table, 'vmtx'.
* `vmtx'.
* *
* @fields: * @fields:
* Version :: * Version ::
* The table version. * The table version.
* *
* Ascender :: * Ascender ::
* The font's ascender, i.e., the distance * The font's ascender, i.e., the distance from the baseline to the
* from the baseline to the top-most of * top-most of all glyph points found in the font.
* all glyph points found in the font.
* *
* This value is invalid in many fonts, as * This value is invalid in many fonts, as it is usually set by the
* it is usually set by the font designer, * font designer, and often reflects only a portion of the glyphs found
* and often reflects only a portion of * in the font (maybe ASCII).
* the glyphs found in the font (maybe
* ASCII).
* *
* You should use the `sTypoAscender' * You should use the `sTypoAscender` field of the 'OS/2' table instead
* field of the `OS/2' table instead if * if you want the correct one.
* you want the correct one.
* *
* Descender :: * Descender ::
* The font's descender, i.e., the * The font's descender, i.e., the distance from the baseline to the
* distance from the baseline to the * bottom-most of all glyph points found in the font. It is negative.
* bottom-most of all glyph points found
* in the font. It is negative.
* *
* This value is invalid in many fonts, as * This value is invalid in many fonts, as it is usually set by the
* it is usually set by the font designer, * font designer, and often reflects only a portion of the glyphs found
* and often reflects only a portion of * in the font (maybe ASCII).
* the glyphs found in the font (maybe
* ASCII).
* *
* You should use the `sTypoDescender' * You should use the `sTypoDescender` field of the 'OS/2' table
* field of the `OS/2' table instead if * instead if you want the correct one.
* you want the correct one.
* *
* Line_Gap :: * Line_Gap ::
* The font's line gap, i.e., the distance * The font's line gap, i.e., the distance to add to the ascender and
* to add to the ascender and descender to * descender to get the BTB, i.e., the baseline-to-baseline distance
* get the BTB, i.e., the * for the font.
* baseline-to-baseline distance for the
* font.
* *
* advance_Height_Max :: * advance_Height_Max ::
* This field is the maximum of all * This field is the maximum of all advance heights found in the font.
* advance heights found in the font. It * It can be used to compute the maximum height of an arbitrary string
* can be used to compute the maximum * of text.
* height of an arbitrary string of text.
* *
* min_Top_Side_Bearing :: * min_Top_Side_Bearing ::
* The minimum top side bearing of all * The minimum top side bearing of all glyphs within the font.
* glyphs within the font.
* *
* min_Bottom_Side_Bearing :: * min_Bottom_Side_Bearing ::
* The minimum bottom side bearing of all * The minimum bottom side bearing of all glyphs within the font.
* glyphs within the font.
* *
* yMax_Extent :: * yMax_Extent ::
* The maximum vertical extent (i.e., the * The maximum vertical extent (i.e., the 'height' of a glyph's
* `height' of a glyph's bounding box) for * bounding box) for all glyphs in the font.
* all glyphs in the font.
* *
* caret_Slope_Rise :: * caret_Slope_Rise ::
* The rise coefficient of the cursor's * The rise coefficient of the cursor's slope of the cursor
* slope of the cursor (slope=rise/run). * (slope=rise/run).
* *
* caret_Slope_Run :: * caret_Slope_Run ::
* The run coefficient of the cursor's * The run coefficient of the cursor's slope.
* slope.
* *
* caret_Offset :: * caret_Offset ::
* The cursor's offset for slanted fonts. * The cursor's offset for slanted fonts.
@ -332,23 +299,20 @@ FT_BEGIN_HEADER
* Always~0. * Always~0.
* *
* number_Of_VMetrics :: * number_Of_VMetrics ::
* Number of VMetrics entries in the * Number of VMetrics entries in the 'vmtx' table -- this value can be
* `vmtx' table -- this value can be * smaller than the total number of glyphs in the font.
* smaller than the total number of glyphs
* in the font.
* *
* long_metrics :: * long_metrics ::
* A pointer into the `vmtx' table. * A pointer into the 'vmtx' table.
* *
* short_metrics :: * short_metrics ::
* A pointer into the `vmtx' table. * A pointer into the 'vmtx' table.
* *
* @note: * @note:
* For an OpenType variation font, the values of the following fields * For an OpenType variation font, the values of the following fields can
* can change after a call to @FT_Set_Var_Design_Coordinates (and * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if
* friends) if the font contains an `MVAR' table: `Ascender', * the font contains an 'MVAR' table: 'Ascender', 'Descender',
* `Descender', `Line_Gap', `caret_Slope_Rise', `caret_Slope_Run', * `Line_Gap`, `caret_Slope_Rise`, `caret_Slope_Run`, and `caret_Offset`.
* and `caret_Offset'.
*/ */
typedef struct TT_VertHeader_ typedef struct TT_VertHeader_
{ {
@ -387,26 +351,24 @@ FT_BEGIN_HEADER
* TT_OS2 * TT_OS2
* *
* @description: * @description:
* A structure to model a TrueType `OS/2' table. All fields comply * A structure to model a TrueType 'OS/2' table. All fields comply to
* to the OpenType specification. * the OpenType specification.
* *
* Note that we now support old Mac fonts that do not include an * Note that we now support old Mac fonts that do not include an 'OS/2'
* `OS/2' table. In this case, the `version' field is always set to * table. In this case, the 'version' field is always set to 0xFFFF.
* 0xFFFF.
* *
* @note: * @note:
* For an OpenType variation font, the values of the following fields * For an OpenType variation font, the values of the following fields can
* can change after a call to @FT_Set_Var_Design_Coordinates (and * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if
* friends) if the font contains an `MVAR' table: `sCapHeight', * the font contains an 'MVAR' table: `sCapHeight`, `sTypoAscender`,
* `sTypoAscender', `sTypoDescender', `sTypoLineGap', `sxHeight', * `sTypoDescender`, `sTypoLineGap`, `sxHeight`, `usWinAscent`,
* `usWinAscent', `usWinDescent', `yStrikeoutPosition', * `usWinDescent`, `yStrikeoutPosition`, `yStrikeoutSize`,
* `yStrikeoutSize', `ySubscriptXOffset', `ySubScriptXSize', * `ySubscriptXOffset`, `ySubScriptXSize`, `ySubscriptYOffset`,
* `ySubscriptYOffset', `ySubscriptYSize', `ySuperscriptXOffset', * `ySubscriptYSize`, `ySuperscriptXOffset`, `ySuperscriptXSize`,
* `ySuperscriptXSize', `ySuperscriptYOffset', and * `ySuperscriptYOffset`, and `ySuperscriptYSize`.
* `ySuperscriptYSize'.
* *
* Possible values for bits in the `ulUnicodeRangeX' fields are given * Possible values for bits in the `ulUnicodeRangeX` fields are given by
* by the @TT_UCR_XXX macros. * the @TT_UCR_XXX macros.
*/ */
typedef struct TT_OS2_ typedef struct TT_OS2_
@ -473,16 +435,16 @@ FT_BEGIN_HEADER
* TT_Postscript * TT_Postscript
* *
* @description: * @description:
* A structure to model a TrueType `post' table. All fields comply * A structure to model a TrueType 'post' table. All fields comply to
* to the OpenType specification. This structure does not reference * the OpenType specification. This structure does not reference a
* a font's PostScript glyph names; use @FT_Get_Glyph_Name to * font's PostScript glyph names; use @FT_Get_Glyph_Name to retrieve
* retrieve them. * them.
* *
* @note: * @note:
* For an OpenType variation font, the values of the following fields * For an OpenType variation font, the values of the following fields can
* can change after a call to @FT_Set_Var_Design_Coordinates (and * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if
* friends) if the font contains an `MVAR' table: `underlinePosition' * the font contains an 'MVAR' table: `underlinePosition` and
* and `underlineThickness'. * `underlineThickness`.
*/ */
typedef struct TT_Postscript_ typedef struct TT_Postscript_
{ {
@ -508,8 +470,8 @@ FT_BEGIN_HEADER
* TT_PCLT * TT_PCLT
* *
* @description: * @description:
* A structure to model a TrueType `PCLT' table. All fields comply * A structure to model a TrueType 'PCLT' table. All fields comply to
* to the OpenType specification. * the OpenType specification.
*/ */
typedef struct TT_PCLT_ typedef struct TT_PCLT_
{ {
@ -538,75 +500,65 @@ FT_BEGIN_HEADER
* TT_MaxProfile * TT_MaxProfile
* *
* @description: * @description:
* The maximum profile (`maxp') table contains many max values, which * The maximum profile ('maxp') table contains many max values, which can
* can be used to pre-allocate arrays for speeding up glyph loading * be used to pre-allocate arrays for speeding up glyph loading and
* and hinting. * hinting.
* *
* @fields: * @fields:
* version :: * version ::
* The version number. * The version number.
* *
* numGlyphs :: * numGlyphs ::
* The number of glyphs in this TrueType * The number of glyphs in this TrueType font.
* font.
* *
* maxPoints :: * maxPoints ::
* The maximum number of points in a * The maximum number of points in a non-composite TrueType glyph. See
* non-composite TrueType glyph. See also * also `maxCompositePoints`.
* `maxCompositePoints'.
* *
* maxContours :: * maxContours ::
* The maximum number of contours in a * The maximum number of contours in a non-composite TrueType glyph.
* non-composite TrueType glyph. See also * See also `maxCompositeContours`.
* `maxCompositeContours'.
* *
* maxCompositePoints :: * maxCompositePoints ::
* The maximum number of points in a * The maximum number of points in a composite TrueType glyph. See
* composite TrueType glyph. See also * also `maxPoints`.
* `maxPoints'.
* *
* maxCompositeContours :: * maxCompositeContours ::
* The maximum number of contours in a * The maximum number of contours in a composite TrueType glyph. See
* composite TrueType glyph. See also * also `maxContours`.
* `maxContours'.
* *
* maxZones :: * maxZones ::
* The maximum number of zones used for * The maximum number of zones used for glyph hinting.
* glyph hinting.
* *
* maxTwilightPoints :: * maxTwilightPoints ::
* The maximum number of points in the * The maximum number of points in the twilight zone used for glyph
* twilight zone used for glyph hinting. * hinting.
* *
* maxStorage :: * maxStorage ::
* The maximum number of elements in the * The maximum number of elements in the storage area used for glyph
* storage area used for glyph hinting. * hinting.
* *
* maxFunctionDefs :: * maxFunctionDefs ::
* The maximum number of function * The maximum number of function definitions in the TrueType bytecode
* definitions in the TrueType bytecode for * for this font.
* this font.
* *
* maxInstructionDefs :: * maxInstructionDefs ::
* The maximum number of instruction * The maximum number of instruction definitions in the TrueType
* definitions in the TrueType bytecode for * bytecode for this font.
* this font.
* *
* maxStackElements :: * maxStackElements ::
* The maximum number of stack elements used * The maximum number of stack elements used during bytecode
* during bytecode interpretation. * interpretation.
* *
* maxSizeOfInstructions :: * maxSizeOfInstructions ::
* The maximum number of TrueType opcodes * The maximum number of TrueType opcodes used for glyph hinting.
* used for glyph hinting.
* *
* maxComponentElements :: * maxComponentElements ::
* The maximum number of simple (i.e., * The maximum number of simple (i.e., non-composite) glyphs in a
* non-composite) glyphs in a composite glyph. * composite glyph.
* *
* maxComponentDepth :: * maxComponentDepth ::
* The maximum nesting depth of composite * The maximum nesting depth of composite glyphs.
* glyphs.
* *
* @note: * @note:
* This structure is only used during font loading. * This structure is only used during font loading.
@ -638,8 +590,8 @@ FT_BEGIN_HEADER
* FT_Sfnt_Tag * FT_Sfnt_Tag
* *
* @description: * @description:
* An enumeration to specify indices of SFNT tables loaded and parsed * An enumeration to specify indices of SFNT tables loaded and parsed by
* by FreeType during initialization of an SFNT font. Used in the * FreeType during initialization of an SFNT font. Used in the
* @FT_Get_Sfnt_Table API function. * @FT_Get_Sfnt_Table API function.
* *
* @values: * @values:
@ -705,30 +657,29 @@ FT_BEGIN_HEADER
* The index of the SFNT table. * The index of the SFNT table.
* *
* @return: * @return:
* A type-less pointer to the table. This will be NULL in case of * A type-less pointer to the table. This will be NULL in case of error,
* error, or if the corresponding table was not found *OR* loaded * or if the corresponding table was not found **OR** loaded from the
* from the file. * file.
* *
* Use a typecast according to `tag' to access the structure * Use a typecast according to 'tag' to access the structure elements.
* elements.
* *
* @note: * @note:
* The table is owned by the face object and disappears with it. * The table is owned by the face object and disappears with it.
* *
* This function is only useful to access SFNT tables that are loaded * This function is only useful to access SFNT tables that are loaded by
* by the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for * the sfnt, truetype, and opentype drivers. See @FT_Sfnt_Tag for a
* a list. * list.
* *
* @example: * @example:
* Here an example how to access the `vhea' table. * Here an example how to access the 'vhea' table.
* *
* { * ```
* TT_VertHeader* vert_header; * TT_VertHeader* vert_header;
* *
* *
* vert_header = * vert_header =
* (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA ); * (TT_VertHeader*)FT_Get_Sfnt_Table( face, FT_SFNT_VHEA );
* } * ```
*/ */
FT_EXPORT( void* ) FT_EXPORT( void* )
FT_Get_Sfnt_Table( FT_Face face, FT_Get_Sfnt_Table( FT_Face face,
@ -748,8 +699,8 @@ FT_BEGIN_HEADER
* A handle to the source face. * A handle to the source face.
* *
* tag :: * tag ::
* The four-byte tag of the table to load. Use value~0 if you want * The four-byte tag of the table to load. Use value~0 if you want to
* to access the whole font file. Otherwise, you can use one of the * access the whole font file. Otherwise, you can use one of the
* definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new
* one with @FT_MAKE_TAG. * one with @FT_MAKE_TAG.
* *
@ -763,10 +714,10 @@ FT_BEGIN_HEADER
* *
* @inout: * @inout:
* length :: * length ::
* If the `length' parameter is NULL, try to load the whole table. * If the 'length' parameter is NULL, try to load the whole table.
* Return an error code if it fails. * Return an error code if it fails.
* *
* Else, if `*length' is~0, exit immediately while returning the * Else, if '*length' is~0, exit immediately while returning the
* table's (or file) full size in it. * table's (or file) full size in it.
* *
* Else the number of bytes to read from the table or file, from the * Else the number of bytes to read from the table or file, from the
@ -777,9 +728,9 @@ FT_BEGIN_HEADER
* *
* @note: * @note:
* If you need to determine the table's length you should first call this * If you need to determine the table's length you should first call this
* function with `*length' set to~0, as in the following example: * function with '*length' set to~0, as in the following example:
* *
* { * ```
* FT_ULong length = 0; * FT_ULong length = 0;
* *
* *
@ -791,7 +742,7 @@ FT_BEGIN_HEADER
* *
* error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length );
* if ( error ) { ... could not load table ... } * if ( error ) { ... could not load table ... }
* } * ```
* *
* Note that structures like @TT_Header or @TT_OS2 can't be used with * Note that structures like @TT_Header or @TT_OS2 can't be used with
* this function; they are limited to @FT_Get_Sfnt_Table. Reason is that * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that
@ -825,14 +776,14 @@ FT_BEGIN_HEADER
* *
* @inout: * @inout:
* tag :: * tag ::
* The name tag of the SFNT table. If the value is NULL, `table_index' * The name tag of the SFNT table. If the value is NULL, `table_index`
* is ignored, and `length' returns the number of SFNT tables in the * is ignored, and 'length' returns the number of SFNT tables in the
* font. * font.
* *
* @output: * @output:
* length :: * length ::
* The length of the SFNT table (or the number of SFNT tables, depending * The length of the SFNT table (or the number of SFNT tables,
* on `tag'). * depending on 'tag').
* *
* @return: * @return:
* FreeType error code. 0~means success. * FreeType error code. 0~means success.
@ -863,8 +814,8 @@ FT_BEGIN_HEADER
* The target charmap. * The target charmap.
* *
* @return: * @return:
* The language ID of `charmap'. If `charmap' doesn't belong to an * The language ID of 'charmap'. If 'charmap' doesn't belong to an SFNT
* SFNT face, just return~0 as the default value. * face, just return~0 as the default value.
* *
* For a format~14 cmap (to access Unicode IVS), the return value is * For a format~14 cmap (to access Unicode IVS), the return value is
* 0xFFFFFFFF. * 0xFFFFFFFF.
@ -879,15 +830,15 @@ FT_BEGIN_HEADER
* FT_Get_CMap_Format * FT_Get_CMap_Format
* *
* @description: * @description:
* Return the format of an SFNT `cmap' table. * Return the format of an SFNT 'cmap' table.
* *
* @input: * @input:
* charmap :: * charmap ::
* The target charmap. * The target charmap.
* *
* @return: * @return:
* The format of `charmap'. If `charmap' doesn't belong to an SFNT * The format of 'charmap'. If 'charmap' doesn't belong to an SFNT face,
* face, return -1. * return -1.
*/ */
FT_EXPORT( FT_Long ) FT_EXPORT( FT_Long )
FT_Get_CMap_Format( FT_CharMap charmap ); FT_Get_CMap_Format( FT_CharMap charmap );

View File

@ -18,17 +18,17 @@
/************************************************************************** /**************************************************************************
* *
* This is the `entry point' for FreeType header file inclusions. It is * This is the 'entry point' for FreeType header file inclusions. It is
* the only header file which should be included directly; all other * the only header file which should be included directly; all other
* FreeType header files should be accessed with macro names (after * FreeType header files should be accessed with macro names (after
* including `ft2build.h'). * including `ft2build.h`).
* *
* A typical example is * A typical example is
* *
* { * ```
* #include <ft2build.h> * #include <ft2build.h>
* #include FT_FREETYPE_H * #include FT_FREETYPE_H
* } * ```
* *
*/ */