mirror of
https://github.com/SwallowOS/android_external_freetype
synced 2025-11-05 15:27:55 +08:00
Merge "Update FreeType to a512b0fe7a from 2.6.0"
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
Freetype
|
||||
Name: FreeType
|
||||
Version: 2.6.2 + update
|
||||
Revision: a512b0fe7a8d9db0e5aa9c0a4db1e92cb861722d
|
||||
|
||||
Not all modules in include/config/ftmodule.h are enabled.
|
||||
Some options in include/config/ftoption.h are enabled/disabled.
|
||||
Local modifications:
|
||||
|
||||
1. Drop unused build files (Jamfiles, {module,rules}.mk)
|
||||
2. Drop src directories for unused modules:
|
||||
bdf, cid, pcf, pfr, type1, type42, winfonts
|
||||
3. Drop src/{bzip2,tools,lzw,otvalid,gxvalid}
|
||||
4. Customize include/freetype/config/{ftmodule,ftoption}.h by applying
|
||||
module_option.diff
|
||||
|
||||
To faciliate an easier update, all the files in src/{base,autofit} are kept
|
||||
even if some of them are for dropped modules/options. Android.mk can be used
|
||||
to control exactly what's built.
|
||||
|
||||
@@ -335,9 +335,9 @@ FT_BEGIN_HEADER
|
||||
#if ( __GNUC__ >= 2 || \
|
||||
defined( __IBM__TYPEOF__ ) || \
|
||||
( __SUNPRO_C >= 0x5110 && !__STDC__ ) )
|
||||
#define TYPEOF( type ) (__typeof__ (type))
|
||||
#define FT_TYPEOF( type ) (__typeof__ (type))
|
||||
#else
|
||||
#define TYPEOF( type ) /* empty */
|
||||
#define FT_TYPEOF( type ) /* empty */
|
||||
#endif
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
*
|
||||
*/
|
||||
#ifndef FT_CONFIG_CONFIG_H
|
||||
#define FT_CONFIG_CONFIG_H <config/ftconfig.h>
|
||||
#define FT_CONFIG_CONFIG_H <freetype/config/ftconfig.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
*
|
||||
*/
|
||||
#ifndef FT_CONFIG_STANDARD_LIBRARY_H
|
||||
#define FT_CONFIG_STANDARD_LIBRARY_H <config/ftstdlib.h>
|
||||
#define FT_CONFIG_STANDARD_LIBRARY_H <freetype/config/ftstdlib.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
*
|
||||
*/
|
||||
#ifndef FT_CONFIG_OPTIONS_H
|
||||
#define FT_CONFIG_OPTIONS_H <config/ftoption.h>
|
||||
#define FT_CONFIG_OPTIONS_H <freetype/config/ftoption.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
*
|
||||
*/
|
||||
#ifndef FT_CONFIG_MODULES_H
|
||||
#define FT_CONFIG_MODULES_H <config/ftmodule.h>
|
||||
#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h>
|
||||
#endif
|
||||
|
||||
/* */
|
||||
@@ -170,7 +170,7 @@
|
||||
* base FreeType~2 API.
|
||||
*
|
||||
*/
|
||||
#define FT_FREETYPE_H <freetype.h>
|
||||
#define FT_FREETYPE_H <freetype/freetype.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -185,7 +185,7 @@
|
||||
* It is included by @FT_FREETYPE_H.
|
||||
*
|
||||
*/
|
||||
#define FT_ERRORS_H <fterrors.h>
|
||||
#define FT_ERRORS_H <freetype/fterrors.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -198,7 +198,7 @@
|
||||
* list of FreeType~2 module error offsets (and messages).
|
||||
*
|
||||
*/
|
||||
#define FT_MODULE_ERRORS_H <ftmoderr.h>
|
||||
#define FT_MODULE_ERRORS_H <freetype/ftmoderr.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -214,7 +214,7 @@
|
||||
* It is included by @FT_FREETYPE_H.
|
||||
*
|
||||
*/
|
||||
#define FT_SYSTEM_H <ftsystem.h>
|
||||
#define FT_SYSTEM_H <freetype/ftsystem.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -230,7 +230,7 @@
|
||||
* It is included by @FT_FREETYPE_H.
|
||||
*
|
||||
*/
|
||||
#define FT_IMAGE_H <ftimage.h>
|
||||
#define FT_IMAGE_H <freetype/ftimage.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -245,7 +245,7 @@
|
||||
* It is included by @FT_FREETYPE_H.
|
||||
*
|
||||
*/
|
||||
#define FT_TYPES_H <fttypes.h>
|
||||
#define FT_TYPES_H <freetype/fttypes.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -260,7 +260,7 @@
|
||||
* (Most applications will never need to include this file.)
|
||||
*
|
||||
*/
|
||||
#define FT_LIST_H <ftlist.h>
|
||||
#define FT_LIST_H <freetype/ftlist.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -273,7 +273,7 @@
|
||||
* scalable outline management API of FreeType~2.
|
||||
*
|
||||
*/
|
||||
#define FT_OUTLINE_H <ftoutln.h>
|
||||
#define FT_OUTLINE_H <freetype/ftoutln.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -286,7 +286,7 @@
|
||||
* API which manages multiple @FT_Size objects per face.
|
||||
*
|
||||
*/
|
||||
#define FT_SIZES_H <ftsizes.h>
|
||||
#define FT_SIZES_H <freetype/ftsizes.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -299,7 +299,7 @@
|
||||
* module management API of FreeType~2.
|
||||
*
|
||||
*/
|
||||
#define FT_MODULE_H <ftmodapi.h>
|
||||
#define FT_MODULE_H <freetype/ftmodapi.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -312,7 +312,7 @@
|
||||
* renderer module management API of FreeType~2.
|
||||
*
|
||||
*/
|
||||
#define FT_RENDER_H <ftrender.h>
|
||||
#define FT_RENDER_H <freetype/ftrender.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -325,7 +325,7 @@
|
||||
* structures and macros related to the auto-hinting module.
|
||||
*
|
||||
*/
|
||||
#define FT_AUTOHINTER_H <ftautoh.h>
|
||||
#define FT_AUTOHINTER_H <freetype/ftautoh.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -338,7 +338,7 @@
|
||||
* structures and macros related to the CFF driver module.
|
||||
*
|
||||
*/
|
||||
#define FT_CFF_DRIVER_H <ftcffdrv.h>
|
||||
#define FT_CFF_DRIVER_H <freetype/ftcffdrv.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -351,7 +351,7 @@
|
||||
* structures and macros related to the TrueType driver module.
|
||||
*
|
||||
*/
|
||||
#define FT_TRUETYPE_DRIVER_H <ftttdrv.h>
|
||||
#define FT_TRUETYPE_DRIVER_H <freetype/ftttdrv.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -364,7 +364,7 @@
|
||||
* types and API specific to the Type~1 format.
|
||||
*
|
||||
*/
|
||||
#define FT_TYPE1_TABLES_H <t1tables.h>
|
||||
#define FT_TYPE1_TABLES_H <freetype/t1tables.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -379,7 +379,7 @@
|
||||
* definitions, taken from the TrueType and OpenType specifications.
|
||||
*
|
||||
*/
|
||||
#define FT_TRUETYPE_IDS_H <ttnameid.h>
|
||||
#define FT_TRUETYPE_IDS_H <freetype/ttnameid.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -392,7 +392,7 @@
|
||||
* types and API specific to the TrueType (as well as OpenType) format.
|
||||
*
|
||||
*/
|
||||
#define FT_TRUETYPE_TABLES_H <tttables.h>
|
||||
#define FT_TRUETYPE_TABLES_H <freetype/tttables.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -406,7 +406,7 @@
|
||||
* SFNT-based font formats (i.e., TrueType and OpenType).
|
||||
*
|
||||
*/
|
||||
#define FT_TRUETYPE_TAGS_H <tttags.h>
|
||||
#define FT_TRUETYPE_TAGS_H <freetype/tttags.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -420,7 +420,7 @@
|
||||
* face.
|
||||
*
|
||||
*/
|
||||
#define FT_BDF_H <ftbdf.h>
|
||||
#define FT_BDF_H <freetype/ftbdf.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -434,7 +434,7 @@
|
||||
* face.
|
||||
*
|
||||
*/
|
||||
#define FT_CID_H <ftcid.h>
|
||||
#define FT_CID_H <freetype/ftcid.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -447,7 +447,7 @@
|
||||
* definitions of an API which supports gzip-compressed files.
|
||||
*
|
||||
*/
|
||||
#define FT_GZIP_H <ftgzip.h>
|
||||
#define FT_GZIP_H <freetype/ftgzip.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -460,7 +460,7 @@
|
||||
* definitions of an API which supports LZW-compressed files.
|
||||
*
|
||||
*/
|
||||
#define FT_LZW_H <ftlzw.h>
|
||||
#define FT_LZW_H <freetype/ftlzw.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -473,7 +473,7 @@
|
||||
* definitions of an API which supports bzip2-compressed files.
|
||||
*
|
||||
*/
|
||||
#define FT_BZIP2_H <ftbzip2.h>
|
||||
#define FT_BZIP2_H <freetype/ftbzip2.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -486,7 +486,7 @@
|
||||
* definitions of an API which supports Windows FNT files.
|
||||
*
|
||||
*/
|
||||
#define FT_WINFONTS_H <ftwinfnt.h>
|
||||
#define FT_WINFONTS_H <freetype/ftwinfnt.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -499,7 +499,7 @@
|
||||
* API of the optional glyph management component.
|
||||
*
|
||||
*/
|
||||
#define FT_GLYPH_H <ftglyph.h>
|
||||
#define FT_GLYPH_H <freetype/ftglyph.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -512,7 +512,7 @@
|
||||
* API of the optional bitmap conversion component.
|
||||
*
|
||||
*/
|
||||
#define FT_BITMAP_H <ftbitmap.h>
|
||||
#define FT_BITMAP_H <freetype/ftbitmap.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -525,7 +525,7 @@
|
||||
* API of the optional exact bounding box computation routines.
|
||||
*
|
||||
*/
|
||||
#define FT_BBOX_H <ftbbox.h>
|
||||
#define FT_BBOX_H <freetype/ftbbox.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -538,7 +538,7 @@
|
||||
* API of the optional FreeType~2 cache sub-system.
|
||||
*
|
||||
*/
|
||||
#define FT_CACHE_H <ftcache.h>
|
||||
#define FT_CACHE_H <freetype/ftcache.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -612,7 +612,7 @@
|
||||
* compiled on the Mac (note that the base API still works though).
|
||||
*
|
||||
*/
|
||||
#define FT_MAC_H <ftmac.h>
|
||||
#define FT_MAC_H <freetype/ftmac.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -625,7 +625,7 @@
|
||||
* optional multiple-masters management API of FreeType~2.
|
||||
*
|
||||
*/
|
||||
#define FT_MULTIPLE_MASTERS_H <ftmm.h>
|
||||
#define FT_MULTIPLE_MASTERS_H <freetype/ftmm.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -639,7 +639,7 @@
|
||||
* SFNT-based font formats (i.e., TrueType and OpenType).
|
||||
*
|
||||
*/
|
||||
#define FT_SFNT_NAMES_H <ftsnames.h>
|
||||
#define FT_SFNT_NAMES_H <freetype/ftsnames.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -653,7 +653,7 @@
|
||||
* GPOS, GSUB, JSTF).
|
||||
*
|
||||
*/
|
||||
#define FT_OPENTYPE_VALIDATE_H <ftotval.h>
|
||||
#define FT_OPENTYPE_VALIDATE_H <freetype/ftotval.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -667,7 +667,7 @@
|
||||
* mort, morx, bsln, just, kern, opbd, trak, prop).
|
||||
*
|
||||
*/
|
||||
#define FT_GX_VALIDATE_H <ftgxval.h>
|
||||
#define FT_GX_VALIDATE_H <freetype/ftgxval.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -680,7 +680,7 @@
|
||||
* FreeType~2 API which accesses PFR-specific data.
|
||||
*
|
||||
*/
|
||||
#define FT_PFR_H <ftpfr.h>
|
||||
#define FT_PFR_H <freetype/ftpfr.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -692,7 +692,7 @@
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which provides functions to stroke outline paths.
|
||||
*/
|
||||
#define FT_STROKER_H <ftstroke.h>
|
||||
#define FT_STROKER_H <freetype/ftstroke.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -704,7 +704,7 @@
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which performs artificial obliquing and emboldening.
|
||||
*/
|
||||
#define FT_SYNTHESIS_H <ftsynth.h>
|
||||
#define FT_SYNTHESIS_H <freetype/ftsynth.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -716,7 +716,7 @@
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which provides functions specific to font formats.
|
||||
*/
|
||||
#define FT_FONT_FORMATS_H <ftfntfmt.h>
|
||||
#define FT_FONT_FORMATS_H <freetype/ftfntfmt.h>
|
||||
|
||||
/* deprecated */
|
||||
#define FT_XFREE86_H FT_FONT_FORMATS_H
|
||||
@@ -732,7 +732,7 @@
|
||||
* FreeType~2 API which performs trigonometric computations (e.g.,
|
||||
* cosines and arc tangents).
|
||||
*/
|
||||
#define FT_TRIGONOMETRY_H <fttrigon.h>
|
||||
#define FT_TRIGONOMETRY_H <freetype/fttrigon.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -744,7 +744,7 @@
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which performs color filtering for subpixel rendering.
|
||||
*/
|
||||
#define FT_LCD_FILTER_H <ftlcdfil.h>
|
||||
#define FT_LCD_FILTER_H <freetype/ftlcdfil.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -756,7 +756,7 @@
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which performs color filtering for subpixel rendering.
|
||||
*/
|
||||
#define FT_UNPATENTED_HINTING_H <ttunpat.h>
|
||||
#define FT_UNPATENTED_HINTING_H <freetype/ttunpat.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -768,7 +768,7 @@
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which performs color filtering for subpixel rendering.
|
||||
*/
|
||||
#define FT_INCREMENTAL_H <ftincrem.h>
|
||||
#define FT_INCREMENTAL_H <freetype/ftincrem.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -780,7 +780,7 @@
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which returns entries from the TrueType GASP table.
|
||||
*/
|
||||
#define FT_GASP_H <ftgasp.h>
|
||||
#define FT_GASP_H <freetype/ftgasp.h>
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
@@ -792,30 +792,30 @@
|
||||
* A macro used in #include statements to name the file containing the
|
||||
* FreeType~2 API which returns individual and ranged glyph advances.
|
||||
*/
|
||||
#define FT_ADVANCES_H <ftadvanc.h>
|
||||
#define FT_ADVANCES_H <freetype/ftadvanc.h>
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
#define FT_ERROR_DEFINITIONS_H <fterrdef.h>
|
||||
#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
|
||||
|
||||
|
||||
/* The internals of the cache sub-system are no longer exposed. We */
|
||||
/* default to FT_CACHE_H at the moment just in case, but we know of */
|
||||
/* no rogue client that uses them. */
|
||||
/* */
|
||||
#define FT_CACHE_MANAGER_H <ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_MRU_H <ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_MANAGER_H <ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_CACHE_H <ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_GLYPH_H <ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_IMAGE_H <ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_SBITS_H <ftcache.h>
|
||||
#define FT_CACHE_MANAGER_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_MRU_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_MANAGER_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_CACHE_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_GLYPH_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_IMAGE_H <freetype/ftcache.h>
|
||||
#define FT_CACHE_INTERNAL_SBITS_H <freetype/ftcache.h>
|
||||
|
||||
|
||||
#define FT_INCREMENTAL_H <ftincrem.h>
|
||||
#define FT_INCREMENTAL_H <freetype/ftincrem.h>
|
||||
|
||||
#define FT_TRUETYPE_UNPATENTED_H <ttunpat.h>
|
||||
#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
|
||||
|
||||
|
||||
/*
|
||||
@@ -823,7 +823,7 @@
|
||||
* only when building the library.
|
||||
*/
|
||||
#ifdef FT2_BUILD_LIBRARY
|
||||
#define FT_INTERNAL_INTERNAL_H <internal/internal.h>
|
||||
#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
|
||||
#include FT_INTERNAL_INTERNAL_H
|
||||
#endif /* FT2_BUILD_LIBRARY */
|
||||
|
||||
@@ -38,9 +38,9 @@ FT_BEGIN_HEADER
|
||||
/* library from a single source directory. */
|
||||
/* */
|
||||
/* - You can put a copy of this file in your build directory, more */
|
||||
/* precisely in `$BUILD/config/ftoption.h', where `$BUILD' is the */
|
||||
/* name of a directory that is included _before_ the FreeType include */
|
||||
/* path during compilation. */
|
||||
/* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */
|
||||
/* is the name of a directory that is included _before_ the FreeType */
|
||||
/* include path during compilation. */
|
||||
/* */
|
||||
/* The default FreeType Makefiles and Jamfiles use the build */
|
||||
/* directory `builds/<system>' by default, but you can easily change */
|
||||
@@ -51,7 +51,7 @@ FT_BEGIN_HEADER
|
||||
/* locate this file during the build. For example, */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */
|
||||
/* #include <config/ftheader.h> */
|
||||
/* #include <freetype/config/ftheader.h> */
|
||||
/* */
|
||||
/* will use `$BUILD/myftoptions.h' instead of this file for macro */
|
||||
/* definitions. */
|
||||
@@ -59,7 +59,7 @@ FT_BEGIN_HEADER
|
||||
/* Note also that you can similarly pre-define the macro */
|
||||
/* FT_CONFIG_MODULES_H used to locate the file listing of the modules */
|
||||
/* that are statically linked to the library at compile time. By */
|
||||
/* default, this file is <config/ftmodule.h>. */
|
||||
/* default, this file is <freetype/config/ftmodule.h>. */
|
||||
/* */
|
||||
/* We highly recommend using the third method whenever possible. */
|
||||
/* */
|
||||
@@ -692,6 +692,24 @@ FT_BEGIN_HEADER
|
||||
#define TT_CONFIG_OPTION_BDF
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* Option TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES controls the maximum */
|
||||
/* number of bytecode instructions executed for a single run of the */
|
||||
/* bytecode interpreter, needed to prevent infinite loops. You don't */
|
||||
/* want to change this except for very special situations (e.g., making */
|
||||
/* a library fuzzer spend less time to handle broken fonts). */
|
||||
/* */
|
||||
/* It is not expected that this value is ever modified by a configuring */
|
||||
/* script; instead, it gets surrounded with #ifndef ... #endif so that */
|
||||
/* the value can be set as a preprocessor option on the compiler's */
|
||||
/* command line. */
|
||||
/* */
|
||||
#ifndef TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES
|
||||
#define TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES 1000000L
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/**** ****/
|
||||
@@ -64,6 +64,7 @@
|
||||
#define FT_INT_MAX INT_MAX
|
||||
#define FT_INT_MIN INT_MIN
|
||||
#define FT_UINT_MAX UINT_MAX
|
||||
#define FT_LONG_MAX LONG_MAX
|
||||
#define FT_ULONG_MAX ULONG_MAX
|
||||
|
||||
|
||||
@@ -876,17 +876,36 @@ FT_BEGIN_HEADER
|
||||
/* font formats can have multiple faces in */
|
||||
/* a font file. */
|
||||
/* */
|
||||
/* face_index :: The index of the face in the font file. It */
|
||||
/* is set to~0 if there is only one face in */
|
||||
/* face_index :: This field holds two different values. */
|
||||
/* Bits 0-15 are the index of the face in the */
|
||||
/* font file (starting with value~0). They */
|
||||
/* are set to~0 if there is only one face in */
|
||||
/* the font file. */
|
||||
/* */
|
||||
/* Bits 16-30 are relevant to GX variation */
|
||||
/* fonts only, holding the named instance */
|
||||
/* index for the current face index (starting */
|
||||
/* with value~1; value~0 indicates font access */
|
||||
/* without GX variation data). For non-GX */
|
||||
/* fonts, bits 16-30 are ignored. If we have */
|
||||
/* the third named instance of face~4, say, */
|
||||
/* `face_index' is set to 0x00030004. */
|
||||
/* */
|
||||
/* Bit 31 is always zero (this is, */
|
||||
/* `face_index' is always a positive value). */
|
||||
/* */
|
||||
/* face_flags :: A set of bit flags that give important */
|
||||
/* information about the face; see */
|
||||
/* @FT_FACE_FLAG_XXX for the details. */
|
||||
/* */
|
||||
/* style_flags :: A set of bit flags indicating the style of */
|
||||
/* the face; see @FT_STYLE_FLAG_XXX for the */
|
||||
/* details. */
|
||||
/* style_flags :: The lower 16~bits contain a set of bit */
|
||||
/* flags indicating the style of the face; see */
|
||||
/* @FT_STYLE_FLAG_XXX for the details. Bits */
|
||||
/* 16-30 hold the number of named instances */
|
||||
/* available for the current face if we have a */
|
||||
/* GX variation (sub)font. Bit 31 is always */
|
||||
/* zero (this is, `style_flags' is always a */
|
||||
/* positive value). */
|
||||
/* */
|
||||
/* num_glyphs :: The number of glyphs in the face. If the */
|
||||
/* face is scalable and has sbits (see */
|
||||
@@ -1392,7 +1411,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_STYLE_FLAG_XXX */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A list of bit-flags used to indicate the style of a given face. */
|
||||
/* A list of bit flags used to indicate the style of a given face. */
|
||||
/* These are used in the `style_flags' field of @FT_FaceRec. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
@@ -1824,7 +1843,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_OPEN_XXX */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A list of bit-field constants used within the `flags' field of the */
|
||||
/* A list of bit field constants used within the `flags' field of the */
|
||||
/* @FT_Open_Args structure. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
@@ -1971,13 +1990,12 @@ FT_BEGIN_HEADER
|
||||
/* <Input> */
|
||||
/* pathname :: A path to the font file. */
|
||||
/* */
|
||||
/* face_index :: The index of the face within the font. The first */
|
||||
/* face has index~0. */
|
||||
/* face_index :: See @FT_Open_Face for a detailed description of this */
|
||||
/* parameter. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* aface :: A handle to a new face object. If `face_index' is */
|
||||
/* greater than or equal to zero, it must be non-NULL. */
|
||||
/* See @FT_Open_Face for more details. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
@@ -2010,13 +2028,12 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* file_size :: The size of the memory chunk used by the font data. */
|
||||
/* */
|
||||
/* face_index :: The index of the face within the font. The first */
|
||||
/* face has index~0. */
|
||||
/* face_index :: See @FT_Open_Face for a detailed description of this */
|
||||
/* parameter. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* aface :: A handle to a new face object. If `face_index' is */
|
||||
/* greater than or equal to zero, it must be non-NULL. */
|
||||
/* See @FT_Open_Face for more details. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
@@ -2048,13 +2065,43 @@ FT_BEGIN_HEADER
|
||||
/* args :: A pointer to an `FT_Open_Args' structure that must */
|
||||
/* be filled by the caller. */
|
||||
/* */
|
||||
/* face_index :: The index of the face within the font. The first */
|
||||
/* face has index~0. */
|
||||
/* face_index :: This field holds two different values. Bits 0-15 */
|
||||
/* are the index of the face in the font file (starting */
|
||||
/* with value~0). Set it to~0 if there is only one */
|
||||
/* face in the font file. */
|
||||
/* */
|
||||
/* Bits 16-30 are relevant to GX variation fonts only, */
|
||||
/* specifying the named instance index for the current */
|
||||
/* face index (starting with value~1; value~0 makes */
|
||||
/* FreeType ignore named instances). For non-GX fonts, */
|
||||
/* bits 16-30 are ignored. Assuming that you want to */
|
||||
/* access the third named instance in face~4, */
|
||||
/* `face_index' should be set to 0x00030004. If you */
|
||||
/* want to access face~4 without GX variation handling, */
|
||||
/* simply set `face_index' to value~4. */
|
||||
/* */
|
||||
/* FT_Open_Face and its siblings can be used to quickly */
|
||||
/* check whether the font format of a given font */
|
||||
/* resource is supported by FreeType. In general, if */
|
||||
/* the `face_index' argument is negative, the */
|
||||
/* function's return value is~0 if the font format is */
|
||||
/* recognized, or non-zero otherwise. The function */
|
||||
/* allocates a more or less empty face handle in */
|
||||
/* `*aface' (if `aface' isn't NULL); the only two */
|
||||
/* useful fields in this special case are */
|
||||
/* `face->num_faces' and `face->style_flags'. For any */
|
||||
/* negative value of `face_index', `face->num_faces' */
|
||||
/* gives the number of faces within the font file. For */
|
||||
/* the negative value `-(N+1)' (with `N' a 16-bit */
|
||||
/* value), bits 16-30 in `face->style_flags' give the */
|
||||
/* number of named instances in face `N' if we have a */
|
||||
/* GX variation font (or zero otherwise). After */
|
||||
/* examination, the returned @FT_Face structure should */
|
||||
/* be deallocated with a call to @FT_Done_Face. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* aface :: A handle to a new face object. If `face_index' is */
|
||||
/* greater than or equal to zero, it must be non-NULL. */
|
||||
/* See note below. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
@@ -2064,16 +2111,6 @@ FT_BEGIN_HEADER
|
||||
/* slot for the face object that can be accessed directly through */
|
||||
/* `face->glyph'. */
|
||||
/* */
|
||||
/* FT_Open_Face can be used to quickly check whether the font */
|
||||
/* format of a given font resource is supported by FreeType. If the */
|
||||
/* `face_index' field is negative, the function's return value is~0 */
|
||||
/* if the font format is recognized, or non-zero otherwise; */
|
||||
/* the function returns a more or less empty face handle in `*aface' */
|
||||
/* (if `aface' isn't NULL). The only useful field in this special */
|
||||
/* case is `face->num_faces' that gives the number of faces within */
|
||||
/* the font file. After examination, the returned @FT_Face structure */
|
||||
/* should be deallocated with a call to @FT_Done_Face. */
|
||||
/* */
|
||||
/* Each new face object created with this function also owns a */
|
||||
/* default @FT_Size object, accessible as `face->size'. */
|
||||
/* */
|
||||
@@ -2084,6 +2121,74 @@ FT_BEGIN_HEADER
|
||||
/* See the discussion of reference counters in the description of */
|
||||
/* @FT_Reference_Face. */
|
||||
/* */
|
||||
/* To loop over all faces, use code similar to the following snippet */
|
||||
/* (omitting the error handling). */
|
||||
/* */
|
||||
/* { */
|
||||
/* ... */
|
||||
/* FT_Face face; */
|
||||
/* FT_Long i, num_faces; */
|
||||
/* */
|
||||
/* */
|
||||
/* error = FT_Open_Face( library, args, -1, &face ); */
|
||||
/* if ( error ) { ... } */
|
||||
/* */
|
||||
/* num_faces = face->num_faces; */
|
||||
/* FT_Done_Face( face ); */
|
||||
/* */
|
||||
/* for ( i = 0; i < num_faces; i++ ) */
|
||||
/* { */
|
||||
/* ... */
|
||||
/* error = FT_Open_Face( library, args, i, &face ); */
|
||||
/* ... */
|
||||
/* FT_Done_Face( face ); */
|
||||
/* ... */
|
||||
/* } */
|
||||
/* } */
|
||||
/* */
|
||||
/* To loop over all valid values for `face_index', use something */
|
||||
/* similar to the following snippet, again without error handling. */
|
||||
/* The code accesses all faces immediately (thus only a single call */
|
||||
/* of `FT_Open_Face' within the do-loop), with and without named */
|
||||
/* instances. */
|
||||
/* */
|
||||
/* { */
|
||||
/* ... */
|
||||
/* FT_Face face; */
|
||||
/* */
|
||||
/* FT_Long num_faces = 0; */
|
||||
/* FT_Long num_instances = 0; */
|
||||
/* */
|
||||
/* FT_Long face_idx = 0; */
|
||||
/* FT_Long instance_idx = 0; */
|
||||
/* */
|
||||
/* */
|
||||
/* do */
|
||||
/* { */
|
||||
/* FT_Long id = ( instance_idx << 16 ) + face_idx; */
|
||||
/* */
|
||||
/* */
|
||||
/* error = FT_Open_Face( library, args, id, &face ); */
|
||||
/* if ( error ) { ... } */
|
||||
/* */
|
||||
/* num_faces = face->num_faces; */
|
||||
/* num_instances = face->style_flags >> 16; */
|
||||
/* */
|
||||
/* ... */
|
||||
/* */
|
||||
/* FT_Done_Face( face ); */
|
||||
/* */
|
||||
/* if ( instance_idx < num_instances ) */
|
||||
/* instance_idx++; */
|
||||
/* else */
|
||||
/* { */
|
||||
/* face_idx++; */
|
||||
/* instance_idx = 0; */
|
||||
/* } */
|
||||
/* */
|
||||
/* } while ( face_idx < num_faces ) */
|
||||
/* } */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Open_Face( FT_Library library,
|
||||
const FT_Open_Args* args,
|
||||
@@ -2521,7 +2626,7 @@ FT_BEGIN_HEADER
|
||||
* FT_LOAD_XXX
|
||||
*
|
||||
* @description:
|
||||
* A list of bit-field constants used with @FT_Load_Glyph to indicate
|
||||
* A list of bit field constants used with @FT_Load_Glyph to indicate
|
||||
* what kind of operations to perform during glyph loading.
|
||||
*
|
||||
* @values:
|
||||
@@ -2638,6 +2743,16 @@ FT_BEGIN_HEADER
|
||||
* bitmaps transparently. Those bitmaps will be in the
|
||||
* @FT_PIXEL_MODE_GRAY format.
|
||||
*
|
||||
* FT_LOAD_COMPUTE_METRICS ::
|
||||
* This flag sets computing glyph metrics without the use of bundled
|
||||
* metrics tables (for example, the `hdmx' table in TrueType fonts).
|
||||
* Well-behaving fonts have optimized bundled metrics and these should
|
||||
* be used. This flag is mainly used by font validating or font
|
||||
* editing applications, which need to ignore, verify, or edit those
|
||||
* tables.
|
||||
*
|
||||
* Currently, this flag is only implemented for TrueType fonts.
|
||||
*
|
||||
* FT_LOAD_CROP_BITMAP ::
|
||||
* Ignored. Deprecated.
|
||||
*
|
||||
@@ -2683,6 +2798,7 @@ FT_BEGIN_HEADER
|
||||
#define FT_LOAD_NO_AUTOHINT ( 1L << 15 )
|
||||
/* Bits 16..19 are used by `FT_LOAD_TARGET_' */
|
||||
#define FT_LOAD_COLOR ( 1L << 20 )
|
||||
#define FT_LOAD_COMPUTE_METRICS ( 1L << 21 )
|
||||
|
||||
/* */
|
||||
|
||||
@@ -2705,9 +2821,6 @@ FT_BEGIN_HEADER
|
||||
* have specified (e.g., the TrueType bytecode interpreter). You can set
|
||||
* @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
|
||||
*
|
||||
* Also note that @FT_LOAD_TARGET_LIGHT is an exception, in that it
|
||||
* always implies @FT_LOAD_FORCE_AUTOHINT.
|
||||
*
|
||||
* @values:
|
||||
* FT_LOAD_TARGET_NORMAL ::
|
||||
* This corresponds to the default hinting algorithm, optimized for
|
||||
@@ -2715,11 +2828,14 @@ FT_BEGIN_HEADER
|
||||
* @FT_LOAD_TARGET_MONO instead.
|
||||
*
|
||||
* FT_LOAD_TARGET_LIGHT ::
|
||||
* A lighter hinting algorithm for non-monochrome modes. Many
|
||||
* generated glyphs are more fuzzy but better resemble its original
|
||||
* shape. A bit like rendering on Mac OS~X.
|
||||
*
|
||||
* As a special exception, this target implies @FT_LOAD_FORCE_AUTOHINT.
|
||||
* A lighter hinting algorithm for gray-level modes. Many generated
|
||||
* glyphs are fuzzier but better resemble their original shape. This
|
||||
* is achieved by snapping glyphs to the pixel grid only vertically
|
||||
* (Y-axis), as is done by Microsoft's ClearType and Adobe's
|
||||
* proprietary font renderer. This preserves inter-glyph spacing in
|
||||
* horizontal text. The snapping is done either by the native font
|
||||
* driver if the driver itself and the font support it or by the
|
||||
* auto-hinter.
|
||||
*
|
||||
* FT_LOAD_TARGET_MONO ::
|
||||
* Strong hinting algorithm that should only be used for monochrome
|
||||
@@ -2826,7 +2942,10 @@ FT_BEGIN_HEADER
|
||||
/* field in the @FT_GlyphSlotRec structure gives the format of the */
|
||||
/* returned bitmap. */
|
||||
/* */
|
||||
/* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity. */
|
||||
/* All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity, */
|
||||
/* indicating pixel coverage. Use linear alpha blending and gamma */
|
||||
/* correction to correctly render non-monochrome glyph bitmaps onto a */
|
||||
/* surface; see @FT_Render_Glyph. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* FT_RENDER_MODE_NORMAL :: */
|
||||
@@ -2912,6 +3031,83 @@ FT_BEGIN_HEADER
|
||||
/* To get meaningful results, font scaling values must be set with */
|
||||
/* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */
|
||||
/* */
|
||||
/* When FreeType outputs a bitmap of a glyph, it really outputs an */
|
||||
/* alpha coverage map. If a pixel is completely covered by a */
|
||||
/* filled-in outline, the bitmap contains 0xFF at that pixel, meaning */
|
||||
/* that 0xFF/0xFF fraction of that pixel is covered, meaning the */
|
||||
/* pixel is 100% black (or 0% bright). If a pixel is only 50% */
|
||||
/* covered (value 0x80), the pixel is made 50% black (50% bright or a */
|
||||
/* middle shade of grey). 0% covered means 0% black (100% bright or */
|
||||
/* white). */
|
||||
/* */
|
||||
/* On high-DPI screens like on smartphones and tablets, the pixels */
|
||||
/* are so small that their chance of being completely covered and */
|
||||
/* therefore completely black are fairly good. On the low-DPI */
|
||||
/* screens, however, the situation is different. The pixels are too */
|
||||
/* large for most of the details of a glyph and shades of gray are */
|
||||
/* the norm rather than the exception. */
|
||||
/* */
|
||||
/* This is relevant because all our screens have a second problem: */
|
||||
/* they are not linear. 1~+~1 is not~2. Twice the value does not */
|
||||
/* result in twice the brightness. When a pixel is only 50% covered, */
|
||||
/* the coverage map says 50% black, and this translates to a pixel */
|
||||
/* value of 128 when you use 8~bits per channel (0-255). However, */
|
||||
/* this does not translate to 50% brightness for that pixel on our */
|
||||
/* sRGB and gamma~2.2 screens. Due to their non-linearity, they */
|
||||
/* dwell longer in the darks and only a pixel value of about 186 */
|
||||
/* results in 50% brightness – 128 ends up too dark on both bright */
|
||||
/* and dark backgrounds. The net result is that dark text looks */
|
||||
/* burnt-out, pixely and blotchy on bright background, bright text */
|
||||
/* too frail on dark backgrounds, and colored text on colored */
|
||||
/* background (for example, red on green) seems to have dark halos or */
|
||||
/* `dirt' around it. The situation is especially ugly for diagonal */
|
||||
/* stems like in `w' glyph shapes where the quality of FreeType's */
|
||||
/* anti-aliasing depends on the correct display of grays. On */
|
||||
/* high-DPI screens where smaller, fully black pixels reign supreme, */
|
||||
/* this doesn't matter, but on our low-DPI screens with all the gray */
|
||||
/* shades, it does. 0% and 100% brightness are the same things in */
|
||||
/* linear and non-linear space, just all the shades in-between */
|
||||
/* aren't. */
|
||||
/* */
|
||||
/* The blending function for placing text over a background is */
|
||||
/* */
|
||||
/* { */
|
||||
/* dst = alpha * src + (1 - alpha) * dst , */
|
||||
/* } */
|
||||
/* */
|
||||
/* which is known as the OVER operator. */
|
||||
/* */
|
||||
/* To correctly composite an antialiased pixel of a glyph onto a */
|
||||
/* surface, */
|
||||
/* */
|
||||
/* 1. take the foreground and background colors (e.g., in sRGB space) */
|
||||
/* and apply gamma to get them in a linear space, */
|
||||
/* */
|
||||
/* 2. use OVER to blend the two linear colors using the glyph pixel */
|
||||
/* as the alpha value (remember, the glyph bitmap is an alpha */
|
||||
/* coverage bitmap), and */
|
||||
/* */
|
||||
/* 3. apply inverse gamma to the blended pixel and write it back to */
|
||||
/* the image. */
|
||||
/* */
|
||||
/* Internal testing at Adobe found that a target inverse gamma of~1.8 */
|
||||
/* for step~3 gives good results across a wide range of displays with */
|
||||
/* an sRGB gamma curve or a similar one. */
|
||||
/* */
|
||||
/* This process can cost performance. There is an approximation that */
|
||||
/* does not need to know about the background color; see */
|
||||
/* https://bel.fi/alankila/lcd/ and */
|
||||
/* https://bel.fi/alankila/lcd/alpcor.html for details. */
|
||||
/* */
|
||||
/* *ATTENTION*: Linear blending is even more important when dealing */
|
||||
/* with subpixel-rendered glyphs to prevent color-fringing! A */
|
||||
/* subpixel-rendered glyph must first be filtered with a filter that */
|
||||
/* gives equal weight to the three color primaries and does not */
|
||||
/* exceed a sum of 0x100, see section @lcd_filtering. Then the */
|
||||
/* only difference to gray linear blending is that subpixel-rendered */
|
||||
/* linear blending is done 3~times per pixel: red foreground subpixel */
|
||||
/* to red background subpixel and so on for green and blue. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Render_Glyph( FT_GlyphSlot slot,
|
||||
FT_Render_Mode render_mode );
|
||||
@@ -2927,15 +3123,22 @@ FT_BEGIN_HEADER
|
||||
/* @FT_Get_Kerning. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* FT_KERNING_DEFAULT :: Return scaled and grid-fitted kerning */
|
||||
/* distances (value is~0). */
|
||||
/* FT_KERNING_DEFAULT :: Return grid-fitted kerning distances in */
|
||||
/* pixels (value is~0). Whether they are */
|
||||
/* scaled depends on @FT_LOAD_NO_SCALE. */
|
||||
/* */
|
||||
/* FT_KERNING_UNFITTED :: Return scaled but un-grid-fitted kerning */
|
||||
/* distances. */
|
||||
/* FT_KERNING_UNFITTED :: Return un-grid-fitted kerning distances in */
|
||||
/* 26.6 fractional pixels. Whether they are */
|
||||
/* scaled depends on @FT_LOAD_NO_SCALE. */
|
||||
/* */
|
||||
/* FT_KERNING_UNSCALED :: Return the kerning vector in original font */
|
||||
/* units. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* FT_KERNING_DEFAULT returns full pixel values; it also makes */
|
||||
/* FreeType heuristically scale down kerning distances at small ppem */
|
||||
/* values so that they don't become too big. */
|
||||
/* */
|
||||
typedef enum FT_Kerning_Mode_
|
||||
{
|
||||
FT_KERNING_DEFAULT = 0,
|
||||
@@ -2972,9 +3175,10 @@ FT_BEGIN_HEADER
|
||||
/* kerning vector. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* akerning :: The kerning vector. This is either in font units */
|
||||
/* or in pixels (26.6 format) for scalable formats, */
|
||||
/* and in pixels for fixed-sizes formats. */
|
||||
/* akerning :: The kerning vector. This is either in font units, */
|
||||
/* fractional pixels (26.6 format), or pixels for */
|
||||
/* scalable formats, and in pixels for fixed-sizes */
|
||||
/* formats. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
@@ -3259,6 +3463,13 @@ FT_BEGIN_HEADER
|
||||
/* } */
|
||||
/* } */
|
||||
/* */
|
||||
/* Be aware that character codes can have values up to 0xFFFFFFFF; */
|
||||
/* this might happen for non-Unicode or malformed cmaps. However, */
|
||||
/* even with regular Unicode encoding, so-called `last resort fonts' */
|
||||
/* (using SFNT cmap format 13, see function @FT_Get_CMap_Format) */
|
||||
/* normally have entries for all Unicode characters up to 0x1FFFFF, */
|
||||
/* which can cause *a lot* of iterations. */
|
||||
/* */
|
||||
/* Note that `*agindex' is set to~0 if the charmap is empty. The */
|
||||
/* result itself can be~0 in two cases: if the charmap is empty or */
|
||||
/* if the value~0 is the first valid character code. */
|
||||
@@ -3454,6 +3665,9 @@ FT_BEGIN_HEADER
|
||||
/* bitmaps available in the font, then the font is unembeddable. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The flags are ORed together, thus more than a single value can be */
|
||||
/* returned. */
|
||||
/* */
|
||||
/* While the fsType flags can indicate that a font may be embedded, a */
|
||||
/* license with the font vendor may be separately required to use the */
|
||||
/* font in this way. */
|
||||
@@ -3839,7 +4053,8 @@ FT_BEGIN_HEADER
|
||||
/* a :: The number to be rounded. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The result of `(a + 0x8000) & -0x10000'. */
|
||||
/* `a' rounded to nearest 16.16 fixed integer, halfway cases away */
|
||||
/* from zero. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Fixed )
|
||||
FT_RoundFix( FT_Fixed a );
|
||||
@@ -3858,7 +4073,7 @@ FT_BEGIN_HEADER
|
||||
/* a :: The number for which the ceiling function is to be computed. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The result of `(a + 0x10000 - 1) & -0x10000'. */
|
||||
/* `a' rounded towards plus infinity. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Fixed )
|
||||
FT_CeilFix( FT_Fixed a );
|
||||
@@ -3877,7 +4092,7 @@ FT_BEGIN_HEADER
|
||||
/* a :: The number for which the floor function is to be computed. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* The result of `a & -0x10000'. */
|
||||
/* `a' rounded towards minus infinity. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Fixed )
|
||||
FT_FloorFix( FT_Fixed a );
|
||||
@@ -3958,7 +4173,7 @@ FT_BEGIN_HEADER
|
||||
*/
|
||||
#define FREETYPE_MAJOR 2
|
||||
#define FREETYPE_MINOR 6
|
||||
#define FREETYPE_PATCH 0
|
||||
#define FREETYPE_PATCH 2
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@@ -247,8 +247,8 @@ FT_BEGIN_HEADER
|
||||
*/
|
||||
typedef struct FT_Prop_GlyphToScriptMap_
|
||||
{
|
||||
FT_Face face;
|
||||
FT_Byte* map;
|
||||
FT_Face face;
|
||||
FT_UShort* map;
|
||||
|
||||
} FT_Prop_GlyphToScriptMap;
|
||||
|
||||
@@ -439,6 +439,59 @@ FT_BEGIN_HEADER
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @property:
|
||||
* no-stem-darkening[autofit]
|
||||
*
|
||||
* @description:
|
||||
* *Experimental* *only,* *requires* *linear* *alpha* *blending* *and*
|
||||
* *gamma* *correction*
|
||||
*
|
||||
* Stem darkening emboldens glyphs at smaller sizes to make them more
|
||||
* readable on common low-DPI screens when using linear alpha blending
|
||||
* and gamma correction, see @FT_Render_Glyph. When not using linear
|
||||
* alpha blending and gamma correction, glyphs will appear heavy and
|
||||
* fuzzy!
|
||||
*
|
||||
* Gamma correction essentially lightens fonts since shades of grey are
|
||||
* shifted to higher pixel values (=~higher brightness) to match the
|
||||
* original intention to the reality of our screens. The side-effect is
|
||||
* that glyphs `thin out'. Mac OS~X and Adobe's proprietary font
|
||||
* rendering library implement a counter-measure: stem darkening at
|
||||
* smaller sizes where shades of gray dominate. By emboldening a glyph
|
||||
* slightly in relation to its pixel size, individual pixels get higher
|
||||
* coverage of filled-in outlines and are therefore `blacker'. This
|
||||
* counteracts the `thinning out' of glyphs, making text remain readable
|
||||
* at smaller sizes. All glyphs that pass through the auto-hinter will
|
||||
* be emboldened unless this property is set to TRUE.
|
||||
*
|
||||
* See the description of the CFF driver for algorithmic details. Total
|
||||
* consistency with the CFF driver is currently not achieved because the
|
||||
* emboldening method differs and glyphs must be scaled down on the
|
||||
* Y-axis to keep outline points inside their precomputed blue zones.
|
||||
* The smaller the size (especially 9ppem and down), the higher the loss
|
||||
* of emboldening versus the CFF driver.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* @property:
|
||||
* darkening-parameters[autofit]
|
||||
*
|
||||
* @description:
|
||||
* *Experimental* *only*
|
||||
*
|
||||
* See the description of the CFF driver for details. This
|
||||
* implementation appropriates the
|
||||
* CFF_CONFIG_OPTION_DARKENING_PARAMETER_* #defines for consistency.
|
||||
* Note the differences described in @no-stem-darkening[autofit].
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
@@ -111,8 +111,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @order:
|
||||
* hinting-engine
|
||||
* no-stem-darkening
|
||||
* darkening-parameters
|
||||
* no-stem-darkening[cff]
|
||||
* darkening-parameters[cff]
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -175,7 +175,7 @@ FT_BEGIN_HEADER
|
||||
/**************************************************************************
|
||||
*
|
||||
* @property:
|
||||
* no-stem-darkening
|
||||
* no-stem-darkening[cff]
|
||||
*
|
||||
* @description:
|
||||
* By default, the Adobe CFF engine darkens stems at smaller sizes,
|
||||
@@ -205,7 +205,7 @@ FT_BEGIN_HEADER
|
||||
/**************************************************************************
|
||||
*
|
||||
* @property:
|
||||
* darkening-parameters
|
||||
* darkening-parameters[cff]
|
||||
*
|
||||
* @description:
|
||||
* By default, the Adobe CFF engine darkens stems as follows (if the
|
||||
@@ -119,3 +119,17 @@
|
||||
/* lcd_filtering */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
/***************************************************************************/
|
||||
/* */
|
||||
/* <Chapter> */
|
||||
/* error_codes */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* Error Codes */
|
||||
/* */
|
||||
/* <Sections> */
|
||||
/* error_enumerations */
|
||||
/* error_code_values */
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
@@ -16,18 +16,43 @@
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
/*******************************************************************/
|
||||
/*******************************************************************/
|
||||
/***** *****/
|
||||
/***** LIST OF ERROR CODES/MESSAGES *****/
|
||||
/***** *****/
|
||||
/*******************************************************************/
|
||||
/*******************************************************************/
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Section> */
|
||||
/* error_code_values */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* Error Code Values */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* All possible error codes returned by FreeType functions. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The list below is taken verbatim from the file `fterrdef.h' */
|
||||
/* (loaded automatically by including `FT_FREETYPE_H'). The first */
|
||||
/* argument of the `FT_ERROR_DEF_' macro is the error label; by */
|
||||
/* default, the prefix `FT_Err_' gets added so that you get error */
|
||||
/* names like `FT_Err_Cannot_Open_Resource'. The second argument is */
|
||||
/* the error code, and the last argument an error string, which is not */
|
||||
/* used by FreeType. */
|
||||
/* */
|
||||
/* Within your application you should *only* use error names and */
|
||||
/* *never* its numeric values! The latter might (and actually do) */
|
||||
/* change in forthcoming FreeType versions. */
|
||||
/* */
|
||||
/* Macro `FT_NOERRORDEF_' defines `FT_Err_Ok', which is always zero. */
|
||||
/* See the `Error Enumerations' subsection how to automatically */
|
||||
/* generate a list of error strings. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */
|
||||
/* including this file. */
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* FT_Err_XXX */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/* generic errors */
|
||||
|
||||
@@ -218,7 +243,7 @@
|
||||
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3,
|
||||
"no Unicode glyph name found" )
|
||||
FT_ERRORDEF_( Glyph_Too_Big, 0xA4,
|
||||
"glyph to big for hinting" )
|
||||
"glyph too big for hinting" )
|
||||
|
||||
/* BDF errors */
|
||||
|
||||
@@ -245,5 +270,7 @@
|
||||
FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA,
|
||||
"Font glyphs corrupted or missing fields" )
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/* END */
|
||||
@@ -18,68 +18,86 @@
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* This special header file is used to define the handling of FT2 */
|
||||
/* enumeration constants. It can also be used to generate error message */
|
||||
/* strings with a small macro trick explained below. */
|
||||
/* <Section> */
|
||||
/* error_enumerations */
|
||||
/* */
|
||||
/* I - Error Formats */
|
||||
/* ----------------- */
|
||||
/* <Title> */
|
||||
/* Error Enumerations */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* How to handle errors and error strings. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The header file `fterrors.h' (which is automatically included by */
|
||||
/* `freetype.h' defines the handling of FreeType's enumeration */
|
||||
/* constants. It can also be used to generate error message strings */
|
||||
/* with a small macro trick explained below. */
|
||||
/* */
|
||||
/* *Error* *Formats* */
|
||||
/* */
|
||||
/* 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 module where the error has happened (this is not compatible */
|
||||
/* with standard builds of FreeType 2). See the file `ftmoderr.h' for */
|
||||
/* more details. */
|
||||
/* with standard builds of FreeType 2, however). See the file */
|
||||
/* `ftmoderr.h' for more details. */
|
||||
/* */
|
||||
/* *Error* *Message* *Strings* */
|
||||
/* */
|
||||
/* II - Error Message strings */
|
||||
/* -------------------------- */
|
||||
/* */
|
||||
/* The error definitions below are made through special macros that */
|
||||
/* allow client applications to build a table of error message strings */
|
||||
/* if they need it. The strings are not included in a normal build of */
|
||||
/* FreeType 2 to save space (most client applications do not use */
|
||||
/* them). */
|
||||
/* Error definitions are set up with special macros that allow client */
|
||||
/* applications to build a table of error message strings. The */
|
||||
/* strings are not included in a normal build of FreeType 2 to */
|
||||
/* save space (most client applications do not use them). */
|
||||
/* */
|
||||
/* To do so, you have to define the following macros before including */
|
||||
/* this file: */
|
||||
/* */
|
||||
/* FT_ERROR_START_LIST :: */
|
||||
/* This macro is called before anything else to define the start of */
|
||||
/* the error list. It is followed by several FT_ERROR_DEF calls */
|
||||
/* (see below). */
|
||||
/* */
|
||||
/* FT_ERROR_DEF( e, v, s ) :: */
|
||||
/* This macro is called to define one single error. */
|
||||
/* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */
|
||||
/* `v' is the error numerical value. */
|
||||
/* `s' is the corresponding error string. */
|
||||
/* */
|
||||
/* FT_ERROR_END_LIST :: */
|
||||
/* This macro ends the list. */
|
||||
/* */
|
||||
/* Additionally, you have to undefine __FTERRORS_H__ before #including */
|
||||
/* this file. */
|
||||
/* */
|
||||
/* Here is a simple example: */
|
||||
/* { */
|
||||
/* FT_ERROR_START_LIST */
|
||||
/* } */
|
||||
/* */
|
||||
/* This macro is called before anything else to define the start of */
|
||||
/* the error list. It is followed by several FT_ERROR_DEF calls. */
|
||||
/* */
|
||||
/* { */
|
||||
/* FT_ERROR_DEF( e, v, s ) */
|
||||
/* } */
|
||||
/* */
|
||||
/* This macro is called to define one single error. `e' is the error */
|
||||
/* code identifier (e.g., `Invalid_Argument'), `v' is the error's */
|
||||
/* numerical value, and `s' is the corresponding error string. */
|
||||
/* */
|
||||
/* { */
|
||||
/* FT_ERROR_END_LIST */
|
||||
/* } */
|
||||
/* */
|
||||
/* This macro ends the list. */
|
||||
/* */
|
||||
/* Additionally, you have to undefine `__FTERRORS_H__' before */
|
||||
/* #including this file. */
|
||||
/* */
|
||||
/* Here is a simple example. */
|
||||
/* */
|
||||
/* { */
|
||||
/* #undef __FTERRORS_H__ */
|
||||
/* #define FT_ERRORDEF( e, v, s ) { e, s }, */
|
||||
/* #define FT_ERROR_START_LIST { */
|
||||
/* #define FT_ERROR_END_LIST { 0, NULL } }; */
|
||||
/* */
|
||||
/* const struct */
|
||||
/* { */
|
||||
/* #undef __FTERRORS_H__ */
|
||||
/* #define FT_ERRORDEF( e, v, s ) { e, s }, */
|
||||
/* #define FT_ERROR_START_LIST { */
|
||||
/* #define FT_ERROR_END_LIST { 0, 0 } }; */
|
||||
/* int err_code; */
|
||||
/* const char* err_msg; */
|
||||
/* } ft_errors[] = */
|
||||
/* */
|
||||
/* const struct */
|
||||
/* { */
|
||||
/* int err_code; */
|
||||
/* const char* err_msg; */
|
||||
/* } ft_errors[] = */
|
||||
/* #include FT_ERRORS_H */
|
||||
/* } */
|
||||
/* */
|
||||
/* #include FT_ERRORS_H */
|
||||
/* } */
|
||||
/* Note that `FT_Err_Ok' is _not_ defined with `FT_ERRORDEF' but with */
|
||||
/* `FT_NOERRORDEF'; it is always zero. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
/* */
|
||||
|
||||
#ifndef __FTERRORS_H__
|
||||
#define __FTERRORS_H__
|
||||
@@ -41,56 +41,78 @@ FT_BEGIN_HEADER
|
||||
* LCD Filtering
|
||||
*
|
||||
* @abstract:
|
||||
* Reduce color fringes of LCD-optimized bitmaps.
|
||||
* Reduce color fringes of subpixel-rendered bitmaps.
|
||||
*
|
||||
* @description:
|
||||
* The @FT_Library_SetLcdFilter API can be used to specify a low-pass
|
||||
* filter, which is then applied to LCD-optimized bitmaps generated
|
||||
* through @FT_Render_Glyph. This is useful to reduce color fringes
|
||||
* that would occur with unfiltered rendering.
|
||||
* Subpixel rendering exploits the color-striped structure of LCD
|
||||
* pixels, increasing the available resolution in the direction of the
|
||||
* stripe (usually horizontal RGB) by a factor of~3. Since these
|
||||
* subpixels are color pixels, using them unfiltered creates severe
|
||||
* color fringes. Use the @FT_Library_SetLcdFilter API to specify a
|
||||
* low-pass filter, which is then applied to subpixel-rendered bitmaps
|
||||
* generated through @FT_Render_Glyph. The filter sacrifices some of
|
||||
* the higher resolution to reduce color fringes, making the glyph image
|
||||
* slightly blurrier. Positional improvements will remain.
|
||||
*
|
||||
* Note that no filter is active by default, and that this function is
|
||||
* *not* implemented in default builds of the library. You need to
|
||||
* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
|
||||
* in order to activate it.
|
||||
*
|
||||
* FreeType generates alpha coverage maps, which are linear by nature.
|
||||
* For instance, the value 0x80 in bitmap representation means that
|
||||
* (within numerical precision) 0x80/0xFF fraction of that pixel is
|
||||
* covered by the glyph's outline. The blending function for placing
|
||||
* text over a background is
|
||||
* A filter should have two properties:
|
||||
*
|
||||
* {
|
||||
* dst = alpha * src + (1 - alpha) * dst ,
|
||||
* }
|
||||
* 1) It should be normalized, meaning the sum of the 5~components
|
||||
* should be 256 (0x100). It is possible to go above or under this
|
||||
* target sum, however: going under means tossing out contrast, going
|
||||
* over means invoking clamping and thereby non-linearities that
|
||||
* increase contrast somewhat at the expense of greater distortion
|
||||
* and color-fringing. Contrast is better enhanced through stem
|
||||
* darkening.
|
||||
*
|
||||
* which is known as OVER. However, when calculating the output of the
|
||||
* OVER operator, the source colors should first be transformed to a
|
||||
* linear color space, then alpha blended in that space, and transformed
|
||||
* back to the output color space.
|
||||
* 2) It should be color-balanced, meaning a filter `{~a, b, c, b, a~}'
|
||||
* where a~+ b~=~c. It distributes the computed coverage for one
|
||||
* subpixel to all subpixels equally, sacrificing some won resolution
|
||||
* but drastically reducing color-fringing. Positioning improvements
|
||||
* remain! Note that color-fringing can only really be minimized
|
||||
* when using a color-balanced filter and alpha-blending the glyph
|
||||
* onto a surface in linear space; see @FT_Render_Glyph.
|
||||
*
|
||||
* When linear light blending is used, the default FIR5 filtering
|
||||
* weights (as given by FT_LCD_FILTER_DEFAULT) are no longer optimal, as
|
||||
* they have been designed for black on white rendering while lacking
|
||||
* gamma correction. To preserve color neutrality, weights for a FIR5
|
||||
* filter should be chosen according to two free parameters `a' and `c',
|
||||
* and the FIR weights should be
|
||||
* Regarding the form, a filter can be a `boxy' filter or a `beveled'
|
||||
* filter. Boxy filters are sharper but are less forgiving of non-ideal
|
||||
* gamma curves of a screen (viewing angles!), beveled filters are
|
||||
* fuzzier but more tolerant.
|
||||
*
|
||||
* {
|
||||
* [a - c, a + c, 2 * a, a + c, a - c] .
|
||||
* }
|
||||
* Examples:
|
||||
*
|
||||
* This formula generates equal weights for all the color primaries
|
||||
* across the filter kernel, which makes it colorless. One suggested
|
||||
* set of weights is
|
||||
* - [0x10 0x40 0x70 0x40 0x10] is beveled and neither balanced nor
|
||||
* normalized.
|
||||
*
|
||||
* {
|
||||
* [0x10, 0x50, 0x60, 0x50, 0x10] ,
|
||||
* }
|
||||
* - [0x1A 0x33 0x4D 0x33 0x1A] is beveled and balanced but not
|
||||
* normalized.
|
||||
*
|
||||
* where `a' has value 0x30 and `b' value 0x20. The weights in filter
|
||||
* may have a sum larger than 0x100, which increases coloration slightly
|
||||
* but also improves contrast.
|
||||
* - [0x19 0x33 0x66 0x4c 0x19] is beveled and normalized but not
|
||||
* balanced.
|
||||
*
|
||||
* - [0x00 0x4c 0x66 0x4c 0x00] is boxily beveled and normalized but not
|
||||
* balanced.
|
||||
*
|
||||
* - [0x00 0x55 0x56 0x55 0x00] is boxy, normalized, and almost
|
||||
* balanced.
|
||||
*
|
||||
* - [0x08 0x4D 0x56 0x4D 0x08] is beveled, normalized and, almost
|
||||
* balanced.
|
||||
*
|
||||
* It is important to understand that linear alpha blending and gamma
|
||||
* correction is critical for correctly rendering glyphs onto surfaces
|
||||
* without artifacts and even more critical when subpixel rendering is
|
||||
* involved.
|
||||
*
|
||||
* Each of the 3~alpha values (subpixels) is independently used to blend
|
||||
* one color channel. That is, red alpha blends the red channel of the
|
||||
* text color with the red channel of the background pixel. The
|
||||
* distribution of density values by the color-balanced filter assumes
|
||||
* alpha blending is done in linear space; only then color artifacts
|
||||
* cancel out.
|
||||
*/
|
||||
|
||||
|
||||
@@ -111,10 +133,21 @@ FT_BEGIN_HEADER
|
||||
* The default filter reduces color fringes considerably, at the cost
|
||||
* of a slight blurriness in the output.
|
||||
*
|
||||
* It is a beveled, normalized, and color-balanced five-tap filter
|
||||
* that is more forgiving to screens with non-ideal gamma curves and
|
||||
* viewing angles. Note that while color-fringing is reduced, it can
|
||||
* only be minimized by using linear alpha blending and gamma
|
||||
* correction to render glyphs onto surfaces.
|
||||
*
|
||||
* FT_LCD_FILTER_LIGHT ::
|
||||
* The light filter is a variant that produces less blurriness at the
|
||||
* cost of slightly more color fringes than the default one. It might
|
||||
* be better, depending on taste, your monitor, or your personal vision.
|
||||
* The light filter is a variant that is sharper at the cost of
|
||||
* slightly more color fringes than the default one.
|
||||
*
|
||||
* It is a boxy, normalized, and color-balanced three-tap filter that
|
||||
* is less forgiving to screens with non-ideal gamma curves and
|
||||
* viewing angles. This filter works best when the rendering system
|
||||
* uses linear alpha blending and gamma correction to render glyphs
|
||||
* onto surfaces.
|
||||
*
|
||||
* FT_LCD_FILTER_LEGACY ::
|
||||
* This filter corresponds to the original libXft color filter. It
|
||||
@@ -126,14 +159,23 @@ FT_BEGIN_HEADER
|
||||
* This filter is only provided for comparison purposes, and might be
|
||||
* disabled or stay unsupported in the future.
|
||||
*
|
||||
* FT_LCD_FILTER_LEGACY1 ::
|
||||
* For historical reasons, the FontConfig library returns a different
|
||||
* enumeration value for legacy LCD filtering. To make code work that
|
||||
* (incorrectly) forwards FontConfig's enumeration value to
|
||||
* @FT_Library_SetLcdFilter without proper mapping, it is thus easiest
|
||||
* to have another enumeration value, which is completely equal to
|
||||
* `FT_LCD_FILTER_LEGACY'.
|
||||
*
|
||||
* @since:
|
||||
* 2.3.0
|
||||
* 2.3.0 (`FT_LCD_FILTER_LEGACY1' since 2.6.2)
|
||||
*/
|
||||
typedef enum FT_LcdFilter_
|
||||
{
|
||||
FT_LCD_FILTER_NONE = 0,
|
||||
FT_LCD_FILTER_DEFAULT = 1,
|
||||
FT_LCD_FILTER_LIGHT = 2,
|
||||
FT_LCD_FILTER_LEGACY1 = 3,
|
||||
FT_LCD_FILTER_LEGACY = 16,
|
||||
|
||||
FT_LCD_FILTER_MAX /* do not remove */
|
||||
@@ -208,9 +250,8 @@ FT_BEGIN_HEADER
|
||||
* @description:
|
||||
* Use this function to override the filter weights selected by
|
||||
* @FT_Library_SetLcdFilter. By default, FreeType uses the quintuple
|
||||
* (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x10,
|
||||
* 0x40, 0x70, 0x40, 0x10) for FT_LCD_FILTER_DEFAULT and
|
||||
* FT_LCD_FILTER_LEGACY.
|
||||
* (0x00, 0x55, 0x56, 0x55, 0x00) for FT_LCD_FILTER_LIGHT, and (0x08,
|
||||
* 0x4D, 0x56, 0x4D, 0x08) for FT_LCD_FILTER_DEFAULT.
|
||||
*
|
||||
* @input:
|
||||
* library ::
|
||||
@@ -203,9 +203,13 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* axis :: An axis descriptor table. */
|
||||
/* GX fonts contain slightly more data than MM. */
|
||||
/* Memory management of this pointer is done */
|
||||
/* internally by FreeType. */
|
||||
/* */
|
||||
/* namedstyle :: A named style table. */
|
||||
/* Only meaningful with GX. */
|
||||
/* Memory management of this pointer is done */
|
||||
/* internally by FreeType. */
|
||||
/* */
|
||||
typedef struct FT_MM_Var_
|
||||
{
|
||||
@@ -255,7 +259,8 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* amaster :: The Multiple Masters/GX var descriptor. */
|
||||
/* Allocates a data structure, which the user must free. */
|
||||
/* Allocates a data structure, which the user must */
|
||||
/* deallocate with `free' after use. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0~means success. */
|
||||
@@ -63,7 +63,7 @@ FT_BEGIN_HEADER
|
||||
/* psaux */
|
||||
/* pshinter */
|
||||
/* psnames */
|
||||
/* raster1, raster5 */
|
||||
/* raster1 */
|
||||
/* sfnt */
|
||||
/* smooth, smooth-lcd, smooth-lcdv */
|
||||
/* truetype */
|
||||
@@ -111,12 +111,14 @@ FT_BEGIN_HEADER
|
||||
#define FT_MODULE_HINTER 4 /* this module is a glyph hinter */
|
||||
#define FT_MODULE_STYLER 8 /* this module is a styler */
|
||||
|
||||
#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */
|
||||
#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */
|
||||
/* scalable fonts */
|
||||
#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */
|
||||
#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */
|
||||
/* support vector outlines */
|
||||
#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */
|
||||
#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */
|
||||
/* own hinter */
|
||||
#define FT_MODULE_DRIVER_HINTS_LIGHTLY 0x800 /* the driver's hinter */
|
||||
/* produces LIGHT hints */
|
||||
|
||||
|
||||
/* deprecated values */
|
||||
@@ -125,9 +127,10 @@ FT_BEGIN_HEADER
|
||||
#define ft_module_hinter FT_MODULE_HINTER
|
||||
#define ft_module_styler FT_MODULE_STYLER
|
||||
|
||||
#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE
|
||||
#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES
|
||||
#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER
|
||||
#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE
|
||||
#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES
|
||||
#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER
|
||||
#define ft_module_driver_hints_lightly FT_MODULE_DRIVER_HINTS_LIGHTLY
|
||||
|
||||
|
||||
typedef FT_Pointer FT_Module_Interface;
|
||||
@@ -354,8 +354,8 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* { */
|
||||
/* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */
|
||||
/* if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) */
|
||||
/* FT_Outline_Embolden( &face->slot->outline, strength ); */
|
||||
/* if ( face->glyph->format == FT_GLYPH_FORMAT_OUTLINE ) */
|
||||
/* FT_Outline_Embolden( &face->glyph->outline, strength ); */
|
||||
/* } */
|
||||
/* */
|
||||
/* To get meaningful results, font scaling values must be set with */
|
||||
@@ -225,8 +225,8 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* Return the unit vector corresponding to a given angle. After the
|
||||
* call, the value of `vec.x' will be `sin(angle)', and the value of
|
||||
* `vec.y' will be `cos(angle)'.
|
||||
* call, the value of `vec.x' will be `cos(angle)', and the value of
|
||||
* `vec.y' will be `sin(angle)'.
|
||||
*
|
||||
* This function is useful to retrieve both the sinus and cosinus of a
|
||||
* given angle quickly.
|
||||
@@ -52,6 +52,83 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* The TrueType driver's module name is `truetype'.
|
||||
*
|
||||
* We start with a list of definitions, kindly provided by Greg
|
||||
* Hitchcock.
|
||||
*
|
||||
* _Bi-Level_ _Rendering_
|
||||
*
|
||||
* Monochromatic rendering, exclusively used in the early days of
|
||||
* TrueType by both Apple and Microsoft. Microsoft's GDI interface
|
||||
* supported hinting of the right-side bearing point, such that the
|
||||
* advance width could be non-linear. Most often this was done to
|
||||
* achieve some level of glyph symmetry. To enable reasonable
|
||||
* performance (e.g., not having to run hinting on all glyphs just to
|
||||
* get the widths) there was a bit in the head table indicating if the
|
||||
* side bearing was hinted, and additional tables, `hdmx' and `LTSH', to
|
||||
* cache hinting widths across multiple sizes and device aspect ratios.
|
||||
*
|
||||
* _Font_ _Smoothing_
|
||||
*
|
||||
* Microsoft's GDI implementation of anti-aliasing. Not traditional
|
||||
* anti-aliasing as the outlines were hinted before the sampling. The
|
||||
* widths matched the bi-level rendering.
|
||||
*
|
||||
* _ClearType_ _Rendering_
|
||||
*
|
||||
* Technique that uses physical subpixels to improve rendering on LCD
|
||||
* (and other) displays. Because of the higher resolution, many methods
|
||||
* of improving symmetry in glyphs through hinting the right-side
|
||||
* bearing were no longer necessary. This lead to what GDI calls
|
||||
* `natural widths' ClearType, see
|
||||
* http://www.beatstamm.com/typography/RTRCh4.htm#Sec21. Since hinting
|
||||
* has extra resolution, most non-linearity went away, but it is still
|
||||
* possible for hints to change the advance widths in this mode.
|
||||
*
|
||||
* _ClearType_ _Compatible_ _Widths_
|
||||
*
|
||||
* One of the earliest challenges with ClearType was allowing the
|
||||
* implementation in GDI to be selected without requiring all UI and
|
||||
* documents to reflow. To address this, a compatible method of
|
||||
* rendering ClearType was added where the font hints are executed once
|
||||
* to determine the width in bi-level rendering, and then re-run in
|
||||
* ClearType, with the difference in widths being absorbed in the font
|
||||
* hints for ClearType (mostly in the white space of hints); see
|
||||
* http://www.beatstamm.com/typography/RTRCh4.htm#Sec20. Somewhat by
|
||||
* definition, compatible width ClearType allows for non-linear widths,
|
||||
* but only when the bi-level version has non-linear widths.
|
||||
*
|
||||
* _ClearType_ _Subpixel_ _Positioning_
|
||||
*
|
||||
* One of the nice benefits of ClearType is the ability to more crisply
|
||||
* display fractional widths; unfortunately, the GDI model of integer
|
||||
* bitmaps did not support this. However, the WPF and Direct Write
|
||||
* frameworks do support fractional widths. DWrite calls this `natural
|
||||
* mode', not to be confused with GDI's `natural widths'. Subpixel
|
||||
* positioning, in the current implementation of Direct Write,
|
||||
* unfortunately does not support hinted advance widths, see
|
||||
* http://www.beatstamm.com/typography/RTRCh4.htm#Sec22. Note that the
|
||||
* TrueType interpreter fully allows the advance width to be adjusted in
|
||||
* this mode, just the DWrite client will ignore those changes.
|
||||
*
|
||||
* _ClearType_ _Backwards_ _Compatibility_
|
||||
*
|
||||
* This is a set of exceptions made in the TrueType interpreter to
|
||||
* minimize hinting techniques that were problematic with the extra
|
||||
* resolution of ClearType; see
|
||||
* http://www.beatstamm.com/typography/RTRCh4.htm#Sec1 and
|
||||
* http://www.microsoft.com/typography/cleartype/truetypecleartype.aspx.
|
||||
* This technique is not to be confused with ClearType compatible
|
||||
* widths. ClearType backwards compatibility has no direct impact on
|
||||
* changing advance widths, but there might be an indirect impact on
|
||||
* disabling some deltas. This could be worked around in backwards
|
||||
* compatibility mode.
|
||||
*
|
||||
* _Native_ _ClearType_ _Mode_
|
||||
*
|
||||
* (Not to be confused with `natural widths'.) This mode removes all
|
||||
* the exceptions in the TrueType interpreter when running with
|
||||
* ClearType. Any issues on widths would still apply, though.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ FT_BEGIN_HEADER
|
||||
FT_MulFix_arm( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
{
|
||||
register FT_Int32 t, t2;
|
||||
FT_Int32 t, t2;
|
||||
|
||||
|
||||
__asm
|
||||
@@ -80,7 +80,7 @@ FT_BEGIN_HEADER
|
||||
FT_MulFix_arm( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
{
|
||||
register FT_Int32 t, t2;
|
||||
FT_Int32 t, t2;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
@@ -116,7 +116,7 @@ FT_BEGIN_HEADER
|
||||
FT_MulFix_i386( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
{
|
||||
register FT_Int32 result;
|
||||
FT_Int32 result;
|
||||
|
||||
|
||||
__asm__ __volatile__ (
|
||||
@@ -152,7 +152,7 @@ FT_BEGIN_HEADER
|
||||
FT_MulFix_i386( FT_Int32 a,
|
||||
FT_Int32 b )
|
||||
{
|
||||
register FT_Int32 result;
|
||||
FT_Int32 result;
|
||||
|
||||
__asm
|
||||
{
|
||||
@@ -299,6 +299,18 @@ FT_BEGIN_HEADER
|
||||
FT_Long scaling );
|
||||
|
||||
|
||||
/*
|
||||
* This function normalizes a vector and returns its original length.
|
||||
* The normalized vector is a 16.16 fixed-point unit vector with length
|
||||
* close to 0x10000. The accuracy of the returned length is limited to
|
||||
* 16 bits also. The function utilizes quick inverse square root
|
||||
* approximation without divisions and square roots relying on Newton's
|
||||
* iterations instead.
|
||||
*/
|
||||
FT_BASE( FT_UInt32 )
|
||||
FT_Vector_NormLen( FT_Vector* vector );
|
||||
|
||||
|
||||
/*
|
||||
* Return -1, 0, or +1, depending on the orientation of a given corner.
|
||||
* We use the Cartesian coordinate system, with positive vertical values
|
||||
@@ -83,12 +83,12 @@ FT_BEGIN_HEADER
|
||||
x > y ? x + ( 3 * y >> 3 ) \
|
||||
: y + ( 3 * x >> 3 ) )
|
||||
|
||||
/* we use the TYPEOF macro to suppress signedness compilation warnings */
|
||||
#define FT_PAD_FLOOR( x, n ) ( (x) & ~TYPEOF( x )( (n)-1 ) )
|
||||
/* we use FT_TYPEOF to suppress signedness compilation warnings */
|
||||
#define FT_PAD_FLOOR( x, n ) ( (x) & ~FT_TYPEOF( x )( (n)-1 ) )
|
||||
#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n )
|
||||
#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n )
|
||||
|
||||
#define FT_PIX_FLOOR( x ) ( (x) & ~TYPEOF( x )63 )
|
||||
#define FT_PIX_FLOOR( x ) ( (x) & ~FT_TYPEOF( x )63 )
|
||||
#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
|
||||
#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
|
||||
|
||||
@@ -506,6 +506,9 @@ FT_BEGIN_HEADER
|
||||
#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
||||
FT_MODULE_DRIVER_HAS_HINTER )
|
||||
|
||||
#define FT_DRIVER_HINTS_LIGHTLY( x ) ( FT_MODULE_CLASS( x )->module_flags & \
|
||||
FT_MODULE_DRIVER_HINTS_LIGHTLY )
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@@ -734,24 +734,24 @@ FT_BEGIN_HEADER
|
||||
* The header files containing the services.
|
||||
*/
|
||||
|
||||
#define FT_SERVICE_BDF_H <internal/services/svbdf.h>
|
||||
#define FT_SERVICE_CID_H <internal/services/svcid.h>
|
||||
#define FT_SERVICE_GLYPH_DICT_H <internal/services/svgldict.h>
|
||||
#define FT_SERVICE_GX_VALIDATE_H <internal/services/svgxval.h>
|
||||
#define FT_SERVICE_KERNING_H <internal/services/svkern.h>
|
||||
#define FT_SERVICE_MULTIPLE_MASTERS_H <internal/services/svmm.h>
|
||||
#define FT_SERVICE_OPENTYPE_VALIDATE_H <internal/services/svotval.h>
|
||||
#define FT_SERVICE_PFR_H <internal/services/svpfr.h>
|
||||
#define FT_SERVICE_POSTSCRIPT_CMAPS_H <internal/services/svpscmap.h>
|
||||
#define FT_SERVICE_POSTSCRIPT_INFO_H <internal/services/svpsinfo.h>
|
||||
#define FT_SERVICE_POSTSCRIPT_NAME_H <internal/services/svpostnm.h>
|
||||
#define FT_SERVICE_PROPERTIES_H <internal/services/svprop.h>
|
||||
#define FT_SERVICE_SFNT_H <internal/services/svsfnt.h>
|
||||
#define FT_SERVICE_TRUETYPE_ENGINE_H <internal/services/svtteng.h>
|
||||
#define FT_SERVICE_TT_CMAP_H <internal/services/svttcmap.h>
|
||||
#define FT_SERVICE_WINFNT_H <internal/services/svwinfnt.h>
|
||||
#define FT_SERVICE_FONT_FORMAT_H <internal/services/svfntfmt.h>
|
||||
#define FT_SERVICE_TRUETYPE_GLYF_H <internal/services/svttglyf.h>
|
||||
#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
|
||||
#define FT_SERVICE_CID_H <freetype/internal/services/svcid.h>
|
||||
#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
|
||||
#define FT_SERVICE_GX_VALIDATE_H <freetype/internal/services/svgxval.h>
|
||||
#define FT_SERVICE_KERNING_H <freetype/internal/services/svkern.h>
|
||||
#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h>
|
||||
#define FT_SERVICE_OPENTYPE_VALIDATE_H <freetype/internal/services/svotval.h>
|
||||
#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h>
|
||||
#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h>
|
||||
#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h>
|
||||
#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h>
|
||||
#define FT_SERVICE_PROPERTIES_H <freetype/internal/services/svprop.h>
|
||||
#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
|
||||
#define FT_SERVICE_TRUETYPE_ENGINE_H <freetype/internal/services/svtteng.h>
|
||||
#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
|
||||
#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
|
||||
#define FT_SERVICE_FONT_FORMAT_H <freetype/internal/services/svfntfmt.h>
|
||||
#define FT_SERVICE_TRUETYPE_GLYF_H <freetype/internal/services/svttglyf.h>
|
||||
|
||||
/* */
|
||||
|
||||
@@ -148,7 +148,7 @@ FT_TRACE_DEF( afcjk )
|
||||
FT_TRACE_DEF( aflatin )
|
||||
FT_TRACE_DEF( aflatin2 )
|
||||
FT_TRACE_DEF( afwarp )
|
||||
FT_TRACE_DEF( afharfbuzz )
|
||||
FT_TRACE_DEF( afshaper )
|
||||
FT_TRACE_DEF( afglobal )
|
||||
|
||||
/* END */
|
||||
@@ -24,28 +24,28 @@
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#define FT_INTERNAL_OBJECTS_H <internal/ftobjs.h>
|
||||
#define FT_INTERNAL_PIC_H <internal/ftpic.h>
|
||||
#define FT_INTERNAL_STREAM_H <internal/ftstream.h>
|
||||
#define FT_INTERNAL_MEMORY_H <internal/ftmemory.h>
|
||||
#define FT_INTERNAL_DEBUG_H <internal/ftdebug.h>
|
||||
#define FT_INTERNAL_CALC_H <internal/ftcalc.h>
|
||||
#define FT_INTERNAL_DRIVER_H <internal/ftdriver.h>
|
||||
#define FT_INTERNAL_TRACE_H <internal/fttrace.h>
|
||||
#define FT_INTERNAL_GLYPH_LOADER_H <internal/ftgloadr.h>
|
||||
#define FT_INTERNAL_SFNT_H <internal/sfnt.h>
|
||||
#define FT_INTERNAL_SERVICE_H <internal/ftserv.h>
|
||||
#define FT_INTERNAL_RFORK_H <internal/ftrfork.h>
|
||||
#define FT_INTERNAL_VALIDATE_H <internal/ftvalid.h>
|
||||
#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h>
|
||||
#define FT_INTERNAL_PIC_H <freetype/internal/ftpic.h>
|
||||
#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h>
|
||||
#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h>
|
||||
#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>
|
||||
#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h>
|
||||
#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h>
|
||||
#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h>
|
||||
#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h>
|
||||
#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h>
|
||||
#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h>
|
||||
#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h>
|
||||
#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h>
|
||||
|
||||
#define FT_INTERNAL_TRUETYPE_TYPES_H <internal/tttypes.h>
|
||||
#define FT_INTERNAL_TYPE1_TYPES_H <internal/t1types.h>
|
||||
#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
|
||||
#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>
|
||||
|
||||
#define FT_INTERNAL_POSTSCRIPT_AUX_H <internal/psaux.h>
|
||||
#define FT_INTERNAL_POSTSCRIPT_HINTS_H <internal/pshints.h>
|
||||
#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <internal/psglobal.h>
|
||||
#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
|
||||
#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
|
||||
#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <freetype/internal/psglobal.h>
|
||||
|
||||
#define FT_INTERNAL_AUTOHINT_H <internal/autohint.h>
|
||||
#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h>
|
||||
|
||||
|
||||
#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
|
||||
@@ -48,11 +48,12 @@ FT_BEGIN_HEADER
|
||||
/* `ttnameid.h'. */
|
||||
/* */
|
||||
/* format :: */
|
||||
/* The cmap format. OpenType 1.5 defines the formats 0 (byte */
|
||||
/* The cmap format. OpenType 1.6 defines the formats 0 (byte */
|
||||
/* encoding table), 2~(high-byte mapping through table), 4~(segment */
|
||||
/* mapping to delta values), 6~(trimmed table mapping), 8~(mixed */
|
||||
/* 16-bit and 32-bit coverage), 10~(trimmed array), 12~(segmented */
|
||||
/* coverage), and 14 (Unicode Variation Sequences). */
|
||||
/* coverage), 13~(last resort font), and 14 (Unicode Variation */
|
||||
/* Sequences). */
|
||||
/* */
|
||||
typedef struct TT_CMapInfo_
|
||||
{
|
||||
@@ -44,7 +44,9 @@ FT_BEGIN_HEADER
|
||||
/* face :: A handle to the target face object. */
|
||||
/* */
|
||||
/* face_index :: The index of the TrueType font, if we are opening a */
|
||||
/* collection. */
|
||||
/* collection, in bits 0-15. The numbered instance */
|
||||
/* index~+~1 of a GX (sub)font, if applicable, in bits */
|
||||
/* 16-30. */
|
||||
/* */
|
||||
/* num_params :: The number of additional parameters. */
|
||||
/* */
|
||||
@@ -87,7 +89,9 @@ FT_BEGIN_HEADER
|
||||
/* face :: A handle to the target face object. */
|
||||
/* */
|
||||
/* face_index :: The index of the TrueType font, if we are opening a */
|
||||
/* collection. */
|
||||
/* collection, in bits 0-15. The numbered instance */
|
||||
/* index~+~1 of a GX (sub)font, if applicable, in bits */
|
||||
/* 16-30. */
|
||||
/* */
|
||||
/* num_params :: The number of additional parameters. */
|
||||
/* */
|
||||
@@ -424,6 +428,33 @@ FT_BEGIN_HEADER
|
||||
FT_UShort* aadvance );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <FuncType> */
|
||||
/* TT_Get_Name_Func */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* From the `name' table, return a given ENGLISH name record in */
|
||||
/* ASCII. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* face :: A handle to the source face object. */
|
||||
/* */
|
||||
/* nameid :: The name id of the name record to return. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* name :: The address of an allocated string pointer. NULL if */
|
||||
/* no name is present. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* */
|
||||
typedef FT_Error
|
||||
(*TT_Get_Name_Func)( TT_Face face,
|
||||
FT_UShort nameid,
|
||||
FT_String** name );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <FuncType> */
|
||||
@@ -556,6 +587,8 @@ FT_BEGIN_HEADER
|
||||
|
||||
TT_Get_Metrics_Func get_metrics;
|
||||
|
||||
TT_Get_Name_Func get_name;
|
||||
|
||||
} SFNT_Interface;
|
||||
|
||||
|
||||
@@ -594,7 +627,8 @@ FT_BEGIN_HEADER
|
||||
free_eblc_, \
|
||||
set_sbit_strike_, \
|
||||
load_strike_metrics_, \
|
||||
get_metrics_ ) \
|
||||
get_metrics_, \
|
||||
get_name_ ) \
|
||||
static const SFNT_Interface class_ = \
|
||||
{ \
|
||||
goto_table_, \
|
||||
@@ -626,6 +660,7 @@ FT_BEGIN_HEADER
|
||||
set_sbit_strike_, \
|
||||
load_strike_metrics_, \
|
||||
get_metrics_, \
|
||||
get_name_, \
|
||||
};
|
||||
|
||||
#else /* FT_CONFIG_OPTION_PIC */
|
||||
@@ -663,7 +698,8 @@ FT_BEGIN_HEADER
|
||||
free_eblc_, \
|
||||
set_sbit_strike_, \
|
||||
load_strike_metrics_, \
|
||||
get_metrics_ ) \
|
||||
get_metrics_, \
|
||||
get_name_ ) \
|
||||
void \
|
||||
FT_Init_Class_ ## class_( FT_Library library, \
|
||||
SFNT_Interface* clazz ) \
|
||||
@@ -699,6 +735,7 @@ FT_BEGIN_HEADER
|
||||
clazz->set_sbit_strike = set_sbit_strike_; \
|
||||
clazz->load_strike_metrics = load_strike_metrics_; \
|
||||
clazz->get_metrics = get_metrics_; \
|
||||
clazz->get_name = get_name_; \
|
||||
}
|
||||
|
||||
#endif /* FT_CONFIG_OPTION_PIC */
|
||||
@@ -1457,11 +1457,23 @@ FT_BEGIN_HEADER
|
||||
/* handle to execution context */
|
||||
typedef struct TT_ExecContextRec_* TT_ExecContext;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* TT_Size */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A handle to a TrueType size object. */
|
||||
/* */
|
||||
typedef struct TT_SizeRec_* TT_Size;
|
||||
|
||||
|
||||
/* glyph loader structure */
|
||||
typedef struct TT_LoaderRec_
|
||||
{
|
||||
FT_Face face;
|
||||
FT_Size size;
|
||||
TT_Face face;
|
||||
TT_Size size;
|
||||
FT_GlyphSlot glyph;
|
||||
FT_GlyphLoader gloader;
|
||||
|
||||
@@ -1503,6 +1515,9 @@ FT_BEGIN_HEADER
|
||||
FT_Byte* cursor;
|
||||
FT_Byte* limit;
|
||||
|
||||
/* since version 2.6.2 */
|
||||
FT_ListRec composites;
|
||||
|
||||
} TT_LoaderRec;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#ifndef __FT2BUILD_H__
|
||||
#define __FT2BUILD_H__
|
||||
|
||||
#include <config/ftheader.h>
|
||||
#include <freetype/config/ftheader.h>
|
||||
|
||||
#endif /* __FT2BUILD_H__ */
|
||||
|
||||
|
||||
57
module_option.diff
Normal file
57
module_option.diff
Normal file
@@ -0,0 +1,57 @@
|
||||
diff --git a/include/freetype/config/ftmodule.h b/include/freetype/config/ftmodule.h
|
||||
index 76d271a..e145790 100644
|
||||
--- a/include/freetype/config/ftmodule.h
|
||||
+++ b/include/freetype/config/ftmodule.h
|
||||
@@ -12,14 +12,7 @@
|
||||
|
||||
FT_USE_MODULE( FT_Module_Class, autofit_module_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
|
||||
-FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
|
||||
-FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
|
||||
-FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
|
||||
-FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
|
||||
-FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
|
||||
-FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
|
||||
-FT_USE_MODULE( FT_Module_Class, psaux_module_class )
|
||||
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
|
||||
FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
|
||||
@@ -27,6 +20,5 @@ FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
|
||||
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
|
||||
-FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
|
||||
|
||||
/* EOF */
|
||||
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
|
||||
index b481f8f..3819586 100644
|
||||
--- a/include/freetype/config/ftoption.h
|
||||
+++ b/include/freetype/config/ftoption.h
|
||||
@@ -225,7 +225,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* Define this macro if you want to enable this `feature'. */
|
||||
/* */
|
||||
-/* #define FT_CONFIG_OPTION_USE_PNG */
|
||||
+#define FT_CONFIG_OPTION_USE_PNG
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@@ -370,7 +370,7 @@ FT_BEGIN_HEADER
|
||||
/* supply font data incrementally as the document is parsed, such */
|
||||
/* as the Ghostscript interpreter for the PostScript language. */
|
||||
/* */
|
||||
-#define FT_CONFIG_OPTION_INCREMENTAL
|
||||
+/* #define FT_CONFIG_OPTION_INCREMENTAL */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@@ -843,7 +843,7 @@ FT_BEGIN_HEADER
|
||||
/* `warping' property of the auto-hinter (see file `ftautoh.h' for more */
|
||||
/* information; by default it is switched off). */
|
||||
/* */
|
||||
-#define AF_CONFIG_OPTION_USE_WARPER
|
||||
+/* #define AF_CONFIG_OPTION_USE_WARPER */
|
||||
|
||||
/* */
|
||||
|
||||
@@ -26,107 +26,161 @@
|
||||
af_blue_strings[] =
|
||||
{
|
||||
/* */
|
||||
'\xD8', '\xA7', '\xD8', '\xA5', '\xD9', '\x84', '\xD9', '\x83', '\xD8', '\xB7', '\xD8', '\xB8', /* ا إ ل ك ط ظ */
|
||||
'\xD8', '\xA7', ' ', '\xD8', '\xA5', ' ', '\xD9', '\x84', ' ', '\xD9', '\x83', ' ', '\xD8', '\xB7', ' ', '\xD8', '\xB8', /* ا إ ل ك ط ظ */
|
||||
'\0',
|
||||
'\xD8', '\xAA', '\xD8', '\xAB', '\xD8', '\xB7', '\xD8', '\xB8', '\xD9', '\x83', /* ت ث ط ظ ك */
|
||||
'\xD8', '\xAA', ' ', '\xD8', '\xAB', ' ', '\xD8', '\xB7', ' ', '\xD8', '\xB8', ' ', '\xD9', '\x83', /* ت ث ط ظ ك */
|
||||
'\0',
|
||||
'\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\x9F', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕПЗОСЭ */
|
||||
'\xD9', '\x80', /* ـ */
|
||||
'\0',
|
||||
'\xD0', '\x91', '\xD0', '\x92', '\xD0', '\x95', '\xD0', '\xA8', '\xD0', '\x97', '\xD0', '\x9E', '\xD0', '\xA1', '\xD0', '\xAD', /* БВЕШЗОСЭ */
|
||||
'\xD0', '\x91', ' ', '\xD0', '\x92', ' ', '\xD0', '\x95', ' ', '\xD0', '\x9F', ' ', '\xD0', '\x97', ' ', '\xD0', '\x9E', ' ', '\xD0', '\xA1', ' ', '\xD0', '\xAD', /* Б В Е П З О С Э */
|
||||
'\0',
|
||||
'\xD1', '\x85', '\xD0', '\xBF', '\xD0', '\xBD', '\xD1', '\x88', '\xD0', '\xB5', '\xD0', '\xB7', '\xD0', '\xBE', '\xD1', '\x81', /* хпншезос */
|
||||
'\xD0', '\x91', ' ', '\xD0', '\x92', ' ', '\xD0', '\x95', ' ', '\xD0', '\xA8', ' ', '\xD0', '\x97', ' ', '\xD0', '\x9E', ' ', '\xD0', '\xA1', ' ', '\xD0', '\xAD', /* Б В Е Ш З О С Э */
|
||||
'\0',
|
||||
'\xD1', '\x80', '\xD1', '\x83', '\xD1', '\x84', /* руф */
|
||||
'\xD1', '\x85', ' ', '\xD0', '\xBF', ' ', '\xD0', '\xBD', ' ', '\xD1', '\x88', ' ', '\xD0', '\xB5', ' ', '\xD0', '\xB7', ' ', '\xD0', '\xBE', ' ', '\xD1', '\x81', /* х п н ш е з о с */
|
||||
'\0',
|
||||
'\xE0', '\xA4', '\x95', '\xE0', '\xA4', '\xAE', '\xE0', '\xA4', '\x85', '\xE0', '\xA4', '\x86', '\xE0', '\xA4', '\xA5', '\xE0', '\xA4', '\xA7', '\xE0', '\xA4', '\xAD', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */
|
||||
'\xD1', '\x80', ' ', '\xD1', '\x83', ' ', '\xD1', '\x84', /* р у ф */
|
||||
'\0',
|
||||
'\xE0', '\xA4', '\x88', '\xE0', '\xA4', '\x90', '\xE0', '\xA4', '\x93', '\xE0', '\xA4', '\x94', '\xE0', '\xA4', '\xBF', '\xE0', '\xA5', '\x80', '\xE0', '\xA5', '\x8B', '\xE0', '\xA5', '\x8C', /* ई ऐ ओ औ ि ी ो ौ */
|
||||
'\xE0', '\xA4', '\x95', ' ', '\xE0', '\xA4', '\xAE', ' ', '\xE0', '\xA4', '\x85', ' ', '\xE0', '\xA4', '\x86', ' ', '\xE0', '\xA4', '\xA5', ' ', '\xE0', '\xA4', '\xA7', ' ', '\xE0', '\xA4', '\xAD', ' ', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */
|
||||
'\0',
|
||||
'\xE0', '\xA4', '\x95', '\xE0', '\xA4', '\xAE', '\xE0', '\xA4', '\x85', '\xE0', '\xA4', '\x86', '\xE0', '\xA4', '\xA5', '\xE0', '\xA4', '\xA7', '\xE0', '\xA4', '\xAD', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */
|
||||
'\xE0', '\xA4', '\x88', ' ', '\xE0', '\xA4', '\x90', ' ', '\xE0', '\xA4', '\x93', ' ', '\xE0', '\xA4', '\x94', ' ', '\xE0', '\xA4', '\xBF', ' ', '\xE0', '\xA5', '\x80', ' ', '\xE0', '\xA5', '\x8B', ' ', '\xE0', '\xA5', '\x8C', /* ई ऐ ओ औ ि ी ो ौ */
|
||||
'\0',
|
||||
'\xE0', '\xA5', '\x81', '\xE0', '\xA5', '\x83', /* ु ृ */
|
||||
'\xE0', '\xA4', '\x95', ' ', '\xE0', '\xA4', '\xAE', ' ', '\xE0', '\xA4', '\x85', ' ', '\xE0', '\xA4', '\x86', ' ', '\xE0', '\xA4', '\xA5', ' ', '\xE0', '\xA4', '\xA7', ' ', '\xE0', '\xA4', '\xAD', ' ', '\xE0', '\xA4', '\xB6', /* क म अ आ थ ध भ श */
|
||||
'\0',
|
||||
'\xCE', '\x93', '\xCE', '\x92', '\xCE', '\x95', '\xCE', '\x96', '\xCE', '\x98', '\xCE', '\x9F', '\xCE', '\xA9', /* ΓΒΕΖΘΟΩ */
|
||||
'\xE0', '\xA5', '\x81', ' ', '\xE0', '\xA5', '\x83', /* ु ृ */
|
||||
'\0',
|
||||
'\xCE', '\x92', '\xCE', '\x94', '\xCE', '\x96', '\xCE', '\x9E', '\xCE', '\x98', '\xCE', '\x9F', /* ΒΔΖΞΘΟ */
|
||||
'\xCE', '\x93', ' ', '\xCE', '\x92', ' ', '\xCE', '\x95', ' ', '\xCE', '\x96', ' ', '\xCE', '\x98', ' ', '\xCE', '\x9F', ' ', '\xCE', '\xA9', /* Γ Β Ε Ζ Θ Ο Ω */
|
||||
'\0',
|
||||
'\xCE', '\xB2', '\xCE', '\xB8', '\xCE', '\xB4', '\xCE', '\xB6', '\xCE', '\xBB', '\xCE', '\xBE', /* βθδζλξ */
|
||||
'\xCE', '\x92', ' ', '\xCE', '\x94', ' ', '\xCE', '\x96', ' ', '\xCE', '\x9E', ' ', '\xCE', '\x98', ' ', '\xCE', '\x9F', /* Β Δ Ζ Ξ Θ Ο */
|
||||
'\0',
|
||||
'\xCE', '\xB1', '\xCE', '\xB5', '\xCE', '\xB9', '\xCE', '\xBF', '\xCF', '\x80', '\xCF', '\x83', '\xCF', '\x84', '\xCF', '\x89', /* αειοπστω */
|
||||
'\xCE', '\xB2', ' ', '\xCE', '\xB8', ' ', '\xCE', '\xB4', ' ', '\xCE', '\xB6', ' ', '\xCE', '\xBB', ' ', '\xCE', '\xBE', /* β θ δ ζ λ ξ */
|
||||
'\0',
|
||||
'\xCE', '\xB2', '\xCE', '\xB3', '\xCE', '\xB7', '\xCE', '\xBC', '\xCF', '\x81', '\xCF', '\x86', '\xCF', '\x87', '\xCF', '\x88', /* βγημρφχψ */
|
||||
'\xCE', '\xB1', ' ', '\xCE', '\xB5', ' ', '\xCE', '\xB9', ' ', '\xCE', '\xBF', ' ', '\xCF', '\x80', ' ', '\xCF', '\x83', ' ', '\xCF', '\x84', ' ', '\xCF', '\x89', /* α ε ι ο π σ τ ω */
|
||||
'\0',
|
||||
'\xD7', '\x91', '\xD7', '\x93', '\xD7', '\x94', '\xD7', '\x97', '\xD7', '\x9A', '\xD7', '\x9B', '\xD7', '\x9D', '\xD7', '\xA1', /* בדהחךכםס */
|
||||
'\xCE', '\xB2', ' ', '\xCE', '\xB3', ' ', '\xCE', '\xB7', ' ', '\xCE', '\xBC', ' ', '\xCF', '\x81', ' ', '\xCF', '\x86', ' ', '\xCF', '\x87', ' ', '\xCF', '\x88', /* β γ η μ ρ φ χ ψ */
|
||||
'\0',
|
||||
'\xD7', '\x91', '\xD7', '\x98', '\xD7', '\x9B', '\xD7', '\x9D', '\xD7', '\xA1', '\xD7', '\xA6', /* בטכםסצ */
|
||||
'\xD7', '\x91', ' ', '\xD7', '\x93', ' ', '\xD7', '\x94', ' ', '\xD7', '\x97', ' ', '\xD7', '\x9A', ' ', '\xD7', '\x9B', ' ', '\xD7', '\x9D', ' ', '\xD7', '\xA1', /* ב ד ה ח ך כ ם ס */
|
||||
'\0',
|
||||
'\xD7', '\xA7', '\xD7', '\x9A', '\xD7', '\x9F', '\xD7', '\xA3', '\xD7', '\xA5', /* קךןףץ */
|
||||
'\xD7', '\x91', ' ', '\xD7', '\x98', ' ', '\xD7', '\x9B', ' ', '\xD7', '\x9D', ' ', '\xD7', '\xA1', ' ', '\xD7', '\xA6', /* ב ט כ ם ס צ */
|
||||
'\0',
|
||||
'T', 'H', 'E', 'Z', 'O', 'C', 'Q', 'S', /* THEZOCQS */
|
||||
'\xD7', '\xA7', ' ', '\xD7', '\x9A', ' ', '\xD7', '\x9F', ' ', '\xD7', '\xA3', ' ', '\xD7', '\xA5', /* ק ך ן ף ץ */
|
||||
'\0',
|
||||
'H', 'E', 'Z', 'L', 'O', 'C', 'U', 'S', /* HEZLOCUS */
|
||||
'\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x91', ' ', '\xE1', '\x9E', '\x93', ' ', '\xE1', '\x9E', '\xA7', ' ', '\xE1', '\x9E', '\xA9', ' ', '\xE1', '\x9E', '\xB6', /* ខ ទ ន ឧ ឩ ា */
|
||||
'\0',
|
||||
'f', 'i', 'j', 'k', 'd', 'b', 'h', /* fijkdbh */
|
||||
'\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x80', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x82', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x90', /* ក្ក ក្ខ ក្គ ក្ថ */
|
||||
'\0',
|
||||
'x', 'z', 'r', 'o', 'e', 's', 'c', /* xzroesc */
|
||||
'\xE1', '\x9E', '\x81', ' ', '\xE1', '\x9E', '\x83', ' ', '\xE1', '\x9E', '\x85', ' ', '\xE1', '\x9E', '\x8B', ' ', '\xE1', '\x9E', '\x94', ' ', '\xE1', '\x9E', '\x98', ' ', '\xE1', '\x9E', '\x99', ' ', '\xE1', '\x9E', '\xB2', /* ខ ឃ ច ឋ ប ម យ ឲ */
|
||||
'\0',
|
||||
'p', 'q', 'g', 'j', 'y', /* pqgjy */
|
||||
'\xE1', '\x9E', '\x8F', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x9A', ' ', '\xE1', '\x9E', '\x9A', '\xE1', '\x9F', '\x80', ' ', '\xE1', '\x9E', '\xB2', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x99', ' ', '\xE1', '\x9E', '\xA2', '\xE1', '\x9E', '\xBF', /* ត្រ រៀ ឲ្យ អឿ */
|
||||
'\0',
|
||||
'\xE0', '\xB0', '\x87', '\xE0', '\xB0', '\x8C', '\xE0', '\xB0', '\x99', '\xE0', '\xB0', '\x9E', '\xE0', '\xB0', '\xA3', '\xE0', '\xB0', '\xB1', '\xE0', '\xB1', '\xAF', /* ఇ ఌ ఙ ఞ ణ ఱ ౯ */
|
||||
'\xE1', '\x9E', '\x93', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x8F', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x9A', '\xE1', '\x9F', '\x83', ' ', '\xE1', '\x9E', '\x84', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x81', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x99', ' ', '\xE1', '\x9E', '\x80', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x94', '\xE1', '\x9F', '\x80', ' ', '\xE1', '\x9E', '\x85', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x9A', '\xE1', '\x9F', '\x80', ' ', '\xE1', '\x9E', '\x93', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x8F', '\xE1', '\x9E', '\xBF', ' ', '\xE1', '\x9E', '\x9B', '\xE1', '\x9F', '\x92', '\xE1', '\x9E', '\x94', '\xE1', '\x9E', '\xBF', /* ន្ត្រៃ ង្ខ្យ ក្បៀ ច្រៀ ន្តឿ ល្បឿ */
|
||||
'\0',
|
||||
'\xE0', '\xB0', '\x85', '\xE0', '\xB0', '\x95', '\xE0', '\xB0', '\x9A', '\xE0', '\xB0', '\xB0', '\xE0', '\xB0', '\xBD', '\xE0', '\xB1', '\xA8', '\xE0', '\xB1', '\xAC', /* అ క చ ర ఽ ౨ ౬ */
|
||||
'\xE1', '\xA7', '\xA0', ' ', '\xE1', '\xA7', '\xA1', /* ᧠ ᧡ */
|
||||
'\0',
|
||||
'\xE0', '\xB8', '\x9A', '\xE0', '\xB9', '\x80', '\xE0', '\xB9', '\x81', '\xE0', '\xB8', '\xAD', '\xE0', '\xB8', '\x81', '\xE0', '\xB8', '\xB2', /* บ เ แ อ ก า */
|
||||
'\xE1', '\xA7', '\xB6', ' ', '\xE1', '\xA7', '\xB9', /* ᧶ ᧹ */
|
||||
'\0',
|
||||
'\xE0', '\xB8', '\x9A', '\xE0', '\xB8', '\x9B', '\xE0', '\xB8', '\xA9', '\xE0', '\xB8', '\xAF', '\xE0', '\xB8', '\xAD', '\xE0', '\xB8', '\xA2', '\xE0', '\xB8', '\xAE', /* บ ป ษ ฯ อ ย ฮ */
|
||||
'\xE0', '\xBA', '\xB2', ' ', '\xE0', '\xBA', '\x94', ' ', '\xE0', '\xBA', '\xAD', ' ', '\xE0', '\xBA', '\xA1', ' ', '\xE0', '\xBA', '\xA5', ' ', '\xE0', '\xBA', '\xA7', ' ', '\xE0', '\xBA', '\xA3', ' ', '\xE0', '\xBA', '\x87', /* າ ດ ອ ມ ລ ວ ຣ ງ */
|
||||
'\0',
|
||||
'\xE0', '\xB8', '\x9B', '\xE0', '\xB8', '\x9D', '\xE0', '\xB8', '\x9F', /* ป ฝ ฟ */
|
||||
'\xE0', '\xBA', '\xB2', ' ', '\xE0', '\xBA', '\xAD', ' ', '\xE0', '\xBA', '\x9A', ' ', '\xE0', '\xBA', '\x8D', ' ', '\xE0', '\xBA', '\xA3', ' ', '\xE0', '\xBA', '\xAE', ' ', '\xE0', '\xBA', '\xA7', ' ', '\xE0', '\xBA', '\xA2', /* າ ອ ບ ຍ ຣ ຮ ວ ຢ */
|
||||
'\0',
|
||||
'\xE0', '\xB9', '\x82', '\xE0', '\xB9', '\x83', '\xE0', '\xB9', '\x84', /* โ ใ ไ */
|
||||
'\xE0', '\xBA', '\x9B', ' ', '\xE0', '\xBA', '\xA2', ' ', '\xE0', '\xBA', '\x9F', ' ', '\xE0', '\xBA', '\x9D', /* ປ ຢ ຟ ຝ */
|
||||
'\0',
|
||||
'\xE0', '\xB8', '\x8E', '\xE0', '\xB8', '\x8F', '\xE0', '\xB8', '\xA4', '\xE0', '\xB8', '\xA6', /* ฎ ฏ ฤ ฦ */
|
||||
'\xE0', '\xBB', '\x82', ' ', '\xE0', '\xBB', '\x84', ' ', '\xE0', '\xBB', '\x83', /* ໂ ໄ ໃ */
|
||||
'\0',
|
||||
'\xE0', '\xB8', '\x8D', '\xE0', '\xB8', '\x90', /* ญ ฐ */
|
||||
'\xE0', '\xBA', '\x87', ' ', '\xE0', '\xBA', '\x8A', ' ', '\xE0', '\xBA', '\x96', ' ', '\xE0', '\xBA', '\xBD', ' ', '\xE0', '\xBB', '\x86', ' ', '\xE0', '\xBA', '\xAF', /* ງ ຊ ຖ ຽ ໆ ຯ */
|
||||
'\0',
|
||||
'\xE0', '\xB9', '\x90', '\xE0', '\xB9', '\x91', '\xE0', '\xB9', '\x93', /* ๐ ๑ ๓ */
|
||||
'T', ' ', 'H', ' ', 'E', ' ', 'Z', ' ', 'O', ' ', 'C', ' ', 'Q', ' ', 'S', /* T H E Z O C Q S */
|
||||
'\0',
|
||||
'H', ' ', 'E', ' ', 'Z', ' ', 'L', ' ', 'O', ' ', 'C', ' ', 'U', ' ', 'S', /* H E Z L O C U S */
|
||||
'\0',
|
||||
'f', ' ', 'i', ' ', 'j', ' ', 'k', ' ', 'd', ' ', 'b', ' ', 'h', /* f i j k d b h */
|
||||
'\0',
|
||||
'x', ' ', 'z', ' ', 'r', ' ', 'o', ' ', 'e', ' ', 's', ' ', 'c', /* x z r o e s c */
|
||||
'\0',
|
||||
'p', ' ', 'q', ' ', 'g', ' ', 'j', ' ', 'y', /* p q g j y */
|
||||
'\0',
|
||||
'\xE2', '\x82', '\x80', ' ', '\xE2', '\x82', '\x83', ' ', '\xE2', '\x82', '\x85', ' ', '\xE2', '\x82', '\x87', ' ', '\xE2', '\x82', '\x88', /* ₀ ₃ ₅ ₇ ₈ */
|
||||
'\0',
|
||||
'\xE2', '\x82', '\x80', ' ', '\xE2', '\x82', '\x81', ' ', '\xE2', '\x82', '\x82', ' ', '\xE2', '\x82', '\x83', ' ', '\xE2', '\x82', '\x88', /* ₀ ₁ ₂ ₃ ₈ */
|
||||
'\0',
|
||||
'\xE1', '\xB5', '\xA2', ' ', '\xE2', '\xB1', '\xBC', ' ', '\xE2', '\x82', '\x95', ' ', '\xE2', '\x82', '\x96', ' ', '\xE2', '\x82', '\x97', /* ᵢ ⱼ ₕ ₖ ₗ */
|
||||
'\0',
|
||||
'\xE2', '\x82', '\x90', ' ', '\xE2', '\x82', '\x91', ' ', '\xE2', '\x82', '\x92', ' ', '\xE2', '\x82', '\x93', ' ', '\xE2', '\x82', '\x99', ' ', '\xE2', '\x82', '\x9B', ' ', '\xE1', '\xB5', '\xA5', ' ', '\xE1', '\xB5', '\xA4', ' ', '\xE1', '\xB5', '\xA3', /* ₐ ₑ ₒ ₓ ₙ ₛ ᵥ ᵤ ᵣ */
|
||||
'\0',
|
||||
'\xE1', '\xB5', '\xA6', ' ', '\xE1', '\xB5', '\xA7', ' ', '\xE1', '\xB5', '\xA8', ' ', '\xE1', '\xB5', '\xA9', ' ', '\xE2', '\x82', '\x9A', /* ᵦ ᵧ ᵨ ᵩ ₚ */
|
||||
'\0',
|
||||
'\xE2', '\x81', '\xB0', ' ', '\xC2', '\xB3', ' ', '\xE2', '\x81', '\xB5', ' ', '\xE2', '\x81', '\xB7', ' ', '\xE1', '\xB5', '\x80', ' ', '\xE1', '\xB4', '\xB4', ' ', '\xE1', '\xB4', '\xB1', ' ', '\xE1', '\xB4', '\xBC', /* ⁰ ³ ⁵ ⁷ ᵀ ᴴ ᴱ ᴼ */
|
||||
'\0',
|
||||
'\xE2', '\x81', '\xB0', ' ', '\xC2', '\xB9', ' ', '\xC2', '\xB2', ' ', '\xC2', '\xB3', ' ', '\xE1', '\xB4', '\xB1', ' ', '\xE1', '\xB4', '\xB8', ' ', '\xE1', '\xB4', '\xBC', ' ', '\xE1', '\xB5', '\x81', /* ⁰ ¹ ² ³ ᴱ ᴸ ᴼ ᵁ */
|
||||
'\0',
|
||||
'\xE1', '\xB5', '\x87', ' ', '\xE1', '\xB5', '\x88', ' ', '\xE1', '\xB5', '\x8F', ' ', '\xCA', '\xB0', ' ', '\xCA', '\xB2', ' ', '\xE1', '\xB6', '\xA0', ' ', '\xE2', '\x81', '\xB1', /* ᵇ ᵈ ᵏ ʰ ʲ ᶠ ⁱ */
|
||||
'\0',
|
||||
'\xE1', '\xB5', '\x89', ' ', '\xE1', '\xB5', '\x92', ' ', '\xCA', '\xB3', ' ', '\xCB', '\xA2', ' ', '\xCB', '\xA3', ' ', '\xE1', '\xB6', '\x9C', ' ', '\xE1', '\xB6', '\xBB', /* ᵉ ᵒ ʳ ˢ ˣ ᶜ ᶻ */
|
||||
'\0',
|
||||
'\xE1', '\xB5', '\x96', ' ', '\xCA', '\xB8', ' ', '\xE1', '\xB5', '\x8D', /* ᵖ ʸ ᵍ */
|
||||
'\0',
|
||||
'\xE1', '\x80', '\x81', ' ', '\xE1', '\x80', '\x82', ' ', '\xE1', '\x80', '\x84', ' ', '\xE1', '\x80', '\x92', ' ', '\xE1', '\x80', '\x9D', ' ', '\xE1', '\x81', '\xA5', ' ', '\xE1', '\x81', '\x8A', ' ', '\xE1', '\x81', '\x8B', /* ခ ဂ င ဒ ဝ ၥ ၊ ။ */
|
||||
'\0',
|
||||
'\xE1', '\x80', '\x84', ' ', '\xE1', '\x80', '\x8E', ' ', '\xE1', '\x80', '\x92', ' ', '\xE1', '\x80', '\x95', ' ', '\xE1', '\x80', '\x97', ' ', '\xE1', '\x80', '\x9D', ' ', '\xE1', '\x81', '\x8A', ' ', '\xE1', '\x81', '\x8B', /* င ဎ ဒ ပ ဗ ဝ ၊ ။ */
|
||||
'\0',
|
||||
'\xE1', '\x80', '\xA9', ' ', '\xE1', '\x80', '\xBC', ' ', '\xE1', '\x81', '\x8D', ' ', '\xE1', '\x81', '\x8F', ' ', '\xE1', '\x81', '\x86', ' ', '\xE1', '\x80', '\xAB', ' ', '\xE1', '\x80', '\xAD', /* ဩ ြ ၍ ၏ ၆ ါ ိ */
|
||||
'\0',
|
||||
'\xE1', '\x80', '\x89', ' ', '\xE1', '\x80', '\x8A', ' ', '\xE1', '\x80', '\xA5', ' ', '\xE1', '\x80', '\xA9', ' ', '\xE1', '\x80', '\xA8', ' ', '\xE1', '\x81', '\x82', ' ', '\xE1', '\x81', '\x85', ' ', '\xE1', '\x81', '\x89', /* ဉ ည ဥ ဩ ဨ ၂ ၅ ၉ */
|
||||
'\0',
|
||||
'\xE0', '\xB0', '\x87', ' ', '\xE0', '\xB0', '\x8C', ' ', '\xE0', '\xB0', '\x99', ' ', '\xE0', '\xB0', '\x9E', ' ', '\xE0', '\xB0', '\xA3', ' ', '\xE0', '\xB0', '\xB1', ' ', '\xE0', '\xB1', '\xAF', /* ఇ ఌ ఙ ఞ ణ ఱ ౯ */
|
||||
'\0',
|
||||
'\xE0', '\xB0', '\x85', ' ', '\xE0', '\xB0', '\x95', ' ', '\xE0', '\xB0', '\x9A', ' ', '\xE0', '\xB0', '\xB0', ' ', '\xE0', '\xB0', '\xBD', ' ', '\xE0', '\xB1', '\xA8', ' ', '\xE0', '\xB1', '\xAC', /* అ క చ ర ఽ ౨ ౬ */
|
||||
'\0',
|
||||
'\xE0', '\xB8', '\x9A', ' ', '\xE0', '\xB9', '\x80', ' ', '\xE0', '\xB9', '\x81', ' ', '\xE0', '\xB8', '\xAD', ' ', '\xE0', '\xB8', '\x81', ' ', '\xE0', '\xB8', '\xB2', /* บ เ แ อ ก า */
|
||||
'\0',
|
||||
'\xE0', '\xB8', '\x9A', ' ', '\xE0', '\xB8', '\x9B', ' ', '\xE0', '\xB8', '\xA9', ' ', '\xE0', '\xB8', '\xAF', ' ', '\xE0', '\xB8', '\xAD', ' ', '\xE0', '\xB8', '\xA2', ' ', '\xE0', '\xB8', '\xAE', /* บ ป ษ ฯ อ ย ฮ */
|
||||
'\0',
|
||||
'\xE0', '\xB8', '\x9B', ' ', '\xE0', '\xB8', '\x9D', ' ', '\xE0', '\xB8', '\x9F', /* ป ฝ ฟ */
|
||||
'\0',
|
||||
'\xE0', '\xB9', '\x82', ' ', '\xE0', '\xB9', '\x83', ' ', '\xE0', '\xB9', '\x84', /* โ ใ ไ */
|
||||
'\0',
|
||||
'\xE0', '\xB8', '\x8E', ' ', '\xE0', '\xB8', '\x8F', ' ', '\xE0', '\xB8', '\xA4', ' ', '\xE0', '\xB8', '\xA6', /* ฎ ฏ ฤ ฦ */
|
||||
'\0',
|
||||
'\xE0', '\xB8', '\x8D', ' ', '\xE0', '\xB8', '\x90', /* ญ ฐ */
|
||||
'\0',
|
||||
'\xE0', '\xB9', '\x90', ' ', '\xE0', '\xB9', '\x91', ' ', '\xE0', '\xB9', '\x93', /* ๐ ๑ ๓ */
|
||||
#ifdef AF_CONFIG_OPTION_CJK
|
||||
'\0',
|
||||
'\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* 他们你來們到和地 */
|
||||
'\xE5', '\xAF', '\xB9', '\xE5', '\xB0', '\x8D', '\xE5', '\xB0', '\xB1', '\xE5', '\xB8', '\xAD', '\xE6', '\x88', '\x91', '\xE6', '\x97', '\xB6', '\xE6', '\x99', '\x82', '\xE6', '\x9C', '\x83', /* 对對就席我时時會 */
|
||||
'\xE6', '\x9D', '\xA5', '\xE7', '\x82', '\xBA', '\xE8', '\x83', '\xBD', '\xE8', '\x88', '\xB0', '\xE8', '\xAA', '\xAA', '\xE8', '\xAF', '\xB4', '\xE8', '\xBF', '\x99', '\xE9', '\x80', '\x99', /* 来為能舰說说这這 */
|
||||
'\xE9', '\xBD', '\x8A', '|', /* 齊 | */
|
||||
'\xE5', '\x86', '\x9B', '\xE5', '\x90', '\x8C', '\xE5', '\xB7', '\xB2', '\xE6', '\x84', '\xBF', '\xE6', '\x97', '\xA2', '\xE6', '\x98', '\x9F', '\xE6', '\x98', '\xAF', '\xE6', '\x99', '\xAF', /* 军同已愿既星是景 */
|
||||
'\xE6', '\xB0', '\x91', '\xE7', '\x85', '\xA7', '\xE7', '\x8E', '\xB0', '\xE7', '\x8F', '\xBE', '\xE7', '\x90', '\x86', '\xE7', '\x94', '\xA8', '\xE7', '\xBD', '\xAE', '\xE8', '\xA6', '\x81', /* 民照现現理用置要 */
|
||||
'\xE8', '\xBB', '\x8D', '\xE9', '\x82', '\xA3', '\xE9', '\x85', '\x8D', '\xE9', '\x87', '\x8C', '\xE9', '\x96', '\x8B', '\xE9', '\x9B', '\xB7', '\xE9', '\x9C', '\xB2', '\xE9', '\x9D', '\xA2', /* 軍那配里開雷露面 */
|
||||
'\xE9', '\xA1', '\xBE', /* 顾 */
|
||||
'\xE4', '\xBB', '\x96', ' ', '\xE4', '\xBB', '\xAC', ' ', '\xE4', '\xBD', '\xA0', ' ', '\xE4', '\xBE', '\x86', ' ', '\xE5', '\x80', '\x91', ' ', '\xE5', '\x88', '\xB0', ' ', '\xE5', '\x92', '\x8C', ' ', '\xE5', '\x9C', '\xB0', /* 他 们 你 來 們 到 和 地 */
|
||||
' ', '\xE5', '\xAF', '\xB9', ' ', '\xE5', '\xB0', '\x8D', ' ', '\xE5', '\xB0', '\xB1', ' ', '\xE5', '\xB8', '\xAD', ' ', '\xE6', '\x88', '\x91', ' ', '\xE6', '\x97', '\xB6', ' ', '\xE6', '\x99', '\x82', ' ', '\xE6', '\x9C', '\x83', /* 对 對 就 席 我 时 時 會 */
|
||||
' ', '\xE6', '\x9D', '\xA5', ' ', '\xE7', '\x82', '\xBA', ' ', '\xE8', '\x83', '\xBD', ' ', '\xE8', '\x88', '\xB0', ' ', '\xE8', '\xAA', '\xAA', ' ', '\xE8', '\xAF', '\xB4', ' ', '\xE8', '\xBF', '\x99', ' ', '\xE9', '\x80', '\x99', /* 来 為 能 舰 說 说 这 這 */
|
||||
' ', '\xE9', '\xBD', '\x8A', ' ', '|', /* 齊 | */
|
||||
' ', '\xE5', '\x86', '\x9B', ' ', '\xE5', '\x90', '\x8C', ' ', '\xE5', '\xB7', '\xB2', ' ', '\xE6', '\x84', '\xBF', ' ', '\xE6', '\x97', '\xA2', ' ', '\xE6', '\x98', '\x9F', ' ', '\xE6', '\x98', '\xAF', ' ', '\xE6', '\x99', '\xAF', /* 军 同 已 愿 既 星 是 景 */
|
||||
' ', '\xE6', '\xB0', '\x91', ' ', '\xE7', '\x85', '\xA7', ' ', '\xE7', '\x8E', '\xB0', ' ', '\xE7', '\x8F', '\xBE', ' ', '\xE7', '\x90', '\x86', ' ', '\xE7', '\x94', '\xA8', ' ', '\xE7', '\xBD', '\xAE', ' ', '\xE8', '\xA6', '\x81', /* 民 照 现 現 理 用 置 要 */
|
||||
' ', '\xE8', '\xBB', '\x8D', ' ', '\xE9', '\x82', '\xA3', ' ', '\xE9', '\x85', '\x8D', ' ', '\xE9', '\x87', '\x8C', ' ', '\xE9', '\x96', '\x8B', ' ', '\xE9', '\x9B', '\xB7', ' ', '\xE9', '\x9C', '\xB2', ' ', '\xE9', '\x9D', '\xA2', /* 軍 那 配 里 開 雷 露 面 */
|
||||
' ', '\xE9', '\xA1', '\xBE', /* 顾 */
|
||||
'\0',
|
||||
'\xE4', '\xB8', '\xAA', '\xE4', '\xB8', '\xBA', '\xE4', '\xBA', '\xBA', '\xE4', '\xBB', '\x96', '\xE4', '\xBB', '\xA5', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', /* 个为人他以们你來 */
|
||||
'\xE5', '\x80', '\x8B', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\xA4', '\xA7', '\xE5', '\xAF', '\xB9', '\xE5', '\xB0', '\x8D', '\xE5', '\xB0', '\xB1', /* 個們到和大对對就 */
|
||||
'\xE6', '\x88', '\x91', '\xE6', '\x97', '\xB6', '\xE6', '\x99', '\x82', '\xE6', '\x9C', '\x89', '\xE6', '\x9D', '\xA5', '\xE7', '\x82', '\xBA', '\xE8', '\xA6', '\x81', '\xE8', '\xAA', '\xAA', /* 我时時有来為要說 */
|
||||
'\xE8', '\xAF', '\xB4', '|', /* 说 | */
|
||||
'\xE4', '\xB8', '\xBB', '\xE4', '\xBA', '\x9B', '\xE5', '\x9B', '\xA0', '\xE5', '\xAE', '\x83', '\xE6', '\x83', '\xB3', '\xE6', '\x84', '\x8F', '\xE7', '\x90', '\x86', '\xE7', '\x94', '\x9F', /* 主些因它想意理生 */
|
||||
'\xE7', '\x95', '\xB6', '\xE7', '\x9C', '\x8B', '\xE7', '\x9D', '\x80', '\xE7', '\xBD', '\xAE', '\xE8', '\x80', '\x85', '\xE8', '\x87', '\xAA', '\xE8', '\x91', '\x97', '\xE8', '\xA3', '\xA1', /* 當看着置者自著裡 */
|
||||
'\xE8', '\xBF', '\x87', '\xE8', '\xBF', '\x98', '\xE8', '\xBF', '\x9B', '\xE9', '\x80', '\xB2', '\xE9', '\x81', '\x8E', '\xE9', '\x81', '\x93', '\xE9', '\x82', '\x84', '\xE9', '\x87', '\x8C', /* 过还进進過道還里 */
|
||||
'\xE9', '\x9D', '\xA2', /* 面 */
|
||||
'\xE4', '\xB8', '\xAA', ' ', '\xE4', '\xB8', '\xBA', ' ', '\xE4', '\xBA', '\xBA', ' ', '\xE4', '\xBB', '\x96', ' ', '\xE4', '\xBB', '\xA5', ' ', '\xE4', '\xBB', '\xAC', ' ', '\xE4', '\xBD', '\xA0', ' ', '\xE4', '\xBE', '\x86', /* 个 为 人 他 以 们 你 來 */
|
||||
' ', '\xE5', '\x80', '\x8B', ' ', '\xE5', '\x80', '\x91', ' ', '\xE5', '\x88', '\xB0', ' ', '\xE5', '\x92', '\x8C', ' ', '\xE5', '\xA4', '\xA7', ' ', '\xE5', '\xAF', '\xB9', ' ', '\xE5', '\xB0', '\x8D', ' ', '\xE5', '\xB0', '\xB1', /* 個 們 到 和 大 对 對 就 */
|
||||
' ', '\xE6', '\x88', '\x91', ' ', '\xE6', '\x97', '\xB6', ' ', '\xE6', '\x99', '\x82', ' ', '\xE6', '\x9C', '\x89', ' ', '\xE6', '\x9D', '\xA5', ' ', '\xE7', '\x82', '\xBA', ' ', '\xE8', '\xA6', '\x81', ' ', '\xE8', '\xAA', '\xAA', /* 我 时 時 有 来 為 要 說 */
|
||||
' ', '\xE8', '\xAF', '\xB4', ' ', '|', /* 说 | */
|
||||
' ', '\xE4', '\xB8', '\xBB', ' ', '\xE4', '\xBA', '\x9B', ' ', '\xE5', '\x9B', '\xA0', ' ', '\xE5', '\xAE', '\x83', ' ', '\xE6', '\x83', '\xB3', ' ', '\xE6', '\x84', '\x8F', ' ', '\xE7', '\x90', '\x86', ' ', '\xE7', '\x94', '\x9F', /* 主 些 因 它 想 意 理 生 */
|
||||
' ', '\xE7', '\x95', '\xB6', ' ', '\xE7', '\x9C', '\x8B', ' ', '\xE7', '\x9D', '\x80', ' ', '\xE7', '\xBD', '\xAE', ' ', '\xE8', '\x80', '\x85', ' ', '\xE8', '\x87', '\xAA', ' ', '\xE8', '\x91', '\x97', ' ', '\xE8', '\xA3', '\xA1', /* 當 看 着 置 者 自 著 裡 */
|
||||
' ', '\xE8', '\xBF', '\x87', ' ', '\xE8', '\xBF', '\x98', ' ', '\xE8', '\xBF', '\x9B', ' ', '\xE9', '\x80', '\xB2', ' ', '\xE9', '\x81', '\x8E', ' ', '\xE9', '\x81', '\x93', ' ', '\xE9', '\x82', '\x84', ' ', '\xE9', '\x87', '\x8C', /* 过 还 进 進 過 道 還 里 */
|
||||
' ', '\xE9', '\x9D', '\xA2', /* 面 */
|
||||
#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
|
||||
'\0',
|
||||
'\xE4', '\xBA', '\x9B', '\xE4', '\xBB', '\xAC', '\xE4', '\xBD', '\xA0', '\xE4', '\xBE', '\x86', '\xE5', '\x80', '\x91', '\xE5', '\x88', '\xB0', '\xE5', '\x92', '\x8C', '\xE5', '\x9C', '\xB0', /* 些们你來們到和地 */
|
||||
'\xE5', '\xA5', '\xB9', '\xE5', '\xB0', '\x86', '\xE5', '\xB0', '\x87', '\xE5', '\xB0', '\xB1', '\xE5', '\xB9', '\xB4', '\xE5', '\xBE', '\x97', '\xE6', '\x83', '\x85', '\xE6', '\x9C', '\x80', /* 她将將就年得情最 */
|
||||
'\xE6', '\xA0', '\xB7', '\xE6', '\xA8', '\xA3', '\xE7', '\x90', '\x86', '\xE8', '\x83', '\xBD', '\xE8', '\xAA', '\xAA', '\xE8', '\xAF', '\xB4', '\xE8', '\xBF', '\x99', '\xE9', '\x80', '\x99', /* 样樣理能說说这這 */
|
||||
'\xE9', '\x80', '\x9A', '|', /* 通 | */
|
||||
'\xE5', '\x8D', '\xB3', '\xE5', '\x90', '\x97', '\xE5', '\x90', '\xA7', '\xE5', '\x90', '\xAC', '\xE5', '\x91', '\xA2', '\xE5', '\x93', '\x81', '\xE5', '\x93', '\x8D', '\xE5', '\x97', '\x8E', /* 即吗吧听呢品响嗎 */
|
||||
'\xE5', '\xB8', '\x88', '\xE5', '\xB8', '\xAB', '\xE6', '\x94', '\xB6', '\xE6', '\x96', '\xAD', '\xE6', '\x96', '\xB7', '\xE6', '\x98', '\x8E', '\xE7', '\x9C', '\xBC', '\xE9', '\x96', '\x93', /* 师師收断斷明眼間 */
|
||||
'\xE9', '\x97', '\xB4', '\xE9', '\x99', '\x85', '\xE9', '\x99', '\x88', '\xE9', '\x99', '\x90', '\xE9', '\x99', '\xA4', '\xE9', '\x99', '\xB3', '\xE9', '\x9A', '\x8F', '\xE9', '\x9A', '\x9B', /* 间际陈限除陳随際 */
|
||||
'\xE9', '\x9A', '\xA8', /* 隨 */
|
||||
' ', '\xE4', '\xBA', '\x9B', ' ', '\xE4', '\xBB', '\xAC', ' ', '\xE4', '\xBD', '\xA0', ' ', '\xE4', '\xBE', '\x86', ' ', '\xE5', '\x80', '\x91', ' ', '\xE5', '\x88', '\xB0', ' ', '\xE5', '\x92', '\x8C', ' ', '\xE5', '\x9C', '\xB0', /* 些 们 你 來 們 到 和 地 */
|
||||
' ', '\xE5', '\xA5', '\xB9', ' ', '\xE5', '\xB0', '\x86', ' ', '\xE5', '\xB0', '\x87', ' ', '\xE5', '\xB0', '\xB1', ' ', '\xE5', '\xB9', '\xB4', ' ', '\xE5', '\xBE', '\x97', ' ', '\xE6', '\x83', '\x85', ' ', '\xE6', '\x9C', '\x80', /* 她 将 將 就 年 得 情 最 */
|
||||
' ', '\xE6', '\xA0', '\xB7', ' ', '\xE6', '\xA8', '\xA3', ' ', '\xE7', '\x90', '\x86', ' ', '\xE8', '\x83', '\xBD', ' ', '\xE8', '\xAA', '\xAA', ' ', '\xE8', '\xAF', '\xB4', ' ', '\xE8', '\xBF', '\x99', ' ', '\xE9', '\x80', '\x99', /* 样 樣 理 能 說 说 这 這 */
|
||||
' ', '\xE9', '\x80', '\x9A', ' ', '|', /* 通 | */
|
||||
' ', '\xE5', '\x8D', '\xB3', ' ', '\xE5', '\x90', '\x97', ' ', '\xE5', '\x90', '\xA7', ' ', '\xE5', '\x90', '\xAC', ' ', '\xE5', '\x91', '\xA2', ' ', '\xE5', '\x93', '\x81', ' ', '\xE5', '\x93', '\x8D', ' ', '\xE5', '\x97', '\x8E', /* 即 吗 吧 听 呢 品 响 嗎 */
|
||||
' ', '\xE5', '\xB8', '\x88', ' ', '\xE5', '\xB8', '\xAB', ' ', '\xE6', '\x94', '\xB6', ' ', '\xE6', '\x96', '\xAD', ' ', '\xE6', '\x96', '\xB7', ' ', '\xE6', '\x98', '\x8E', ' ', '\xE7', '\x9C', '\xBC', ' ', '\xE9', '\x96', '\x93', /* 师 師 收 断 斷 明 眼 間 */
|
||||
' ', '\xE9', '\x97', '\xB4', ' ', '\xE9', '\x99', '\x85', ' ', '\xE9', '\x99', '\x88', ' ', '\xE9', '\x99', '\x90', ' ', '\xE9', '\x99', '\xA4', ' ', '\xE9', '\x99', '\xB3', ' ', '\xE9', '\x9A', '\x8F', ' ', '\xE9', '\x9A', '\x9B', /* 间 际 陈 限 除 陳 随 際 */
|
||||
' ', '\xE9', '\x9A', '\xA8', /* 隨 */
|
||||
'\0',
|
||||
'\xE4', '\xBA', '\x8B', '\xE5', '\x89', '\x8D', '\xE5', '\xAD', '\xB8', '\xE5', '\xB0', '\x86', '\xE5', '\xB0', '\x87', '\xE6', '\x83', '\x85', '\xE6', '\x83', '\xB3', '\xE6', '\x88', '\x96', /* 事前學将將情想或 */
|
||||
'\xE6', '\x94', '\xBF', '\xE6', '\x96', '\xAF', '\xE6', '\x96', '\xB0', '\xE6', '\xA0', '\xB7', '\xE6', '\xA8', '\xA3', '\xE6', '\xB0', '\x91', '\xE6', '\xB2', '\x92', '\xE6', '\xB2', '\xA1', /* 政斯新样樣民沒没 */
|
||||
'\xE7', '\x84', '\xB6', '\xE7', '\x89', '\xB9', '\xE7', '\x8E', '\xB0', '\xE7', '\x8F', '\xBE', '\xE7', '\x90', '\x83', '\xE7', '\xAC', '\xAC', '\xE7', '\xB6', '\x93', '\xE8', '\xB0', '\x81', /* 然特现現球第經谁 */
|
||||
'\xE8', '\xB5', '\xB7', '|', /* 起 | */
|
||||
'\xE4', '\xBE', '\x8B', '\xE5', '\x88', '\xA5', '\xE5', '\x88', '\xAB', '\xE5', '\x88', '\xB6', '\xE5', '\x8A', '\xA8', '\xE5', '\x8B', '\x95', '\xE5', '\x90', '\x97', '\xE5', '\x97', '\x8E', /* 例別别制动動吗嗎 */
|
||||
'\xE5', '\xA2', '\x9E', '\xE6', '\x8C', '\x87', '\xE6', '\x98', '\x8E', '\xE6', '\x9C', '\x9D', '\xE6', '\x9C', '\x9F', '\xE6', '\x9E', '\x84', '\xE7', '\x89', '\xA9', '\xE7', '\xA1', '\xAE', /* 增指明朝期构物确 */
|
||||
'\xE7', '\xA7', '\x8D', '\xE8', '\xAA', '\xBF', '\xE8', '\xB0', '\x83', '\xE8', '\xB2', '\xBB', '\xE8', '\xB4', '\xB9', '\xE9', '\x82', '\xA3', '\xE9', '\x83', '\xBD', '\xE9', '\x96', '\x93', /* 种調调費费那都間 */
|
||||
'\xE9', '\x97', '\xB4', /* 间 */
|
||||
'\xE4', '\xBA', '\x8B', ' ', '\xE5', '\x89', '\x8D', ' ', '\xE5', '\xAD', '\xB8', ' ', '\xE5', '\xB0', '\x86', ' ', '\xE5', '\xB0', '\x87', ' ', '\xE6', '\x83', '\x85', ' ', '\xE6', '\x83', '\xB3', ' ', '\xE6', '\x88', '\x96', /* 事 前 學 将 將 情 想 或 */
|
||||
' ', '\xE6', '\x94', '\xBF', ' ', '\xE6', '\x96', '\xAF', ' ', '\xE6', '\x96', '\xB0', ' ', '\xE6', '\xA0', '\xB7', ' ', '\xE6', '\xA8', '\xA3', ' ', '\xE6', '\xB0', '\x91', ' ', '\xE6', '\xB2', '\x92', ' ', '\xE6', '\xB2', '\xA1', /* 政 斯 新 样 樣 民 沒 没 */
|
||||
' ', '\xE7', '\x84', '\xB6', ' ', '\xE7', '\x89', '\xB9', ' ', '\xE7', '\x8E', '\xB0', ' ', '\xE7', '\x8F', '\xBE', ' ', '\xE7', '\x90', '\x83', ' ', '\xE7', '\xAC', '\xAC', ' ', '\xE7', '\xB6', '\x93', ' ', '\xE8', '\xB0', '\x81', /* 然 特 现 現 球 第 經 谁 */
|
||||
' ', '\xE8', '\xB5', '\xB7', ' ', '|', /* 起 | */
|
||||
' ', '\xE4', '\xBE', '\x8B', ' ', '\xE5', '\x88', '\xA5', ' ', '\xE5', '\x88', '\xAB', ' ', '\xE5', '\x88', '\xB6', ' ', '\xE5', '\x8A', '\xA8', ' ', '\xE5', '\x8B', '\x95', ' ', '\xE5', '\x90', '\x97', ' ', '\xE5', '\x97', '\x8E', /* 例 別 别 制 动 動 吗 嗎 */
|
||||
' ', '\xE5', '\xA2', '\x9E', ' ', '\xE6', '\x8C', '\x87', ' ', '\xE6', '\x98', '\x8E', ' ', '\xE6', '\x9C', '\x9D', ' ', '\xE6', '\x9C', '\x9F', ' ', '\xE6', '\x9E', '\x84', ' ', '\xE7', '\x89', '\xA9', ' ', '\xE7', '\xA1', '\xAE', /* 增 指 明 朝 期 构 物 确 */
|
||||
' ', '\xE7', '\xA7', '\x8D', ' ', '\xE8', '\xAA', '\xBF', ' ', '\xE8', '\xB0', '\x83', ' ', '\xE8', '\xB2', '\xBB', ' ', '\xE8', '\xB4', '\xB9', ' ', '\xE9', '\x82', '\xA3', ' ', '\xE9', '\x83', '\xBD', ' ', '\xE9', '\x96', '\x93', /* 种 調 调 費 费 那 都 間 */
|
||||
' ', '\xE9', '\x97', '\xB4', /* 间 */
|
||||
#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
|
||||
#endif /* AF_CONFIG_OPTION_CJK */
|
||||
'\0',
|
||||
@@ -139,9 +193,10 @@
|
||||
af_blue_stringsets[] =
|
||||
{
|
||||
/* */
|
||||
{ AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_ARABIC_JOIN, 0 },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
{ AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_ARABIC_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_CYRILLIC_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
@@ -170,6 +225,24 @@
|
||||
{ AF_BLUE_STRING_HEBREW_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_HEBREW_DESCENDER, 0 },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
{ AF_BLUE_STRING_KHMER_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
|
||||
{ AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP, AF_BLUE_PROPERTY_LATIN_SUB_TOP },
|
||||
{ AF_BLUE_STRING_KHMER_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_KHMER_DESCENDER, 0 },
|
||||
{ AF_BLUE_STRING_KHMER_LARGE_DESCENDER, 0 },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
{ AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
|
||||
{ AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
{ AF_BLUE_STRING_LAO_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
|
||||
{ AF_BLUE_STRING_LAO_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_LAO_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_LAO_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_LAO_DESCENDER, 0 },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
{ AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_LATIN_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
@@ -178,6 +251,28 @@
|
||||
{ AF_BLUE_STRING_LATIN_SMALL, 0 },
|
||||
{ AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_SMALL, 0 },
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER, 0 },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 },
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
{ AF_BLUE_STRING_MYANMAR_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT },
|
||||
{ AF_BLUE_STRING_MYANMAR_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_MYANMAR_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_MYANMAR_DESCENDER, 0 },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
{ AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP },
|
||||
{ AF_BLUE_STRING_TELUGU_BOTTOM, 0 },
|
||||
{ AF_BLUE_STRING_MAX, 0 },
|
||||
|
||||
@@ -20,9 +20,8 @@
|
||||
// labels separated by whitespace and followed by a colon (everything in a
|
||||
// single line); the first label gives the name of the enumeration template,
|
||||
// the second the name of the array template, and the third the name of the
|
||||
// `maximum' template, holding the size of the largest array element. The
|
||||
// script then fills the corresponding templates (indicated by `@'
|
||||
// characters around the name).
|
||||
// `maximum' template. The script then fills the corresponding templates
|
||||
// (indicated by `@' characters around the name).
|
||||
//
|
||||
// A section contains one or more data records. Each data record consists
|
||||
// of two or more lines. The first line holds the enumeration name, and the
|
||||
@@ -30,15 +29,20 @@
|
||||
//
|
||||
// There are two possible representations for array data.
|
||||
//
|
||||
// - A string of characters in UTF-8 encoding enclosed in double quotes,
|
||||
// using C syntax. There can be only one string per line, thus the
|
||||
// starting and ending double quote must be the first and last character
|
||||
// in the line, respectively, ignoring whitespace before and after the
|
||||
// string. Space characters within the string are ignored too. If there
|
||||
// are multiple strings (in multiple lines), they are concatenated to a
|
||||
// single string. In the output, a string gets represented as a series of
|
||||
// singles bytes, followed by a zero byte. The enumeration values simply
|
||||
// hold byte offsets to the start of the corresponding strings.
|
||||
// - A string of characters or character clusters (for example, representing
|
||||
// Aksharas, Devanagari syllables) in UTF-8 encoding enclosed in double
|
||||
// quotes, using C syntax, where the elements are separated by spaces.
|
||||
// There can be only one string per line, thus the starting and ending
|
||||
// double quote must be the first and last character in the line,
|
||||
// respectively, ignoring whitespace before and after the string. If
|
||||
// there are multiple strings (in multiple lines), they are concatenated
|
||||
// to a single string. In the output, a string gets represented as a
|
||||
// series of singles bytes, followed by a zero byte. The enumeration
|
||||
// values simply hold byte offsets to the start of the corresponding
|
||||
// strings.
|
||||
//
|
||||
// For strings, the `maximum' template holds the maximum number of
|
||||
// non-space characters in all strings.
|
||||
//
|
||||
// - Data blocks enclosed in balanced braces, which get copied verbatim and
|
||||
// which can span multiple lines. The opening brace of a block must be
|
||||
@@ -47,6 +51,9 @@
|
||||
// character after each block and counts the number of blocks to set the
|
||||
// enumeration values.
|
||||
//
|
||||
// For data blocks, the `maximum' template holds the maximum number of
|
||||
// array elements.
|
||||
//
|
||||
// A section can contain either strings only or data blocks only.
|
||||
//
|
||||
// A comment line starts with `//'; it gets removed. A preprocessor
|
||||
@@ -69,20 +76,25 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
|
||||
|
||||
AF_BLUE_STRING_ARABIC_TOP
|
||||
"ا إ ل ك ط ظ"
|
||||
AF_BLUE_STRING_ARABIC_JOIN
|
||||
AF_BLUE_STRING_ARABIC_BOTTOM
|
||||
"ت ث ط ظ ك"
|
||||
// We don't necessarily have access to medial forms via Unicode in case
|
||||
// Arabic presentational forms are missing. The only character that is
|
||||
// guaranteed to have the same vertical position with joining (this is,
|
||||
// non-isolated) forms is U+0640, ARABIC TATWEEL, which must join both
|
||||
// round and flat curves.
|
||||
AF_BLUE_STRING_ARABIC_JOIN
|
||||
"ـ"
|
||||
|
||||
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP
|
||||
"БВЕПЗОСЭ"
|
||||
"Б В Е П З О С Э"
|
||||
AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM
|
||||
"БВЕШЗОСЭ"
|
||||
"Б В Е Ш З О С Э"
|
||||
AF_BLUE_STRING_CYRILLIC_SMALL
|
||||
"хпншезос"
|
||||
"х п н ш е з о с"
|
||||
AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER
|
||||
"руф"
|
||||
"р у ф"
|
||||
|
||||
// we separate the letters with spaces to avoid ligatures;
|
||||
// this is just for convenience to simplify reading
|
||||
AF_BLUE_STRING_DEVANAGARI_BASE
|
||||
"क म अ आ थ ध भ श"
|
||||
AF_BLUE_STRING_DEVANAGARI_TOP
|
||||
@@ -96,36 +108,95 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
|
||||
"ु ृ"
|
||||
|
||||
AF_BLUE_STRING_GREEK_CAPITAL_TOP
|
||||
"ΓΒΕΖΘΟΩ"
|
||||
"Γ Β Ε Ζ Θ Ο Ω"
|
||||
AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM
|
||||
"ΒΔΖΞΘΟ"
|
||||
"Β Δ Ζ Ξ Θ Ο"
|
||||
AF_BLUE_STRING_GREEK_SMALL_BETA_TOP
|
||||
"βθδζλξ"
|
||||
"β θ δ ζ λ ξ"
|
||||
AF_BLUE_STRING_GREEK_SMALL
|
||||
"αειοπστω"
|
||||
"α ε ι ο π σ τ ω"
|
||||
AF_BLUE_STRING_GREEK_SMALL_DESCENDER
|
||||
"βγημρφχψ"
|
||||
"β γ η μ ρ φ χ ψ"
|
||||
|
||||
AF_BLUE_STRING_HEBREW_TOP
|
||||
"בדהחךכםס"
|
||||
"ב ד ה ח ך כ ם ס"
|
||||
AF_BLUE_STRING_HEBREW_BOTTOM
|
||||
"בטכםסצ"
|
||||
"ב ט כ ם ס צ"
|
||||
AF_BLUE_STRING_HEBREW_DESCENDER
|
||||
"קךןףץ"
|
||||
"ק ך ן ף ץ"
|
||||
|
||||
AF_BLUE_STRING_KHMER_TOP
|
||||
"ខ ទ ន ឧ ឩ ា"
|
||||
AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP
|
||||
"ក្ក ក្ខ ក្គ ក្ថ"
|
||||
AF_BLUE_STRING_KHMER_BOTTOM
|
||||
"ខ ឃ ច ឋ ប ម យ ឲ"
|
||||
AF_BLUE_STRING_KHMER_DESCENDER
|
||||
"ត្រ រៀ ឲ្យ អឿ"
|
||||
AF_BLUE_STRING_KHMER_LARGE_DESCENDER
|
||||
"ន្ត្រៃ ង្ខ្យ ក្បៀ ច្រៀ ន្តឿ ល្បឿ"
|
||||
|
||||
AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP
|
||||
"᧠ ᧡"
|
||||
AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM
|
||||
"᧶ ᧹"
|
||||
|
||||
AF_BLUE_STRING_LAO_TOP
|
||||
"າ ດ ອ ມ ລ ວ ຣ ງ"
|
||||
AF_BLUE_STRING_LAO_BOTTOM
|
||||
"າ ອ ບ ຍ ຣ ຮ ວ ຢ"
|
||||
AF_BLUE_STRING_LAO_ASCENDER
|
||||
"ປ ຢ ຟ ຝ"
|
||||
AF_BLUE_STRING_LAO_LARGE_ASCENDER
|
||||
"ໂ ໄ ໃ"
|
||||
AF_BLUE_STRING_LAO_DESCENDER
|
||||
"ງ ຊ ຖ ຽ ໆ ຯ"
|
||||
|
||||
AF_BLUE_STRING_LATIN_CAPITAL_TOP
|
||||
"THEZOCQS"
|
||||
"T H E Z O C Q S"
|
||||
AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM
|
||||
"HEZLOCUS"
|
||||
"H E Z L O C U S"
|
||||
AF_BLUE_STRING_LATIN_SMALL_F_TOP
|
||||
"fijkdbh"
|
||||
"f i j k d b h"
|
||||
AF_BLUE_STRING_LATIN_SMALL
|
||||
"xzroesc"
|
||||
"x z r o e s c"
|
||||
AF_BLUE_STRING_LATIN_SMALL_DESCENDER
|
||||
"pqgjy"
|
||||
"p q g j y"
|
||||
|
||||
// we assume that both the subscript and superscript ranges
|
||||
// don't contain oldstyle digits (actually, most fonts probably
|
||||
// have digits only in those ranges)
|
||||
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP
|
||||
"₀ ₃ ₅ ₇ ₈"
|
||||
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM
|
||||
"₀ ₁ ₂ ₃ ₈"
|
||||
AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP
|
||||
"ᵢ ⱼ ₕ ₖ ₗ"
|
||||
AF_BLUE_STRING_LATIN_SUBS_SMALL
|
||||
"ₐ ₑ ₒ ₓ ₙ ₛ ᵥ ᵤ ᵣ"
|
||||
AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER
|
||||
"ᵦ ᵧ ᵨ ᵩ ₚ"
|
||||
|
||||
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP
|
||||
"⁰ ³ ⁵ ⁷ ᵀ ᴴ ᴱ ᴼ"
|
||||
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM
|
||||
"⁰ ¹ ² ³ ᴱ ᴸ ᴼ ᵁ"
|
||||
AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP
|
||||
"ᵇ ᵈ ᵏ ʰ ʲ ᶠ ⁱ"
|
||||
AF_BLUE_STRING_LATIN_SUPS_SMALL
|
||||
"ᵉ ᵒ ʳ ˢ ˣ ᶜ ᶻ"
|
||||
AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER
|
||||
"ᵖ ʸ ᵍ"
|
||||
|
||||
AF_BLUE_STRING_MYANMAR_TOP
|
||||
"ခ ဂ င ဒ ဝ ၥ ၊ ။"
|
||||
AF_BLUE_STRING_MYANMAR_BOTTOM
|
||||
"င ဎ ဒ ပ ဗ ဝ ၊ ။"
|
||||
AF_BLUE_STRING_MYANMAR_ASCENDER
|
||||
"ဩ ြ ၍ ၏ ၆ ါ ိ"
|
||||
AF_BLUE_STRING_MYANMAR_DESCENDER
|
||||
"ဉ ည ဥ ဩ ဨ ၂ ၅ ၉"
|
||||
|
||||
// we separate the letters with spaces to avoid ligatures;
|
||||
// this is just for convenience to simplify reading
|
||||
AF_BLUE_STRING_TELUGU_TOP
|
||||
"ఇ ఌ ఙ ఞ ణ ఱ ౯"
|
||||
AF_BLUE_STRING_TELUGU_BOTTOM
|
||||
@@ -150,44 +221,44 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
|
||||
#ifdef AF_CONFIG_OPTION_CJK
|
||||
|
||||
AF_BLUE_STRING_CJK_TOP
|
||||
"他们你來們到和地"
|
||||
"对對就席我时時會"
|
||||
"来為能舰說说这這"
|
||||
"齊 |"
|
||||
"军同已愿既星是景"
|
||||
"民照现現理用置要"
|
||||
"軍那配里開雷露面"
|
||||
"顾"
|
||||
"他 们 你 來 們 到 和 地"
|
||||
" 对 對 就 席 我 时 時 會"
|
||||
" 来 為 能 舰 說 说 这 這"
|
||||
" 齊 |"
|
||||
" 军 同 已 愿 既 星 是 景"
|
||||
" 民 照 现 現 理 用 置 要"
|
||||
" 軍 那 配 里 開 雷 露 面"
|
||||
" 顾"
|
||||
AF_BLUE_STRING_CJK_BOTTOM
|
||||
"个为人他以们你來"
|
||||
"個們到和大对對就"
|
||||
"我时時有来為要說"
|
||||
"说 |"
|
||||
"主些因它想意理生"
|
||||
"當看着置者自著裡"
|
||||
"过还进進過道還里"
|
||||
"面"
|
||||
"个 为 人 他 以 们 你 來"
|
||||
" 個 們 到 和 大 对 對 就"
|
||||
" 我 时 時 有 来 為 要 說"
|
||||
" 说 |"
|
||||
" 主 些 因 它 想 意 理 生"
|
||||
" 當 看 着 置 者 自 著 裡"
|
||||
" 过 还 进 進 過 道 還 里"
|
||||
" 面"
|
||||
|
||||
#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
|
||||
|
||||
AF_BLUE_STRING_CJK_LEFT
|
||||
"些们你來們到和地"
|
||||
"她将將就年得情最"
|
||||
"样樣理能說说这這"
|
||||
"通 |"
|
||||
"即吗吧听呢品响嗎"
|
||||
"师師收断斷明眼間"
|
||||
"间际陈限除陳随際"
|
||||
"隨"
|
||||
" 些 们 你 來 們 到 和 地"
|
||||
" 她 将 將 就 年 得 情 最"
|
||||
" 样 樣 理 能 說 说 这 這"
|
||||
" 通 |"
|
||||
" 即 吗 吧 听 呢 品 响 嗎"
|
||||
" 师 師 收 断 斷 明 眼 間"
|
||||
" 间 际 陈 限 除 陳 随 際"
|
||||
" 隨"
|
||||
AF_BLUE_STRING_CJK_RIGHT
|
||||
"事前學将將情想或"
|
||||
"政斯新样樣民沒没"
|
||||
"然特现現球第經谁"
|
||||
"起 |"
|
||||
"例別别制动動吗嗎"
|
||||
"增指明朝期构物确"
|
||||
"种調调費费那都間"
|
||||
"间"
|
||||
"事 前 學 将 將 情 想 或"
|
||||
" 政 斯 新 样 樣 民 沒 没"
|
||||
" 然 特 现 現 球 第 經 谁"
|
||||
" 起 |"
|
||||
" 例 別 别 制 动 動 吗 嗎"
|
||||
" 增 指 明 朝 期 构 物 确"
|
||||
" 种 調 调 費 费 那 都 間"
|
||||
" 间"
|
||||
|
||||
#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
|
||||
|
||||
@@ -219,6 +290,14 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
|
||||
// respectively. Only horizontal blue zones (i.e., adjusting vertical
|
||||
// coordinate values) are supported.
|
||||
//
|
||||
// Some scripts like Khmer need character composition to get all necessary
|
||||
// blue zones, since Unicode only provides an abstract data model that
|
||||
// doesn't represent all possible glyph shapes. For such character
|
||||
// clusters, the HarfBuzz library is used to convert them into the
|
||||
// corresponding glyphs. The largest glyph element (where `largest' can be
|
||||
// either `largest ascender' or `largest descender') then defines the
|
||||
// corresponding flat or round extremum.
|
||||
//
|
||||
// For the latin auto-hinter, the overshoot should be larger than the
|
||||
// reference for top zones, and vice versa for bottom zones.
|
||||
//
|
||||
@@ -229,6 +308,21 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
|
||||
//
|
||||
// If not set, take the minimum values.
|
||||
//
|
||||
// Mutually exclusive with `LATIN_SUB_TOP'.
|
||||
//
|
||||
// LATIN_SUB_TOP
|
||||
// For all glyphs of a character cluster, compute the maximum flat
|
||||
// and round coordinate values of each component, then take the
|
||||
// smallest of the maximum values. The idea is to get the top of
|
||||
// subscript glyphs, as used in Khmer, for example. Note that
|
||||
// this mechanism doesn't work for ordinary ligatures.
|
||||
//
|
||||
// This flags indicates a secondary blue zone: It gets removed if
|
||||
// there is a non-LATIN_SUB_TOP blue zone at the same coordinate
|
||||
// value (after scaling).
|
||||
//
|
||||
// Mutually exclusive with `LATIN_TOP'.
|
||||
//
|
||||
// LATIN_NEUTRAL
|
||||
// Ignore round extrema and define the blue zone with flat values only.
|
||||
// Both top and bottom of contours can match. This is useful for
|
||||
@@ -264,11 +358,11 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
|
||||
//
|
||||
// Characters in a blue string are *not* automatically classified. Instead,
|
||||
// first come the characters used for the overshoot value, then the
|
||||
// character `|', then the characters used for the reference value. The
|
||||
// blue zone is then set up by the mean values of all reference values and
|
||||
// all overshoot values, respectively. Both horizontal and vertical blue
|
||||
// zones (i.e., adjusting vertical and horizontal coordinate values,
|
||||
// respectively) are supported.
|
||||
// character `|', then the characters used for the reference value
|
||||
// (everything separated by space characters). The blue zone is then set up
|
||||
// by the mean values of all reference values and all overshoot values,
|
||||
// respectively. Both horizontal and vertical blue zones (i.e., adjusting
|
||||
// vertical and horizontal coordinate values, respectively) are supported.
|
||||
//
|
||||
// For the cjk auto-hinter, the overshoot should be smaller than the
|
||||
// reference for top zones, and vice versa for bottom zones.
|
||||
@@ -289,9 +383,10 @@ AF_BLUE_STRING_ENUM AF_BLUE_STRINGS_ARRAY AF_BLUE_STRING_MAX_LEN:
|
||||
AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
|
||||
|
||||
AF_BLUE_STRINGSET_ARAB
|
||||
{ AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_ARABIC_JOIN, 0 }
|
||||
{ AF_BLUE_STRING_MAX, 0 }
|
||||
{ AF_BLUE_STRING_ARABIC_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_ARABIC_BOTTOM, 0 }
|
||||
{ AF_BLUE_STRING_ARABIC_JOIN, AF_BLUE_PROPERTY_LATIN_NEUTRAL }
|
||||
{ AF_BLUE_STRING_MAX, 0 }
|
||||
|
||||
AF_BLUE_STRINGSET_CYRL
|
||||
{ AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
@@ -329,6 +424,30 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
|
||||
{ AF_BLUE_STRING_HEBREW_DESCENDER, 0 }
|
||||
{ AF_BLUE_STRING_MAX, 0 }
|
||||
|
||||
AF_BLUE_STRINGSET_KHMR
|
||||
{ AF_BLUE_STRING_KHMER_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
|
||||
{ AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP, AF_BLUE_PROPERTY_LATIN_SUB_TOP }
|
||||
{ AF_BLUE_STRING_KHMER_BOTTOM, 0 }
|
||||
{ AF_BLUE_STRING_KHMER_DESCENDER, 0 }
|
||||
{ AF_BLUE_STRING_KHMER_LARGE_DESCENDER, 0 }
|
||||
{ AF_BLUE_STRING_MAX, 0 }
|
||||
|
||||
AF_BLUE_STRINGSET_KHMS
|
||||
{ AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
|
||||
{ AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM, 0 }
|
||||
{ AF_BLUE_STRING_MAX, 0 }
|
||||
|
||||
AF_BLUE_STRINGSET_LAO
|
||||
{ AF_BLUE_STRING_LAO_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
|
||||
{ AF_BLUE_STRING_LAO_BOTTOM, 0 }
|
||||
{ AF_BLUE_STRING_LAO_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_LAO_LARGE_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_LAO_DESCENDER, 0 }
|
||||
{ AF_BLUE_STRING_MAX, 0 }
|
||||
|
||||
AF_BLUE_STRINGSET_LATN
|
||||
{ AF_BLUE_STRING_LATIN_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM, 0 }
|
||||
@@ -339,6 +458,34 @@ AF_BLUE_STRINGSET_ENUM AF_BLUE_STRINGSETS_ARRAY AF_BLUE_STRINGSET_MAX_LEN:
|
||||
{ AF_BLUE_STRING_LATIN_SMALL_DESCENDER, 0 }
|
||||
{ AF_BLUE_STRING_MAX, 0 }
|
||||
|
||||
AF_BLUE_STRINGSET_LATB
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM, 0 }
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_SMALL, 0 }
|
||||
{ AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER, 0 }
|
||||
{ AF_BLUE_STRING_MAX, 0 }
|
||||
|
||||
AF_BLUE_STRINGSET_LATP
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM, 0 }
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_SMALL, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_SMALL, 0 }
|
||||
{ AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER, 0 }
|
||||
{ AF_BLUE_STRING_MAX, 0 }
|
||||
|
||||
AF_BLUE_STRINGSET_MYMR
|
||||
{ AF_BLUE_STRING_MYANMAR_TOP, AF_BLUE_PROPERTY_LATIN_TOP |
|
||||
AF_BLUE_PROPERTY_LATIN_X_HEIGHT }
|
||||
{ AF_BLUE_STRING_MYANMAR_BOTTOM, 0 }
|
||||
{ AF_BLUE_STRING_MYANMAR_ASCENDER, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_MYANMAR_DESCENDER, 0 }
|
||||
{ AF_BLUE_STRING_MAX, 0 }
|
||||
|
||||
AF_BLUE_STRINGSET_TELU
|
||||
{ AF_BLUE_STRING_TELUGU_TOP, AF_BLUE_PROPERTY_LATIN_TOP }
|
||||
{ AF_BLUE_STRING_TELUGU_BOTTOM, 0 }
|
||||
|
||||
@@ -28,32 +28,35 @@ FT_BEGIN_HEADER
|
||||
|
||||
/* an auxiliary macro to decode a UTF-8 character -- since we only use */
|
||||
/* hard-coded, self-converted data, no error checking is performed */
|
||||
#define GET_UTF8_CHAR( ch, p ) \
|
||||
ch = (unsigned char)*p++; \
|
||||
if ( ch >= 0x80 ) \
|
||||
{ \
|
||||
FT_UInt len; \
|
||||
\
|
||||
\
|
||||
if ( ch < 0xE0 ) \
|
||||
{ \
|
||||
len = 1; \
|
||||
ch &= 0x1F; \
|
||||
} \
|
||||
else if ( ch < 0xF0 ) \
|
||||
{ \
|
||||
len = 2; \
|
||||
ch &= 0x0F; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
len = 3; \
|
||||
ch &= 0x07; \
|
||||
} \
|
||||
\
|
||||
for ( ; len > 0; len-- ) \
|
||||
ch = ( ch << 6 ) | ( *p++ & 0x3F ); \
|
||||
}
|
||||
#define GET_UTF8_CHAR( ch, p ) \
|
||||
do \
|
||||
{ \
|
||||
ch = (unsigned char)*p++; \
|
||||
if ( ch >= 0x80 ) \
|
||||
{ \
|
||||
FT_UInt len_; \
|
||||
\
|
||||
\
|
||||
if ( ch < 0xE0 ) \
|
||||
{ \
|
||||
len_ = 1; \
|
||||
ch &= 0x1F; \
|
||||
} \
|
||||
else if ( ch < 0xF0 ) \
|
||||
{ \
|
||||
len_ = 2; \
|
||||
ch &= 0x0F; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
len_ = 3; \
|
||||
ch &= 0x07; \
|
||||
} \
|
||||
\
|
||||
for ( ; len_ > 0; len_-- ) \
|
||||
ch = ( ch << 6 ) | ( *p++ & 0x3F ); \
|
||||
} \
|
||||
} while ( 0 )
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@@ -75,46 +78,73 @@ FT_BEGIN_HEADER
|
||||
typedef enum AF_Blue_String_
|
||||
{
|
||||
AF_BLUE_STRING_ARABIC_TOP = 0,
|
||||
AF_BLUE_STRING_ARABIC_JOIN = 13,
|
||||
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 24,
|
||||
AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 41,
|
||||
AF_BLUE_STRING_CYRILLIC_SMALL = 58,
|
||||
AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 75,
|
||||
AF_BLUE_STRING_DEVANAGARI_BASE = 82,
|
||||
AF_BLUE_STRING_DEVANAGARI_TOP = 107,
|
||||
AF_BLUE_STRING_DEVANAGARI_HEAD = 132,
|
||||
AF_BLUE_STRING_DEVANAGARI_BOTTOM = 157,
|
||||
AF_BLUE_STRING_GREEK_CAPITAL_TOP = 164,
|
||||
AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 179,
|
||||
AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 192,
|
||||
AF_BLUE_STRING_GREEK_SMALL = 205,
|
||||
AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 222,
|
||||
AF_BLUE_STRING_HEBREW_TOP = 239,
|
||||
AF_BLUE_STRING_HEBREW_BOTTOM = 256,
|
||||
AF_BLUE_STRING_HEBREW_DESCENDER = 269,
|
||||
AF_BLUE_STRING_LATIN_CAPITAL_TOP = 280,
|
||||
AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 289,
|
||||
AF_BLUE_STRING_LATIN_SMALL_F_TOP = 298,
|
||||
AF_BLUE_STRING_LATIN_SMALL = 306,
|
||||
AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 314,
|
||||
AF_BLUE_STRING_TELUGU_TOP = 320,
|
||||
AF_BLUE_STRING_TELUGU_BOTTOM = 342,
|
||||
AF_BLUE_STRING_THAI_TOP = 364,
|
||||
AF_BLUE_STRING_THAI_BOTTOM = 383,
|
||||
AF_BLUE_STRING_THAI_ASCENDER = 405,
|
||||
AF_BLUE_STRING_THAI_LARGE_ASCENDER = 415,
|
||||
AF_BLUE_STRING_THAI_DESCENDER = 425,
|
||||
AF_BLUE_STRING_THAI_LARGE_DESCENDER = 438,
|
||||
AF_BLUE_STRING_THAI_DIGIT_TOP = 445,
|
||||
af_blue_1_1 = 454,
|
||||
AF_BLUE_STRING_ARABIC_BOTTOM = 18,
|
||||
AF_BLUE_STRING_ARABIC_JOIN = 33,
|
||||
AF_BLUE_STRING_CYRILLIC_CAPITAL_TOP = 36,
|
||||
AF_BLUE_STRING_CYRILLIC_CAPITAL_BOTTOM = 60,
|
||||
AF_BLUE_STRING_CYRILLIC_SMALL = 84,
|
||||
AF_BLUE_STRING_CYRILLIC_SMALL_DESCENDER = 108,
|
||||
AF_BLUE_STRING_DEVANAGARI_BASE = 117,
|
||||
AF_BLUE_STRING_DEVANAGARI_TOP = 149,
|
||||
AF_BLUE_STRING_DEVANAGARI_HEAD = 181,
|
||||
AF_BLUE_STRING_DEVANAGARI_BOTTOM = 213,
|
||||
AF_BLUE_STRING_GREEK_CAPITAL_TOP = 221,
|
||||
AF_BLUE_STRING_GREEK_CAPITAL_BOTTOM = 242,
|
||||
AF_BLUE_STRING_GREEK_SMALL_BETA_TOP = 260,
|
||||
AF_BLUE_STRING_GREEK_SMALL = 278,
|
||||
AF_BLUE_STRING_GREEK_SMALL_DESCENDER = 302,
|
||||
AF_BLUE_STRING_HEBREW_TOP = 326,
|
||||
AF_BLUE_STRING_HEBREW_BOTTOM = 350,
|
||||
AF_BLUE_STRING_HEBREW_DESCENDER = 368,
|
||||
AF_BLUE_STRING_KHMER_TOP = 383,
|
||||
AF_BLUE_STRING_KHMER_SUBSCRIPT_TOP = 407,
|
||||
AF_BLUE_STRING_KHMER_BOTTOM = 447,
|
||||
AF_BLUE_STRING_KHMER_DESCENDER = 479,
|
||||
AF_BLUE_STRING_KHMER_LARGE_DESCENDER = 513,
|
||||
AF_BLUE_STRING_KHMER_SYMBOLS_WAXING_TOP = 600,
|
||||
AF_BLUE_STRING_KHMER_SYMBOLS_WANING_BOTTOM = 608,
|
||||
AF_BLUE_STRING_LAO_TOP = 616,
|
||||
AF_BLUE_STRING_LAO_BOTTOM = 648,
|
||||
AF_BLUE_STRING_LAO_ASCENDER = 680,
|
||||
AF_BLUE_STRING_LAO_LARGE_ASCENDER = 696,
|
||||
AF_BLUE_STRING_LAO_DESCENDER = 708,
|
||||
AF_BLUE_STRING_LATIN_CAPITAL_TOP = 732,
|
||||
AF_BLUE_STRING_LATIN_CAPITAL_BOTTOM = 748,
|
||||
AF_BLUE_STRING_LATIN_SMALL_F_TOP = 764,
|
||||
AF_BLUE_STRING_LATIN_SMALL = 778,
|
||||
AF_BLUE_STRING_LATIN_SMALL_DESCENDER = 792,
|
||||
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_TOP = 802,
|
||||
AF_BLUE_STRING_LATIN_SUBS_CAPITAL_BOTTOM = 822,
|
||||
AF_BLUE_STRING_LATIN_SUBS_SMALL_F_TOP = 842,
|
||||
AF_BLUE_STRING_LATIN_SUBS_SMALL = 862,
|
||||
AF_BLUE_STRING_LATIN_SUBS_SMALL_DESCENDER = 898,
|
||||
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_TOP = 918,
|
||||
AF_BLUE_STRING_LATIN_SUPS_CAPITAL_BOTTOM = 949,
|
||||
AF_BLUE_STRING_LATIN_SUPS_SMALL_F_TOP = 978,
|
||||
AF_BLUE_STRING_LATIN_SUPS_SMALL = 1004,
|
||||
AF_BLUE_STRING_LATIN_SUPS_SMALL_DESCENDER = 1029,
|
||||
AF_BLUE_STRING_MYANMAR_TOP = 1040,
|
||||
AF_BLUE_STRING_MYANMAR_BOTTOM = 1072,
|
||||
AF_BLUE_STRING_MYANMAR_ASCENDER = 1104,
|
||||
AF_BLUE_STRING_MYANMAR_DESCENDER = 1132,
|
||||
AF_BLUE_STRING_TELUGU_TOP = 1164,
|
||||
AF_BLUE_STRING_TELUGU_BOTTOM = 1192,
|
||||
AF_BLUE_STRING_THAI_TOP = 1220,
|
||||
AF_BLUE_STRING_THAI_BOTTOM = 1244,
|
||||
AF_BLUE_STRING_THAI_ASCENDER = 1272,
|
||||
AF_BLUE_STRING_THAI_LARGE_ASCENDER = 1284,
|
||||
AF_BLUE_STRING_THAI_DESCENDER = 1296,
|
||||
AF_BLUE_STRING_THAI_LARGE_DESCENDER = 1312,
|
||||
AF_BLUE_STRING_THAI_DIGIT_TOP = 1320,
|
||||
af_blue_1_1 = 1331,
|
||||
#ifdef AF_CONFIG_OPTION_CJK
|
||||
AF_BLUE_STRING_CJK_TOP = af_blue_1_1 + 1,
|
||||
AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 153,
|
||||
af_blue_1_1_1 = af_blue_1_1 + 304,
|
||||
AF_BLUE_STRING_CJK_BOTTOM = af_blue_1_1 + 203,
|
||||
af_blue_1_1_1 = af_blue_1_1 + 404,
|
||||
#ifdef AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT
|
||||
AF_BLUE_STRING_CJK_LEFT = af_blue_1_1_1 + 1,
|
||||
AF_BLUE_STRING_CJK_RIGHT = af_blue_1_1_1 + 153,
|
||||
af_blue_1_1_2 = af_blue_1_1_1 + 304,
|
||||
AF_BLUE_STRING_CJK_RIGHT = af_blue_1_1_1 + 204,
|
||||
af_blue_1_1_2 = af_blue_1_1_1 + 405,
|
||||
#else
|
||||
af_blue_1_1_2 = af_blue_1_1_1 + 0,
|
||||
#endif /* AF_CONFIG_OPTION_CJK_BLUE_HANI_VERT */
|
||||
@@ -148,9 +178,10 @@ FT_BEGIN_HEADER
|
||||
/* blue string can't be used in more than a single writing system, which */
|
||||
/* is a safe bet. */
|
||||
#define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must have value 1 */
|
||||
#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 1 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 2 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 3 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_SUB_TOP ( 1U << 1 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 2 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 3 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 4 )
|
||||
|
||||
#define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must have value 1 */
|
||||
#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must have value 2 */
|
||||
@@ -165,14 +196,20 @@ FT_BEGIN_HEADER
|
||||
typedef enum AF_Blue_Stringset_
|
||||
{
|
||||
AF_BLUE_STRINGSET_ARAB = 0,
|
||||
AF_BLUE_STRINGSET_CYRL = 3,
|
||||
AF_BLUE_STRINGSET_DEVA = 9,
|
||||
AF_BLUE_STRINGSET_GREK = 15,
|
||||
AF_BLUE_STRINGSET_HEBR = 22,
|
||||
AF_BLUE_STRINGSET_LATN = 26,
|
||||
AF_BLUE_STRINGSET_TELU = 33,
|
||||
AF_BLUE_STRINGSET_THAI = 36,
|
||||
af_blue_2_1 = 44,
|
||||
AF_BLUE_STRINGSET_CYRL = 4,
|
||||
AF_BLUE_STRINGSET_DEVA = 10,
|
||||
AF_BLUE_STRINGSET_GREK = 16,
|
||||
AF_BLUE_STRINGSET_HEBR = 23,
|
||||
AF_BLUE_STRINGSET_KHMR = 27,
|
||||
AF_BLUE_STRINGSET_KHMS = 33,
|
||||
AF_BLUE_STRINGSET_LAO = 36,
|
||||
AF_BLUE_STRINGSET_LATN = 42,
|
||||
AF_BLUE_STRINGSET_LATB = 49,
|
||||
AF_BLUE_STRINGSET_LATP = 56,
|
||||
AF_BLUE_STRINGSET_MYMR = 63,
|
||||
AF_BLUE_STRINGSET_TELU = 68,
|
||||
AF_BLUE_STRINGSET_THAI = 71,
|
||||
af_blue_2_1 = 79,
|
||||
#ifdef AF_CONFIG_OPTION_CJK
|
||||
AF_BLUE_STRINGSET_HANI = af_blue_2_1 + 0,
|
||||
af_blue_2_1_1 = af_blue_2_1 + 2,
|
||||
|
||||
@@ -25,32 +25,35 @@ FT_BEGIN_HEADER
|
||||
|
||||
/* an auxiliary macro to decode a UTF-8 character -- since we only use */
|
||||
/* hard-coded, self-converted data, no error checking is performed */
|
||||
#define GET_UTF8_CHAR( ch, p ) \
|
||||
ch = (unsigned char)*p++; \
|
||||
if ( ch >= 0x80 ) \
|
||||
{ \
|
||||
FT_UInt len; \
|
||||
\
|
||||
\
|
||||
if ( ch < 0xE0 ) \
|
||||
{ \
|
||||
len = 1; \
|
||||
ch &= 0x1F; \
|
||||
} \
|
||||
else if ( ch < 0xF0 ) \
|
||||
{ \
|
||||
len = 2; \
|
||||
ch &= 0x0F; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
len = 3; \
|
||||
ch &= 0x07; \
|
||||
} \
|
||||
\
|
||||
for ( ; len > 0; len-- ) \
|
||||
ch = ( ch << 6 ) | ( *p++ & 0x3F ); \
|
||||
}
|
||||
#define GET_UTF8_CHAR( ch, p ) \
|
||||
do \
|
||||
{ \
|
||||
ch = (unsigned char)*p++; \
|
||||
if ( ch >= 0x80 ) \
|
||||
{ \
|
||||
FT_UInt len_; \
|
||||
\
|
||||
\
|
||||
if ( ch < 0xE0 ) \
|
||||
{ \
|
||||
len_ = 1; \
|
||||
ch &= 0x1F; \
|
||||
} \
|
||||
else if ( ch < 0xF0 ) \
|
||||
{ \
|
||||
len_ = 2; \
|
||||
ch &= 0x0F; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
len_ = 3; \
|
||||
ch &= 0x07; \
|
||||
} \
|
||||
\
|
||||
for ( ; len_ > 0; len_-- ) \
|
||||
ch = ( ch << 6 ) | ( *p++ & 0x3F ); \
|
||||
} \
|
||||
} while ( 0 )
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@@ -97,9 +100,10 @@ FT_BEGIN_HEADER
|
||||
/* blue string can't be used in more than a single writing system, which */
|
||||
/* is a safe bet. */
|
||||
#define AF_BLUE_PROPERTY_LATIN_TOP ( 1U << 0 ) /* must have value 1 */
|
||||
#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 1 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 2 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 3 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_SUB_TOP ( 1U << 1 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_NEUTRAL ( 1U << 2 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_X_HEIGHT ( 1U << 3 )
|
||||
#define AF_BLUE_PROPERTY_LATIN_LONG ( 1U << 4 )
|
||||
|
||||
#define AF_BLUE_PROPERTY_CJK_TOP ( 1U << 0 ) /* must have value 1 */
|
||||
#define AF_BLUE_PROPERTY_CJK_HORIZ ( 1U << 1 ) /* must have value 2 */
|
||||
|
||||
@@ -88,7 +88,6 @@
|
||||
{
|
||||
FT_Error error;
|
||||
FT_ULong glyph_index;
|
||||
FT_Long y_offset;
|
||||
int dim;
|
||||
AF_CJKMetricsRec dummy[1];
|
||||
AF_Scaler scaler = &dummy->root.scaler;
|
||||
@@ -101,45 +100,61 @@
|
||||
AF_ScriptClass script_class = AF_SCRIPT_CLASSES_GET
|
||||
[style_class->script];
|
||||
|
||||
FT_UInt32 standard_char;
|
||||
void* shaper_buf;
|
||||
const char* p;
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
FT_ULong ch;
|
||||
#endif
|
||||
|
||||
standard_char = script_class->standard_char1;
|
||||
af_get_char_index( &metrics->root,
|
||||
standard_char,
|
||||
&glyph_index,
|
||||
&y_offset );
|
||||
if ( !glyph_index )
|
||||
p = script_class->standard_charstring;
|
||||
shaper_buf = af_shaper_buf_create( face );
|
||||
|
||||
/* We check a list of standard characters. The first match wins. */
|
||||
|
||||
glyph_index = 0;
|
||||
while ( *p )
|
||||
{
|
||||
if ( script_class->standard_char2 )
|
||||
{
|
||||
standard_char = script_class->standard_char2;
|
||||
af_get_char_index( &metrics->root,
|
||||
standard_char,
|
||||
&glyph_index,
|
||||
&y_offset );
|
||||
if ( !glyph_index )
|
||||
{
|
||||
if ( script_class->standard_char3 )
|
||||
{
|
||||
standard_char = script_class->standard_char3;
|
||||
af_get_char_index( &metrics->root,
|
||||
standard_char,
|
||||
&glyph_index,
|
||||
&y_offset );
|
||||
if ( !glyph_index )
|
||||
goto Exit;
|
||||
}
|
||||
else
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
goto Exit;
|
||||
unsigned int num_idx;
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
const char* p_old;
|
||||
#endif
|
||||
|
||||
|
||||
while ( *p == ' ' )
|
||||
p++;
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
p_old = p;
|
||||
GET_UTF8_CHAR( ch, p_old );
|
||||
#endif
|
||||
|
||||
/* reject input that maps to more than a single glyph */
|
||||
p = af_shaper_get_cluster( p, &metrics->root, shaper_buf, &num_idx );
|
||||
if ( num_idx > 1 )
|
||||
continue;
|
||||
|
||||
/* otherwise exit loop if we have a result */
|
||||
glyph_index = af_shaper_get_elem( &metrics->root,
|
||||
shaper_buf,
|
||||
0,
|
||||
NULL,
|
||||
NULL );
|
||||
if ( glyph_index )
|
||||
break;
|
||||
}
|
||||
|
||||
af_shaper_buf_destroy( face, shaper_buf );
|
||||
|
||||
if ( !glyph_index )
|
||||
goto Exit;
|
||||
|
||||
if ( !glyph_index )
|
||||
goto Exit;
|
||||
|
||||
FT_TRACE5(( "standard character: U+%04lX (glyph index %d)\n",
|
||||
standard_char, glyph_index ));
|
||||
ch, glyph_index ));
|
||||
|
||||
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
|
||||
if ( error || face->glyph->outline.n_points <= 0 )
|
||||
@@ -177,6 +192,12 @@
|
||||
if ( error )
|
||||
goto Exit;
|
||||
|
||||
/*
|
||||
* We assume that the glyphs selected for the stem width
|
||||
* computation are `featureless' enough so that the linking
|
||||
* algorithm works fine without adjustments of its scoring
|
||||
* function.
|
||||
*/
|
||||
af_latin_hints_link_segments( hints,
|
||||
0,
|
||||
NULL,
|
||||
@@ -275,6 +296,8 @@
|
||||
AF_Blue_Stringset bss = sc->blue_stringset;
|
||||
const AF_Blue_StringRec* bs = &af_blue_stringsets[bss];
|
||||
|
||||
void* shaper_buf;
|
||||
|
||||
|
||||
/* we walk over the blue character strings as specified in the */
|
||||
/* style's entry in the `af_blue_stringset' array, computing its */
|
||||
@@ -284,6 +307,8 @@
|
||||
"==========================\n"
|
||||
"\n" ));
|
||||
|
||||
shaper_buf = af_shaper_buf_create( face );
|
||||
|
||||
for ( ; bs->string != AF_BLUE_STRING_MAX; bs++ )
|
||||
{
|
||||
const char* p = &af_blue_strings[bs->string];
|
||||
@@ -322,26 +347,47 @@
|
||||
|
||||
while ( *p )
|
||||
{
|
||||
FT_ULong ch;
|
||||
FT_ULong glyph_index;
|
||||
FT_Long y_offset;
|
||||
FT_Pos best_pos; /* same as points.y or points.x, resp. */
|
||||
FT_Int best_point;
|
||||
FT_Vector* points;
|
||||
|
||||
unsigned int num_idx;
|
||||
|
||||
GET_UTF8_CHAR( ch, p );
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
const char* p_old;
|
||||
FT_ULong ch;
|
||||
#endif
|
||||
|
||||
|
||||
while ( *p == ' ' )
|
||||
p++;
|
||||
|
||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||
p_old = p;
|
||||
GET_UTF8_CHAR( ch, p_old );
|
||||
#endif
|
||||
|
||||
/* switch to characters that define flat values */
|
||||
if ( ch == '|' )
|
||||
if ( *p == '|' )
|
||||
{
|
||||
fill = 0;
|
||||
FT_TRACE5(( " [reference values]\n" ));
|
||||
p++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/* reject input that maps to more than a single glyph */
|
||||
p = af_shaper_get_cluster( p, &metrics->root, shaper_buf, &num_idx );
|
||||
if ( num_idx > 1 )
|
||||
continue;
|
||||
|
||||
/* load the character in the face -- skip unknown or empty ones */
|
||||
af_get_char_index( &metrics->root, ch, &glyph_index, &y_offset );
|
||||
glyph_index = af_shaper_get_elem( &metrics->root,
|
||||
shaper_buf,
|
||||
0,
|
||||
NULL,
|
||||
NULL );
|
||||
if ( glyph_index == 0 )
|
||||
{
|
||||
FT_TRACE5(( " U+%04lX unavailable\n", ch ));
|
||||
@@ -350,9 +396,9 @@
|
||||
|
||||
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
|
||||
outline = face->glyph->outline;
|
||||
if ( error || outline.n_points <= 0 )
|
||||
if ( error || outline.n_points <= 2 )
|
||||
{
|
||||
FT_TRACE5(( " U+%04lX contains no outlines\n", ch ));
|
||||
FT_TRACE5(( " U+%04lX contains no (usable) outlines\n", ch ));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -431,7 +477,8 @@
|
||||
fills[num_fills++] = best_pos;
|
||||
else
|
||||
flats[num_flats++] = best_pos;
|
||||
}
|
||||
|
||||
} /* end while loop */
|
||||
|
||||
if ( num_flats == 0 && num_fills == 0 )
|
||||
{
|
||||
@@ -498,7 +545,10 @@
|
||||
FT_TRACE5(( " -> reference = %ld\n"
|
||||
" overshoot = %ld\n",
|
||||
*blue_ref, *blue_shoot ));
|
||||
}
|
||||
|
||||
} /* end for loop */
|
||||
|
||||
af_shaper_buf_destroy( face, shaper_buf );
|
||||
|
||||
FT_TRACE5(( "\n" ));
|
||||
|
||||
@@ -512,27 +562,36 @@
|
||||
af_cjk_metrics_check_digits( AF_CJKMetrics metrics,
|
||||
FT_Face face )
|
||||
{
|
||||
FT_UInt i;
|
||||
FT_Bool started = 0, same_width = 1;
|
||||
FT_Fixed advance, old_advance = 0;
|
||||
|
||||
void* shaper_buf;
|
||||
|
||||
/* digit `0' is 0x30 in all supported charmaps */
|
||||
for ( i = 0x30; i <= 0x39; i++ )
|
||||
/* in all supported charmaps, digits have character codes 0x30-0x39 */
|
||||
const char digits[] = "0 1 2 3 4 5 6 7 8 9";
|
||||
const char* p;
|
||||
|
||||
|
||||
p = digits;
|
||||
shaper_buf = af_shaper_buf_create( face );
|
||||
|
||||
while ( *p )
|
||||
{
|
||||
FT_ULong glyph_index;
|
||||
FT_Long y_offset;
|
||||
FT_ULong glyph_index;
|
||||
unsigned int num_idx;
|
||||
|
||||
|
||||
af_get_char_index( &metrics->root, i, &glyph_index, &y_offset );
|
||||
if ( glyph_index == 0 )
|
||||
/* reject input that maps to more than a single glyph */
|
||||
p = af_shaper_get_cluster( p, &metrics->root, shaper_buf, &num_idx );
|
||||
if ( num_idx > 1 )
|
||||
continue;
|
||||
|
||||
if ( FT_Get_Advance( face, glyph_index,
|
||||
FT_LOAD_NO_SCALE |
|
||||
FT_LOAD_NO_HINTING |
|
||||
FT_LOAD_IGNORE_TRANSFORM,
|
||||
&advance ) )
|
||||
glyph_index = af_shaper_get_elem( &metrics->root,
|
||||
shaper_buf,
|
||||
0,
|
||||
&advance,
|
||||
NULL );
|
||||
if ( !glyph_index )
|
||||
continue;
|
||||
|
||||
if ( started )
|
||||
@@ -550,6 +609,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
af_shaper_buf_destroy( face, shaper_buf );
|
||||
|
||||
metrics->root.digits_have_same_width = same_width;
|
||||
}
|
||||
|
||||
@@ -688,6 +749,22 @@
|
||||
}
|
||||
|
||||
|
||||
/* Extract standard_width from writing system/script specific */
|
||||
/* metrics class. */
|
||||
|
||||
FT_LOCAL_DEF( void )
|
||||
af_cjk_get_standard_widths( AF_CJKMetrics metrics,
|
||||
FT_Pos* stdHW,
|
||||
FT_Pos* stdVW )
|
||||
{
|
||||
if ( stdHW )
|
||||
*stdHW = metrics->axis[AF_DIMENSION_VERT].standard_width;
|
||||
|
||||
if ( stdVW )
|
||||
*stdVW = metrics->axis[AF_DIMENSION_HORZ].standard_width;
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/***** *****/
|
||||
@@ -2181,7 +2258,8 @@
|
||||
/* Apply the complete hinting algorithm to a CJK glyph. */
|
||||
|
||||
FT_LOCAL_DEF( FT_Error )
|
||||
af_cjk_hints_apply( AF_GlyphHints hints,
|
||||
af_cjk_hints_apply( FT_UInt glyph_index,
|
||||
AF_GlyphHints hints,
|
||||
FT_Outline* outline,
|
||||
AF_CJKMetrics metrics )
|
||||
{
|
||||
@@ -2189,6 +2267,7 @@
|
||||
int dim;
|
||||
|
||||
FT_UNUSED( metrics );
|
||||
FT_UNUSED( glyph_index );
|
||||
|
||||
|
||||
error = af_glyph_hints_reload( hints, outline );
|
||||
@@ -2278,6 +2357,7 @@
|
||||
(AF_WritingSystem_InitMetricsFunc) af_cjk_metrics_init,
|
||||
(AF_WritingSystem_ScaleMetricsFunc)af_cjk_metrics_scale,
|
||||
(AF_WritingSystem_DoneMetricsFunc) NULL,
|
||||
(AF_WritingSystem_GetStdWidthsFunc)af_cjk_get_standard_widths,
|
||||
|
||||
(AF_WritingSystem_InitHintsFunc) af_cjk_hints_init,
|
||||
(AF_WritingSystem_ApplyHintsFunc) af_cjk_hints_apply
|
||||
@@ -2297,6 +2377,7 @@
|
||||
(AF_WritingSystem_InitMetricsFunc) NULL,
|
||||
(AF_WritingSystem_ScaleMetricsFunc)NULL,
|
||||
(AF_WritingSystem_DoneMetricsFunc) NULL,
|
||||
(AF_WritingSystem_GetStdWidthsFunc)NULL,
|
||||
|
||||
(AF_WritingSystem_InitHintsFunc) NULL,
|
||||
(AF_WritingSystem_ApplyHintsFunc) NULL
|
||||
|
||||
@@ -115,7 +115,8 @@ FT_BEGIN_HEADER
|
||||
AF_CJKMetrics metrics );
|
||||
|
||||
FT_LOCAL( FT_Error )
|
||||
af_cjk_hints_apply( AF_GlyphHints hints,
|
||||
af_cjk_hints_apply( FT_UInt glyph_index,
|
||||
AF_GlyphHints hints,
|
||||
FT_Outline* outline,
|
||||
AF_CJKMetrics metrics );
|
||||
|
||||
|
||||
@@ -38,11 +38,14 @@
|
||||
|
||||
|
||||
static FT_Error
|
||||
af_dummy_hints_apply( AF_GlyphHints hints,
|
||||
af_dummy_hints_apply( FT_UInt glyph_index,
|
||||
AF_GlyphHints hints,
|
||||
FT_Outline* outline )
|
||||
{
|
||||
FT_Error error;
|
||||
|
||||
FT_UNUSED( glyph_index );
|
||||
|
||||
|
||||
error = af_glyph_hints_reload( hints, outline );
|
||||
if ( !error )
|
||||
@@ -62,6 +65,7 @@
|
||||
(AF_WritingSystem_InitMetricsFunc) NULL,
|
||||
(AF_WritingSystem_ScaleMetricsFunc)NULL,
|
||||
(AF_WritingSystem_DoneMetricsFunc) NULL,
|
||||
(AF_WritingSystem_GetStdWidthsFunc)NULL,
|
||||
|
||||
(AF_WritingSystem_InitHintsFunc) af_dummy_hints_init,
|
||||
(AF_WritingSystem_ApplyHintsFunc) af_dummy_hints_apply
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "afglobal.h"
|
||||
#include "afranges.h"
|
||||
#include "hbshim.h"
|
||||
#include "afshaper.h"
|
||||
#include FT_INTERNAL_DEBUG_H
|
||||
|
||||
|
||||
@@ -42,12 +42,13 @@
|
||||
|
||||
|
||||
#undef SCRIPT
|
||||
#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \
|
||||
#define SCRIPT( s, S, d, h, ss ) \
|
||||
AF_DEFINE_SCRIPT_CLASS( \
|
||||
af_ ## s ## _script_class, \
|
||||
AF_SCRIPT_ ## S, \
|
||||
af_ ## s ## _uniranges, \
|
||||
sc1, sc2, sc3 )
|
||||
af_ ## s ## _nonbase_uniranges, \
|
||||
ss )
|
||||
|
||||
#include "afscript.h"
|
||||
|
||||
@@ -82,7 +83,7 @@
|
||||
|
||||
|
||||
#undef SCRIPT
|
||||
#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \
|
||||
#define SCRIPT( s, S, d, h, ss ) \
|
||||
&af_ ## s ## _script_class,
|
||||
|
||||
FT_LOCAL_ARRAY_DEF( AF_ScriptClass )
|
||||
@@ -135,16 +136,15 @@
|
||||
FT_Error error;
|
||||
FT_Face face = globals->face;
|
||||
FT_CharMap old_charmap = face->charmap;
|
||||
FT_Byte* gstyles = globals->glyph_styles;
|
||||
FT_UShort* gstyles = globals->glyph_styles;
|
||||
FT_UInt ss;
|
||||
FT_UInt i;
|
||||
FT_UInt dflt = ~0U; /* a non-valid value */
|
||||
|
||||
|
||||
/* the value AF_STYLE_UNASSIGNED means `uncovered glyph' */
|
||||
FT_MEM_SET( globals->glyph_styles,
|
||||
AF_STYLE_UNASSIGNED,
|
||||
globals->glyph_count );
|
||||
for ( i = 0; i < (FT_UInt)globals->glyph_count; i++ )
|
||||
gstyles[i] = AF_STYLE_UNASSIGNED;
|
||||
|
||||
error = FT_Select_Charmap( face, FT_ENCODING_UNICODE );
|
||||
if ( error )
|
||||
@@ -190,10 +190,10 @@
|
||||
|
||||
gindex = FT_Get_Char_Index( face, charcode );
|
||||
|
||||
if ( gindex != 0 &&
|
||||
gindex < (FT_ULong)globals->glyph_count &&
|
||||
gstyles[gindex] == AF_STYLE_UNASSIGNED )
|
||||
gstyles[gindex] = (FT_Byte)ss;
|
||||
if ( gindex != 0 &&
|
||||
gindex < (FT_ULong)globals->glyph_count &&
|
||||
( gstyles[gindex] & AF_STYLE_MASK ) == AF_STYLE_UNASSIGNED )
|
||||
gstyles[gindex] = (FT_UShort)ss;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -202,21 +202,50 @@
|
||||
if ( gindex == 0 || charcode > range->last )
|
||||
break;
|
||||
|
||||
if ( gindex < (FT_ULong)globals->glyph_count &&
|
||||
gstyles[gindex] == AF_STYLE_UNASSIGNED )
|
||||
gstyles[gindex] = (FT_Byte)ss;
|
||||
if ( gindex < (FT_ULong)globals->glyph_count &&
|
||||
( gstyles[gindex] & AF_STYLE_MASK ) == AF_STYLE_UNASSIGNED )
|
||||
gstyles[gindex] = (FT_UShort)ss;
|
||||
}
|
||||
}
|
||||
|
||||
/* do the same for the script's non-base characters */
|
||||
for ( range = script_class->script_uni_nonbase_ranges;
|
||||
range->first != 0;
|
||||
range++ )
|
||||
{
|
||||
FT_ULong charcode = range->first;
|
||||
FT_UInt gindex;
|
||||
|
||||
|
||||
gindex = FT_Get_Char_Index( face, charcode );
|
||||
|
||||
if ( gindex != 0 &&
|
||||
gindex < (FT_ULong)globals->glyph_count &&
|
||||
( gstyles[gindex] & AF_STYLE_MASK ) == (FT_UShort)ss )
|
||||
gstyles[gindex] |= AF_NONBASE;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
charcode = FT_Get_Next_Char( face, charcode, &gindex );
|
||||
|
||||
if ( gindex == 0 || charcode > range->last )
|
||||
break;
|
||||
|
||||
if ( gindex < (FT_ULong)globals->glyph_count &&
|
||||
( gstyles[gindex] & AF_STYLE_MASK ) == (FT_UShort)ss )
|
||||
gstyles[gindex] |= AF_NONBASE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* get glyphs not directly addressable by cmap */
|
||||
af_get_coverage( globals, style_class, gstyles );
|
||||
af_shaper_get_coverage( globals, style_class, gstyles );
|
||||
}
|
||||
}
|
||||
|
||||
/* handle the default OpenType features of the default script ... */
|
||||
af_get_coverage( globals, AF_STYLE_CLASSES_GET[dflt], gstyles );
|
||||
af_shaper_get_coverage( globals, AF_STYLE_CLASSES_GET[dflt], gstyles );
|
||||
|
||||
/* ... and the remaining default OpenType features */
|
||||
for ( ss = 0; AF_STYLE_CLASSES_GET[ss]; ss++ )
|
||||
@@ -225,7 +254,7 @@
|
||||
|
||||
|
||||
if ( ss != dflt && style_class->coverage == AF_COVERAGE_DEFAULT )
|
||||
af_get_coverage( globals, style_class, gstyles );
|
||||
af_shaper_get_coverage( globals, style_class, gstyles );
|
||||
}
|
||||
|
||||
/* mark ASCII digits */
|
||||
@@ -250,9 +279,9 @@
|
||||
|
||||
for ( nn = 0; nn < globals->glyph_count; nn++ )
|
||||
{
|
||||
if ( ( gstyles[nn] & ~AF_DIGIT ) == AF_STYLE_UNASSIGNED )
|
||||
if ( ( gstyles[nn] & AF_STYLE_MASK ) == AF_STYLE_UNASSIGNED )
|
||||
{
|
||||
gstyles[nn] &= ~AF_STYLE_UNASSIGNED;
|
||||
gstyles[nn] &= ~AF_STYLE_MASK;
|
||||
gstyles[nn] |= globals->module->fallback_style;
|
||||
}
|
||||
}
|
||||
@@ -276,7 +305,7 @@
|
||||
|
||||
for ( idx = 0; idx < globals->glyph_count; idx++ )
|
||||
{
|
||||
if ( ( gstyles[idx] & ~AF_DIGIT ) == style_class->style )
|
||||
if ( ( gstyles[idx] & AF_STYLE_MASK ) == style_class->style )
|
||||
{
|
||||
if ( !( count % 10 ) )
|
||||
FT_TRACE4(( " " ));
|
||||
@@ -314,18 +343,28 @@
|
||||
|
||||
memory = face->memory;
|
||||
|
||||
/* we allocate an AF_FaceGlobals structure together */
|
||||
/* with the glyph_styles array */
|
||||
if ( FT_ALLOC( globals,
|
||||
sizeof ( *globals ) +
|
||||
(FT_ULong)face->num_glyphs * sizeof ( FT_Byte ) ) )
|
||||
(FT_ULong)face->num_glyphs * sizeof ( FT_UShort ) ) )
|
||||
goto Exit;
|
||||
|
||||
globals->face = face;
|
||||
globals->glyph_count = face->num_glyphs;
|
||||
globals->glyph_styles = (FT_Byte*)( globals + 1 );
|
||||
globals->module = module;
|
||||
globals->face = face;
|
||||
globals->glyph_count = face->num_glyphs;
|
||||
/* right after the globals structure come the glyph styles */
|
||||
globals->glyph_styles = (FT_UShort*)( globals + 1 );
|
||||
globals->module = module;
|
||||
globals->stem_darkening_for_ppem = 0;
|
||||
globals->darken_x = 0;
|
||||
globals->darken_y = 0;
|
||||
globals->standard_vertical_width = 0;
|
||||
globals->standard_horizontal_width = 0;
|
||||
globals->scale_down_factor = 0;
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
|
||||
globals->hb_font = hb_ft_font_create( face, NULL );
|
||||
globals->hb_buf = hb_buffer_create();
|
||||
#endif
|
||||
|
||||
error = af_face_globals_compute_style_coverage( globals );
|
||||
@@ -372,11 +411,21 @@
|
||||
#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
|
||||
hb_font_destroy( globals->hb_font );
|
||||
globals->hb_font = NULL;
|
||||
|
||||
hb_buffer_destroy( globals->hb_buf );
|
||||
globals->hb_buf = NULL;
|
||||
#endif
|
||||
|
||||
globals->glyph_count = 0;
|
||||
globals->glyph_styles = NULL; /* no need to free this one! */
|
||||
globals->face = NULL;
|
||||
globals->glyph_count = 0;
|
||||
globals->stem_darkening_for_ppem = 0;
|
||||
globals->darken_x = 0;
|
||||
globals->darken_y = 0;
|
||||
globals->standard_vertical_width = 0;
|
||||
globals->standard_horizontal_width = 0;
|
||||
globals->scale_down_factor = 0;
|
||||
/* no need to free this one! */
|
||||
globals->glyph_styles = NULL;
|
||||
globals->face = NULL;
|
||||
|
||||
FT_FREE( globals );
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "aftypes.h"
|
||||
#include "afmodule.h"
|
||||
#include "hbshim.h"
|
||||
#include "afshaper.h"
|
||||
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
@@ -34,7 +34,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
|
||||
#undef SCRIPT
|
||||
#define SCRIPT( s, S, d, h, sc1, sc2, sc3 ) \
|
||||
#define SCRIPT( s, S, d, h, ss ) \
|
||||
AF_DECLARE_SCRIPT_CLASS( af_ ## s ## _script_class )
|
||||
|
||||
#include "afscript.h"
|
||||
@@ -72,10 +72,16 @@ FT_BEGIN_HEADER
|
||||
#endif
|
||||
/* default script for OpenType; ignored if HarfBuzz isn't used */
|
||||
#define AF_SCRIPT_DEFAULT AF_SCRIPT_LATN
|
||||
/* a bit mask indicating an uncovered glyph */
|
||||
#define AF_STYLE_UNASSIGNED 0x7F
|
||||
/* if this flag is set, we have an ASCII digit */
|
||||
#define AF_DIGIT 0x80
|
||||
|
||||
/* a bit mask for AF_DIGIT and AF_NONBASE */
|
||||
#define AF_STYLE_MASK 0x3FFF
|
||||
/* an uncovered glyph */
|
||||
#define AF_STYLE_UNASSIGNED AF_STYLE_MASK
|
||||
|
||||
/* if this flag is set, we have an ASCII digit */
|
||||
#define AF_DIGIT 0x8000U
|
||||
/* if this flag is set, we have a non-base character */
|
||||
#define AF_NONBASE 0x4000U
|
||||
|
||||
/* `increase-x-height' property */
|
||||
#define AF_PROP_INCREASE_X_HEIGHT_MIN 6
|
||||
@@ -100,10 +106,11 @@ FT_BEGIN_HEADER
|
||||
{
|
||||
FT_Face face;
|
||||
FT_Long glyph_count; /* same as face->num_glyphs */
|
||||
FT_Byte* glyph_styles;
|
||||
FT_UShort* glyph_styles;
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_USE_HARFBUZZ
|
||||
hb_font_t* hb_font;
|
||||
hb_buffer_t* hb_buf; /* for feature comparison */
|
||||
#endif
|
||||
|
||||
/* per-face auto-hinter properties */
|
||||
@@ -111,6 +118,22 @@ FT_BEGIN_HEADER
|
||||
|
||||
AF_StyleMetrics metrics[AF_STYLE_MAX];
|
||||
|
||||
/* Compute darkening amount once per size. Use this to check whether */
|
||||
/* darken_{x,y} needs to be recomputed. */
|
||||
FT_UShort stem_darkening_for_ppem;
|
||||
/* Copy from e.g. AF_LatinMetrics.axis[AF_DIMENSION_HORZ] */
|
||||
/* to compute the darkening amount. */
|
||||
FT_Pos standard_vertical_width;
|
||||
/* Copy from e.g. AF_LatinMetrics.axis[AF_DIMENSION_VERT] */
|
||||
/* to compute the darkening amount. */
|
||||
FT_Pos standard_horizontal_width;
|
||||
/* The actual amount to darken a glyph along the X axis. */
|
||||
FT_Pos darken_x;
|
||||
/* The actual amount to darken a glyph along the Y axis. */
|
||||
FT_Pos darken_y;
|
||||
/* Amount to scale down by to keep emboldened points */
|
||||
/* on the Y-axis in pre-computed blue zones. */
|
||||
FT_Fixed scale_down_factor;
|
||||
AF_Module module; /* to access global properties */
|
||||
|
||||
} AF_FaceGlobalsRec;
|
||||
|
||||
@@ -219,6 +219,82 @@
|
||||
#define AF_INDEX_NUM( ptr, base ) (int)( (ptr) ? ( (ptr) - (base) ) : -1 )
|
||||
|
||||
|
||||
static char*
|
||||
af_print_idx( char* p,
|
||||
int idx )
|
||||
{
|
||||
if ( idx == -1 )
|
||||
{
|
||||
p[0] = '-';
|
||||
p[1] = '-';
|
||||
p[2] = '\0';
|
||||
}
|
||||
else
|
||||
ft_sprintf( p, "%d", idx );
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
af_get_segment_index( AF_GlyphHints hints,
|
||||
int point_idx,
|
||||
int dimension )
|
||||
{
|
||||
AF_AxisHints axis = &hints->axis[dimension];
|
||||
AF_Point point = hints->points + point_idx;
|
||||
AF_Segment segments = axis->segments;
|
||||
AF_Segment limit = segments + axis->num_segments;
|
||||
AF_Segment segment;
|
||||
|
||||
|
||||
for ( segment = segments; segment < limit; segment++ )
|
||||
{
|
||||
if ( segment->first <= segment->last )
|
||||
{
|
||||
if ( point >= segment->first && point <= segment->last )
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
AF_Point p = segment->first;
|
||||
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if ( point == p )
|
||||
goto Exit;
|
||||
|
||||
if ( p == segment->last )
|
||||
break;
|
||||
|
||||
p = p->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Exit:
|
||||
if ( segment == limit )
|
||||
return -1;
|
||||
|
||||
return (int)( segment - segments );
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
af_get_edge_index( AF_GlyphHints hints,
|
||||
int segment_idx,
|
||||
int dimension )
|
||||
{
|
||||
AF_AxisHints axis = &hints->axis[dimension];
|
||||
AF_Edge edges = axis->edges;
|
||||
AF_Segment segment = axis->segments + segment_idx;
|
||||
|
||||
|
||||
return segment_idx == -1 ? -1 : AF_INDEX_NUM( segment->edge, edges );
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -234,22 +310,39 @@
|
||||
AF_DUMP(( "Table of points:\n" ));
|
||||
|
||||
if ( hints->num_points )
|
||||
AF_DUMP(( " [ index | xorg | yorg | xscale | yscale"
|
||||
" | xfit | yfit | flags ]\n" ));
|
||||
AF_DUMP(( " index hedge hseg vedge vseg flags"
|
||||
" xorg yorg xscale yscale xfit yfit\n" ));
|
||||
else
|
||||
AF_DUMP(( " (none)\n" ));
|
||||
|
||||
for ( point = points; point < limit; point++ )
|
||||
AF_DUMP(( " [ %5d | %5d | %5d | %6.2f | %6.2f"
|
||||
" | %5.2f | %5.2f | %c ]\n",
|
||||
AF_INDEX_NUM( point, points ),
|
||||
{
|
||||
int point_idx = AF_INDEX_NUM( point, points );
|
||||
int segment_idx_0 = af_get_segment_index( hints, point_idx, 0 );
|
||||
int segment_idx_1 = af_get_segment_index( hints, point_idx, 1 );
|
||||
|
||||
char buf1[16], buf2[16], buf3[16], buf4[16];
|
||||
|
||||
|
||||
AF_DUMP(( " %5d %5s %5s %5s %5s %s "
|
||||
" %5d %5d %7.2f %7.2f %7.2f %7.2f\n",
|
||||
point_idx,
|
||||
af_print_idx( buf1,
|
||||
af_get_edge_index( hints, segment_idx_1, 1 ) ),
|
||||
af_print_idx( buf2, segment_idx_1 ),
|
||||
af_print_idx( buf3,
|
||||
af_get_edge_index( hints, segment_idx_0, 0 ) ),
|
||||
af_print_idx( buf4, segment_idx_0 ),
|
||||
( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ? "weak"
|
||||
: " -- ",
|
||||
|
||||
point->fx,
|
||||
point->fy,
|
||||
point->ox / 64.0,
|
||||
point->oy / 64.0,
|
||||
point->x / 64.0,
|
||||
point->y / 64.0,
|
||||
( point->flags & AF_FLAG_WEAK_INTERPOLATION ) ? 'w' : ' '));
|
||||
point->y / 64.0 ));
|
||||
}
|
||||
AF_DUMP(( "\n" ));
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
@@ -306,21 +399,23 @@
|
||||
AF_Segment limit = segments + axis->num_segments;
|
||||
AF_Segment seg;
|
||||
|
||||
char buf1[16], buf2[16], buf3[16];
|
||||
|
||||
|
||||
AF_DUMP(( "Table of %s segments:\n",
|
||||
dimension == AF_DIMENSION_HORZ ? "vertical"
|
||||
: "horizontal" ));
|
||||
if ( axis->num_segments )
|
||||
AF_DUMP(( " [ index | pos | dir | from"
|
||||
" | to | link | serif | edge"
|
||||
" | height | extra | flags ]\n" ));
|
||||
AF_DUMP(( " index pos dir from to"
|
||||
" link serif edge"
|
||||
" height extra flags\n" ));
|
||||
else
|
||||
AF_DUMP(( " (none)\n" ));
|
||||
|
||||
for ( seg = segments; seg < limit; seg++ )
|
||||
AF_DUMP(( " [ %5d | %5.2g | %5s | %4d"
|
||||
" | %4d | %4d | %5d | %4d"
|
||||
" | %6d | %5d | %11s ]\n",
|
||||
AF_DUMP(( " %5d %5.2g %5s %4d %4d"
|
||||
" %4s %5s %4s"
|
||||
" %6d %5d %11s\n",
|
||||
AF_INDEX_NUM( seg, segments ),
|
||||
dimension == AF_DIMENSION_HORZ
|
||||
? (int)seg->first->ox / 64.0
|
||||
@@ -328,9 +423,11 @@
|
||||
af_dir_str( (AF_Direction)seg->dir ),
|
||||
AF_INDEX_NUM( seg->first, points ),
|
||||
AF_INDEX_NUM( seg->last, points ),
|
||||
AF_INDEX_NUM( seg->link, segments ),
|
||||
AF_INDEX_NUM( seg->serif, segments ),
|
||||
AF_INDEX_NUM( seg->edge, edges ),
|
||||
|
||||
af_print_idx( buf1, AF_INDEX_NUM( seg->link, segments ) ),
|
||||
af_print_idx( buf2, AF_INDEX_NUM( seg->serif, segments ) ),
|
||||
af_print_idx( buf3, AF_INDEX_NUM( seg->edge, edges ) ),
|
||||
|
||||
seg->height,
|
||||
seg->height - ( seg->max_coord - seg->min_coord ),
|
||||
af_edge_flags_to_string( seg->flags ) ));
|
||||
@@ -435,6 +532,8 @@
|
||||
AF_Edge limit = edges + axis->num_edges;
|
||||
AF_Edge edge;
|
||||
|
||||
char buf1[16], buf2[16];
|
||||
|
||||
|
||||
/*
|
||||
* note: AF_DIMENSION_HORZ corresponds to _vertical_ edges
|
||||
@@ -444,19 +543,20 @@
|
||||
dimension == AF_DIMENSION_HORZ ? "vertical"
|
||||
: "horizontal" ));
|
||||
if ( axis->num_edges )
|
||||
AF_DUMP(( " [ index | pos | dir | link"
|
||||
" | serif | blue | opos | pos | flags ]\n" ));
|
||||
AF_DUMP(( " index pos dir link serif"
|
||||
" blue opos pos flags\n" ));
|
||||
else
|
||||
AF_DUMP(( " (none)\n" ));
|
||||
|
||||
for ( edge = edges; edge < limit; edge++ )
|
||||
AF_DUMP(( " [ %5d | %5.2g | %5s | %4d"
|
||||
" | %5d | %c | %5.2f | %5.2f | %11s ]\n",
|
||||
AF_DUMP(( " %5d %5.2g %5s %4s %5s"
|
||||
" %c %5.2f %5.2f %11s\n",
|
||||
AF_INDEX_NUM( edge, edges ),
|
||||
(int)edge->opos / 64.0,
|
||||
af_dir_str( (AF_Direction)edge->dir ),
|
||||
AF_INDEX_NUM( edge->link, edges ),
|
||||
AF_INDEX_NUM( edge->serif, edges ),
|
||||
af_print_idx( buf1, AF_INDEX_NUM( edge->link, edges ) ),
|
||||
af_print_idx( buf2, AF_INDEX_NUM( edge->serif, edges ) ),
|
||||
|
||||
edge->blue_edge ? 'y' : 'n',
|
||||
edge->opos / 64.0,
|
||||
edge->pos / 64.0,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user