From bbda1cc717797ba68eb2eda0dd18205ea4413009 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Tue, 20 Jun 2017 01:56:21 +0000 Subject: freetype2 2.8.0 git-svn-id: svn://tug.org/texlive/trunk@44650 c570f23f-e606-0410-a88d-b1316a301751 --- .../include/freetype/config/ftconfig.h | 11 +- .../include/freetype/config/ftheader.h | 15 +- .../include/freetype/config/ftoption.h | 80 +- .../include/freetype/config/ftstdlib.h | 2 +- .../freetype-src/include/freetype/freetype.h | 1001 ++++++++++++-------- .../freetype-src/include/freetype/ftadvanc.h | 2 +- .../freetype-src/include/freetype/ftautoh.h | 28 +- .../freetype-src/include/freetype/ftbbox.h | 2 +- .../freetype-src/include/freetype/ftbdf.h | 2 +- .../freetype-src/include/freetype/ftbitmap.h | 2 +- .../freetype-src/include/freetype/ftbzip2.h | 2 +- .../freetype-src/include/freetype/ftcache.h | 2 +- .../freetype-src/include/freetype/ftcffdrv.h | 48 +- .../freetype-src/include/freetype/ftchapters.h | 1 + .../freetype-src/include/freetype/ftcid.h | 2 +- .../freetype-src/include/freetype/fterrdef.h | 4 +- .../freetype-src/include/freetype/fterrors.h | 4 +- .../freetype-src/include/freetype/ftfntfmt.h | 2 +- .../freetype-src/include/freetype/ftgasp.h | 16 +- .../freetype-src/include/freetype/ftglyph.h | 4 +- .../freetype-src/include/freetype/ftgxval.h | 2 +- .../freetype-src/include/freetype/ftgzip.h | 2 +- .../freetype-src/include/freetype/ftimage.h | 4 +- .../freetype-src/include/freetype/ftincrem.h | 2 +- .../freetype-src/include/freetype/ftlcdfil.h | 37 +- .../freetype-src/include/freetype/ftlist.h | 2 +- .../freetype-src/include/freetype/ftlzw.h | 2 +- .../freetype-src/include/freetype/ftmac.h | 2 +- .../freetype2/freetype-src/include/freetype/ftmm.h | 145 +-- .../freetype-src/include/freetype/ftmodapi.h | 49 +- .../freetype-src/include/freetype/ftmoderr.h | 2 +- .../freetype-src/include/freetype/ftotval.h | 2 +- .../freetype-src/include/freetype/ftoutln.h | 2 +- .../freetype-src/include/freetype/ftpcfdrv.h | 105 ++ .../freetype-src/include/freetype/ftpfr.h | 2 +- .../freetype-src/include/freetype/ftrender.h | 2 +- .../freetype-src/include/freetype/ftsizes.h | 2 +- .../freetype-src/include/freetype/ftsnames.h | 147 ++- .../freetype-src/include/freetype/ftstroke.h | 4 +- .../freetype-src/include/freetype/ftsynth.h | 2 +- .../freetype-src/include/freetype/ftsystem.h | 2 +- .../freetype-src/include/freetype/fttrigon.h | 2 +- .../freetype-src/include/freetype/ftttdrv.h | 11 +- .../freetype-src/include/freetype/fttypes.h | 2 +- .../freetype-src/include/freetype/ftwinfnt.h | 2 +- .../include/freetype/internal/autohint.h | 2 +- .../include/freetype/internal/ftcalc.h | 2 +- .../include/freetype/internal/ftdebug.h | 2 +- .../include/freetype/internal/ftdriver.h | 2 +- .../include/freetype/internal/ftgloadr.h | 2 +- .../include/freetype/internal/ftmemory.h | 2 +- .../include/freetype/internal/ftobjs.h | 68 +- .../freetype-src/include/freetype/internal/ftpic.h | 2 +- .../include/freetype/internal/ftrfork.h | 2 +- .../include/freetype/internal/ftserv.h | 88 +- .../include/freetype/internal/ftstream.h | 4 +- .../include/freetype/internal/fttrace.h | 2 +- .../include/freetype/internal/ftvalid.h | 2 +- .../include/freetype/internal/internal.h | 2 +- .../freetype-src/include/freetype/internal/psaux.h | 4 +- .../include/freetype/internal/pshints.h | 2 +- .../include/freetype/internal/services/svbdf.h | 2 +- .../include/freetype/internal/services/svcid.h | 2 +- .../include/freetype/internal/services/svfntfmt.h | 2 +- .../include/freetype/internal/services/svgldict.h | 2 +- .../include/freetype/internal/services/svgxval.h | 2 +- .../include/freetype/internal/services/svkern.h | 2 +- .../include/freetype/internal/services/svmetric.h | 10 +- .../include/freetype/internal/services/svmm.h | 3 +- .../include/freetype/internal/services/svotval.h | 2 +- .../include/freetype/internal/services/svpfr.h | 2 +- .../include/freetype/internal/services/svpostnm.h | 2 +- .../include/freetype/internal/services/svprop.h | 2 +- .../include/freetype/internal/services/svpscmap.h | 2 +- .../include/freetype/internal/services/svpsinfo.h | 2 +- .../include/freetype/internal/services/svsfnt.h | 2 +- .../include/freetype/internal/services/svttcmap.h | 2 +- .../include/freetype/internal/services/svtteng.h | 2 +- .../include/freetype/internal/services/svttglyf.h | 2 +- .../include/freetype/internal/services/svwinfnt.h | 2 +- .../freetype-src/include/freetype/internal/sfnt.h | 42 +- .../include/freetype/internal/t1types.h | 2 +- .../include/freetype/internal/tttypes.h | 138 +-- .../freetype-src/include/freetype/t1tables.h | 6 +- .../freetype-src/include/freetype/ttnameid.h | 627 ++++++------ .../freetype-src/include/freetype/tttables.h | 363 +++---- .../freetype-src/include/freetype/tttags.h | 2 +- .../freetype-src/include/freetype/ttunpat.h | 4 +- .../libs/freetype2/freetype-src/include/ft2build.h | 2 +- 89 files changed, 2012 insertions(+), 1175 deletions(-) create mode 100644 Build/source/libs/freetype2/freetype-src/include/freetype/ftpcfdrv.h (limited to 'Build/source/libs/freetype2/freetype-src/include') diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftconfig.h b/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftconfig.h index 62b807f63ec..889aebf5ab8 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftconfig.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftconfig.h @@ -4,7 +4,7 @@ /* */ /* ANSI-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -333,6 +333,15 @@ FT_BEGIN_HEADER #endif +#ifdef _WIN64 + /* only 64bit Windows uses the LLP64 data model, i.e., */ + /* 32bit integers, 64bit pointers */ +#define FT_UINT_TO_POINTER( x ) (void*)(unsigned __int64)(x) +#else +#define FT_UINT_TO_POINTER( x ) (void*)(unsigned long)(x) +#endif + + /*************************************************************************/ /* */ /* miscellaneous */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftheader.h b/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftheader.h index 68e14834d49..d491af57c3a 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftheader.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftheader.h @@ -4,7 +4,7 @@ /* */ /* Build macros of the FreeType 2 library. */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -354,6 +354,19 @@ #define FT_TRUETYPE_DRIVER_H + /************************************************************************* + * + * @macro: + * FT_PCF_DRIVER_H + * + * @description: + * A macro used in #include statements to name the file containing + * structures and macros related to the PCF driver module. + * + */ +#define FT_PCF_DRIVER_H + + /************************************************************************* * * @macro: diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftoption.h b/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftoption.h index 90c123ef93e..1bf6e8f534f 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftoption.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftoption.h @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -82,8 +82,8 @@ FT_BEGIN_HEADER /* to control the various font drivers and modules. The controllable */ /* properties are listed in the section `Controlling FreeType Modules' */ /* in the reference's table of contents; currently there are properties */ - /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */ - /* TrueType (file `ftttdrv.h'). */ + /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */ + /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */ /* */ /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ /* multiple lines for better readability). */ @@ -640,17 +640,21 @@ FT_BEGIN_HEADER /* [1] for a technical overview on what this means. See `ttinterp.h' */ /* for more details on the LEAN option. */ /* */ - /* There are three options. */ + /* There are three possible values. */ /* */ - /* 1. This option is associated with the `Infinality' moniker. */ - /* Contributed by an individual nicknamed Infinality with the goal of */ + /* Value 1: */ + /* This value is associated with the `Infinality' moniker, */ + /* contributed by an individual nicknamed Infinality with the goal of */ /* making TrueType fonts render better than on Windows. A high */ /* amount of configurability and flexibility, down to rules for */ /* single glyphs in fonts, but also very slow. Its experimental and */ /* slow nature and the original developer losing interest meant that */ /* this option was never enabled in default builds. */ /* */ - /* 2. The new default mode for the TrueType driver. The Infinality code */ + /* The corresponding interpreter version is v38. */ + /* */ + /* Value 2: */ + /* The new default mode for the TrueType driver. The Infinality code */ /* base was stripped to the bare minimum and all configurability */ /* removed in the name of speed and simplicity. The configurability */ /* was mainly aimed at legacy fonts like Arial, Times New Roman, or */ @@ -660,14 +664,19 @@ FT_BEGIN_HEADER /* that modern and web fonts render well while legacy fonts render */ /* okay. */ /* */ - /* 3. Compile both. */ + /* The corresponding interpreter version is v40. */ + /* */ + /* Value 3: */ + /* Compile both, making both v38 and v40 available (the latter is the */ + /* default). */ /* */ /* By undefining these, you get rendering behavior like on Windows */ /* without ClearType, i.e., Windows XP without ClearType enabled and */ /* Win9x (interpreter version v35). Or not, depending on how much */ /* hinting blood and testing tears the font designer put into a given */ /* font. If you define one or both subpixel hinting options, you can */ - /* switch between between v35 and the ones you define. */ + /* switch between between v35 and the ones you define (using */ + /* `FT_Property_Set'). */ /* */ /* This option requires TT_CONFIG_OPTION_BYTECODE_INTERPRETER to be */ /* defined. */ @@ -832,6 +841,33 @@ FT_BEGIN_HEADER /* #define CFF_CONFIG_OPTION_OLD_ENGINE */ + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** P C F D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* There are many PCF fonts just called `Fixed' which look completely */ + /* different, and which have nothing to do with each other. When */ + /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */ + /* random, the style changes often if one changes the size and one */ + /* cannot select some fonts at all. This option makes the PCF module */ + /* prepend the foundry name (plus a space) to the family name. */ + /* */ + /* We also check whether we have `wide' characters; all put together, we */ + /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */ + /* */ + /* If this option is activated, it can be controlled with the */ + /* `no-long-family-names' property of the pcf driver module. */ + /* */ +/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ + + /*************************************************************************/ /*************************************************************************/ /**** ****/ @@ -850,7 +886,9 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ - /* Compile autofit module with Indic script support. */ + /* Compile autofit module with fallback Indic script support, covering */ + /* some scripts that the `latin' submodule of the autofit module doesn't */ + /* (yet) handle. */ /* */ #define AF_CONFIG_OPTION_INDIC @@ -869,6 +907,26 @@ FT_BEGIN_HEADER /* */ #define AF_CONFIG_OPTION_USE_WARPER + /*************************************************************************/ + /* */ + /* Use TrueType-like size metrics for `light' auto-hinting. */ + /* */ + /* It is strongly recommended to avoid this option, which exists only to */ + /* help some legacy applications retain its appearance and behaviour */ + /* with respect to auto-hinted TrueType fonts. */ + /* */ + /* The very reason this option exists at all are GNU/Linux distributions */ + /* like Fedora that did not un-patch the following change (which was */ + /* present in FreeType between versions 2.4.6 and 2.7.1, inclusive). */ + /* */ + /* 2011-07-16 Steven Chu */ + /* */ + /* [truetype] Fix metrics on size request for scalable fonts. */ + /* */ + /* This problematic commit is now reverted (more or less). */ + /* */ +/* #define AF_CONFIG_OPTION_TT_SIZE_METRICS */ + /* */ @@ -886,6 +944,7 @@ FT_BEGIN_HEADER #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #define TT_USE_BYTECODE_INTERPRETER +#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING #if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 1 #define TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY #endif @@ -893,6 +952,7 @@ FT_BEGIN_HEADER #if TT_CONFIG_OPTION_SUBPIXEL_HINTING & 2 #define TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL #endif +#endif #endif diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftstdlib.h b/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftstdlib.h index 6eefa9f86df..05a4845fd54 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftstdlib.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/config/ftstdlib.h @@ -5,7 +5,7 @@ /* ANSI-specific library and header configuration file (specification */ /* only). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/freetype.h b/Build/source/libs/freetype2/freetype-src/include/freetype/freetype.h index 08f59520c48..2989fbb5e14 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/freetype.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/freetype.h @@ -4,7 +4,7 @@ /* */ /* FreeType high-level API and common types (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -175,6 +175,7 @@ FT_BEGIN_HEADER /* FT_Done_Face */ /* FT_Reference_Face */ /* FT_New_Memory_Face */ + /* FT_Face_Properties */ /* FT_Open_Face */ /* FT_Open_Args */ /* FT_Parameter */ @@ -265,8 +266,8 @@ FT_BEGIN_HEADER /* FT_Glyph_Metrics */ /* */ /* */ - /* A structure used to model the metrics of a single glyph. The */ - /* values are expressed in 26.6 fractional pixel format; if the flag */ + /* A structure to model the metrics of a single glyph. The values */ + /* are expressed in 26.6 fractional pixel format; if the flag */ /* @FT_LOAD_NO_SCALE has been used while loading the glyph, values */ /* are expressed in font units instead. */ /* */ @@ -305,6 +306,11 @@ FT_BEGIN_HEADER /* `horiAdvance' or `vertAdvance'; you have to manually adjust these */ /* values to account for the added width and height. */ /* */ + /* FreeType doesn't use the `VORG' table data for CFF fonts because */ + /* it doesn't have an interface to quickly retrieve the glyph height. */ + /* The y~coordinate of the vertical origin can be simply computed as */ + /* `vertBearingY + height' after loading a glyph. */ + /* */ typedef struct FT_Glyph_Metrics_ { FT_Pos width; @@ -349,10 +355,10 @@ FT_BEGIN_HEADER /* */ /* */ /* Windows FNT: */ - /* The nominal size given in a FNT font is not reliable. Thus when */ - /* the driver finds it incorrect, it sets `size' to some calculated */ - /* values and sets `x_ppem' and `y_ppem' to the pixel width and */ - /* height given in the font, respectively. */ + /* The nominal size given in a FNT font is not reliable. If the */ + /* driver finds it incorrect, it sets `size' to some calculated */ + /* values, and `x_ppem' and `y_ppem' to the pixel width and height */ + /* given in the font, respectively. */ /* */ /* TrueType embedded bitmaps: */ /* `size', `width', and `height' values are not contained in the */ @@ -421,9 +427,9 @@ FT_BEGIN_HEADER /* FT_Module */ /* */ /* */ - /* A handle to a given FreeType module object. Each module can be a */ + /* A handle to a given FreeType module object. A module can be a */ /* font driver, a renderer, or anything else that provides services */ - /* to the formers. */ + /* to the former. */ /* */ typedef struct FT_ModuleRec_* FT_Module; @@ -434,8 +440,8 @@ FT_BEGIN_HEADER /* FT_Driver */ /* */ /* */ - /* A handle to a given FreeType font driver object. Each font driver */ - /* is a special module capable of creating faces from font files. */ + /* A handle to a given FreeType font driver object. A font driver */ + /* is a module capable of creating faces from font files. */ /* */ typedef struct FT_DriverRec_* FT_Driver; @@ -446,10 +452,10 @@ FT_BEGIN_HEADER /* FT_Renderer */ /* */ /* */ - /* A handle to a given FreeType renderer. A renderer is a special */ - /* module in charge of converting a glyph image to a bitmap, when */ - /* necessary. Each renderer supports a given glyph image format, and */ - /* one or more target surface depths. */ + /* A handle to a given FreeType renderer. A renderer is a module in */ + /* charge of converting a glyph's outline image to a bitmap. It */ + /* supports a single glyph image format, and one or more target */ + /* surface depths. */ /* */ typedef struct FT_RendererRec_* FT_Renderer; @@ -467,15 +473,15 @@ FT_BEGIN_HEADER /* FT_Face */ /* */ /* */ - /* A handle to a given typographic face object. A face object models */ - /* a given typeface, in a given style. */ + /* A handle to a typographic face object. A face object models a */ + /* given typeface, in a given style. */ /* */ /* */ - /* Each face object also owns a single @FT_GlyphSlot object, as well */ + /* A face object also owns a single @FT_GlyphSlot object, as well */ /* as one or more @FT_Size objects. */ /* */ /* Use @FT_New_Face or @FT_Open_Face to create a new face object from */ - /* a given filepathname or a custom input stream. */ + /* a given filepath or a custom input stream. */ /* */ /* Use @FT_Done_Face to destroy it (along with its slot and sizes). */ /* */ @@ -500,11 +506,11 @@ FT_BEGIN_HEADER /* FT_Size */ /* */ /* */ - /* A handle to an object used to model a face scaled to a given */ + /* A handle to an object that models a face scaled to a given */ /* character size. */ /* */ /* */ - /* Each @FT_Face has an _active_ @FT_Size object that is used by */ + /* An @FT_Face has one _active_ @FT_Size object that is used by */ /* functions like @FT_Load_Glyph to determine the scaling */ /* transformation that in turn is used to load and hint glyphs and */ /* metrics. */ @@ -531,9 +537,8 @@ FT_BEGIN_HEADER /* FT_GlyphSlot */ /* */ /* */ - /* A handle to a given `glyph slot'. A slot is a container where it */ - /* is possible to load any of the glyphs contained in its parent */ - /* face. */ + /* A handle to a given `glyph slot'. A slot is a container that can */ + /* hold any of the glyphs contained in its parent face. */ /* */ /* In other words, each time you call @FT_Load_Glyph or */ /* @FT_Load_Char, the slot's content is erased by the new glyph data, */ @@ -552,13 +557,14 @@ FT_BEGIN_HEADER /* FT_CharMap */ /* */ /* */ - /* A handle to a given character map. A charmap is used to translate */ - /* character codes in a given encoding into glyph indexes for its */ - /* parent's face. Some font formats may provide several charmaps per */ - /* font. */ + /* A handle to a character map (usually abbreviated to `charmap'). A */ + /* charmap is used to translate character codes in a given encoding */ + /* into glyph indexes for its parent's face. Some font formats may */ + /* provide several charmaps per font. */ /* */ /* Each face object owns zero or more charmaps, but only one of them */ - /* can be `active' and used by @FT_Get_Char_Index or @FT_Load_Char. */ + /* can be `active', providing the data used by @FT_Get_Char_Index or */ + /* @FT_Load_Char. */ /* */ /* The list of available charmaps in a face is available through the */ /* `face->num_charmaps' and `face->charmaps' fields of @FT_FaceRec. */ @@ -615,8 +621,8 @@ FT_BEGIN_HEADER /* FT_Encoding */ /* */ /* */ - /* An enumeration used to specify character sets supported by */ - /* charmaps. Used in the @FT_Select_Charmap API function. */ + /* An enumeration to specify character sets supported by charmaps. */ + /* Used in the @FT_Select_Charmap API function. */ /* */ /* */ /* Despite the name, this enumeration lists specific character */ @@ -630,18 +636,17 @@ FT_BEGIN_HEADER /* The encoding value~0 is reserved. */ /* */ /* FT_ENCODING_UNICODE :: */ - /* Corresponds to the Unicode character set. This value covers */ - /* all versions of the Unicode repertoire, including ASCII and */ - /* Latin-1. Most fonts include a Unicode charmap, but not all */ - /* of them. */ + /* The Unicode character set. This value covers all versions of */ + /* the Unicode repertoire, including ASCII and Latin-1. Most fonts */ + /* include a Unicode charmap, but not all of them. */ /* */ /* For example, if you want to access Unicode value U+1F028 (and */ /* the font contains it), use value 0x1F028 as the input value for */ /* @FT_Get_Char_Index. */ /* */ /* FT_ENCODING_MS_SYMBOL :: */ - /* Corresponds to the Microsoft Symbol encoding, used to encode */ - /* mathematical symbols and wingdings. For more information, see */ + /* Microsoft Symbol encoding, used to encode mathematical symbols */ + /* and wingdings. For more information, see */ /* `http://www.microsoft.com/typography/otspec/recom.htm', */ /* `http://www.kostis.net/charsets/symbol.htm', and */ /* `http://www.kostis.net/charsets/wingding.htm'. */ @@ -650,60 +655,60 @@ FT_BEGIN_HEADER /* Area) in the range U+F020-U+F0FF. */ /* */ /* FT_ENCODING_SJIS :: */ - /* Corresponds to Japanese SJIS encoding. More info at */ - /* `http://en.wikipedia.org/wiki/Shift_JIS'. */ - /* See note on multi-byte encodings below. */ + /* Shift JIS encoding for Japanese. More info at */ + /* `http://en.wikipedia.org/wiki/Shift_JIS'. See note on */ + /* multi-byte encodings below. */ /* */ - /* FT_ENCODING_GB2312 :: */ - /* Corresponds to an encoding system for Simplified Chinese as */ - /* used in mainland China. */ + /* FT_ENCODING_PRC :: */ + /* Corresponds to encoding systems mainly for Simplified Chinese as */ + /* used in People's Republic of China (PRC). The encoding layout */ + /* is based on GB~2312 and its supersets GBK and GB~18030. */ /* */ /* FT_ENCODING_BIG5 :: */ /* Corresponds to an encoding system for Traditional Chinese as */ /* used in Taiwan and Hong Kong. */ /* */ /* FT_ENCODING_WANSUNG :: */ - /* Corresponds to the Korean encoding system known as Wansung. */ + /* Corresponds to the Korean encoding system known as Extended */ + /* Wansung (MS Windows code page 949). */ /* For more information see */ - /* `https://msdn.microsoft.com/en-US/goglobal/cc305154'. */ + /* `http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'. */ /* */ /* FT_ENCODING_JOHAB :: */ /* The Korean standard character set (KS~C 5601-1992), which */ /* corresponds to MS Windows code page 1361. This character set */ - /* includes all possible Hangeul character combinations. */ + /* includes all possible Hangul character combinations. */ /* */ /* FT_ENCODING_ADOBE_LATIN_1 :: */ /* Corresponds to a Latin-1 encoding as defined in a Type~1 */ /* PostScript font. It is limited to 256 character codes. */ /* */ /* FT_ENCODING_ADOBE_STANDARD :: */ - /* Corresponds to the Adobe Standard encoding, as found in Type~1, */ - /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ - /* codes. */ + /* Adobe Standard encoding, as found in Type~1, CFF, and */ + /* OpenType/CFF fonts. It is limited to 256 character codes. */ /* */ /* FT_ENCODING_ADOBE_EXPERT :: */ - /* Corresponds to the Adobe Expert encoding, as found in Type~1, */ - /* CFF, and OpenType/CFF fonts. It is limited to 256 character */ - /* codes. */ + /* Adobe Expert encoding, as found in Type~1, CFF, and OpenType/CFF */ + /* fonts. It is limited to 256 character codes. */ /* */ /* FT_ENCODING_ADOBE_CUSTOM :: */ /* Corresponds to a custom encoding, as found in Type~1, CFF, and */ /* OpenType/CFF fonts. It is limited to 256 character codes. */ /* */ /* FT_ENCODING_APPLE_ROMAN :: */ - /* Corresponds to the 8-bit Apple roman encoding. Many TrueType */ - /* and OpenType fonts contain a charmap for this encoding, since */ - /* older versions of Mac OS are able to use it. */ + /* Apple roman encoding. Many TrueType and OpenType fonts contain */ + /* a charmap for this 8-bit encoding, since older versions of Mac */ + /* OS are able to use it. */ /* */ /* FT_ENCODING_OLD_LATIN_2 :: */ - /* This value is deprecated and was never used nor reported by */ + /* This value is deprecated and was neither used nor reported by */ /* FreeType. Don't use or test for it. */ /* */ /* FT_ENCODING_MS_SJIS :: */ /* Same as FT_ENCODING_SJIS. Deprecated. */ /* */ /* FT_ENCODING_MS_GB2312 :: */ - /* Same as FT_ENCODING_GB2312. Deprecated. */ + /* Same as FT_ENCODING_PRC. Deprecated. */ /* */ /* FT_ENCODING_MS_BIG5 :: */ /* Same as FT_ENCODING_BIG5. Deprecated. */ @@ -716,7 +721,7 @@ FT_BEGIN_HEADER /* */ /* */ /* By default, FreeType automatically synthesizes a Unicode charmap */ - /* for PostScript fonts, using their glyph names dictionaries. */ + /* for PostScript fonts, using their glyph name dictionaries. */ /* However, it also reports the encodings defined explicitly in the */ /* font file, for the cases when they are needed, with the Adobe */ /* values as well. */ @@ -736,7 +741,7 @@ FT_BEGIN_HEADER /* Russian). */ /* */ /* FT_ENCODING_NONE is set if `platform_id' is @TT_PLATFORM_MACINTOSH */ - /* and `encoding_id' is not @TT_MAC_ID_ROMAN (otherwise it is set to */ + /* and `encoding_id' is not `TT_MAC_ID_ROMAN' (otherwise it is set to */ /* FT_ENCODING_APPLE_ROMAN). */ /* */ /* If `platform_id' is @TT_PLATFORM_MACINTOSH, use the function */ @@ -748,9 +753,9 @@ FT_BEGIN_HEADER /* to get an idea how to do that. Basically, if the language ID */ /* is~0, don't use it, otherwise subtract 1 from the language ID. */ /* Then examine `encoding_id'. If, for example, `encoding_id' is */ - /* @TT_MAC_ID_ROMAN and the language ID (minus~1) is */ + /* `TT_MAC_ID_ROMAN' and the language ID (minus~1) is */ /* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */ - /* @TT_MAC_ID_ARABIC with `TT_MAC_LANGID_FARSI' means the Farsi */ + /* `TT_MAC_ID_ARABIC' with `TT_MAC_LANGID_FARSI' means the Farsi */ /* variant the Arabic encoding. */ /* */ typedef enum FT_Encoding_ @@ -761,14 +766,15 @@ FT_BEGIN_HEADER FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ), FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ), - FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ), + FT_ENC_TAG( FT_ENCODING_PRC, 'g', 'b', ' ', ' ' ), FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ), FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ), FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ), - /* for backwards compatibility */ + /* for backward compatibility */ + FT_ENCODING_GB2312 = FT_ENCODING_PRC, FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS, - FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312, + FT_ENCODING_MS_GB2312 = FT_ENCODING_PRC, FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5, FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG, FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB, @@ -793,7 +799,7 @@ FT_BEGIN_HEADER #define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1 #define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2 #define ft_encoding_sjis FT_ENCODING_SJIS -#define ft_encoding_gb2312 FT_ENCODING_GB2312 +#define ft_encoding_gb2312 FT_ENCODING_PRC #define ft_encoding_big5 FT_ENCODING_BIG5 #define ft_encoding_wansung FT_ENCODING_WANSUNG #define ft_encoding_johab FT_ENCODING_JOHAB @@ -820,11 +826,11 @@ FT_BEGIN_HEADER /* */ /* platform_id :: An ID number describing the platform for the */ /* following encoding ID. This comes directly from */ - /* the TrueType specification and should be emulated */ - /* for other formats. */ + /* the TrueType specification and gets emulated for */ + /* other formats. */ /* */ /* encoding_id :: A platform specific encoding number. This also */ - /* comes from the TrueType specification and should be */ + /* comes from the TrueType specification and gets */ /* emulated similarly. */ /* */ typedef struct FT_CharMapRec_ @@ -852,8 +858,8 @@ FT_BEGIN_HEADER /* FT_Face_Internal */ /* */ /* */ - /* An opaque handle to an `FT_Face_InternalRec' structure, used to */ - /* model private data of a given @FT_Face object. */ + /* An opaque handle to an `FT_Face_InternalRec' structure that models */ + /* the private data of a given @FT_Face object. */ /* */ /* This structure might change between releases of FreeType~2 and is */ /* not generally available to client applications. */ @@ -873,7 +879,7 @@ FT_BEGIN_HEADER /* */ /* num_faces :: The number of faces in the font file. Some */ /* font formats can have multiple faces in */ - /* a font file. */ + /* a single font file. */ /* */ /* face_index :: This field holds two different values. */ /* Bits 0-15 are the index of the face in the */ @@ -881,14 +887,15 @@ FT_BEGIN_HEADER /* 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. */ + /* Bits 16-30 are relevant to GX and OpenType */ + /* variation fonts only, holding the named */ + /* instance index for the current face index */ + /* (starting with value~1; value~0 indicates */ + /* font access without a named instance). For */ + /* non-variation 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). */ @@ -902,17 +909,21 @@ FT_BEGIN_HEADER /* @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). */ + /* GX or OpenType variation (sub)font. Bit 31 */ + /* is always zero (this is, `style_flags' is */ + /* always a positive value). Note that a */ + /* variation font has always at least one */ + /* named instance, namely the default */ + /* instance. */ /* */ /* num_glyphs :: The number of glyphs in the face. If the */ /* face is scalable and has sbits (see */ /* `num_fixed_sizes'), it is set to the number */ /* of outline glyphs. */ /* */ - /* For CID-keyed fonts, this value gives the */ - /* highest CID used in the font. */ + /* For CID-keyed fonts (not in an SFNT */ + /* wrapper) this value gives the highest CID */ + /* used in the font. */ /* */ /* family_name :: The face's family name. This is an ASCII */ /* string, usually in English, that describes */ @@ -990,8 +1001,8 @@ FT_BEGIN_HEADER /* expressed in font units. For font formats */ /* not having this information, it is set to */ /* `bbox.yMin'. Note that this field is */ - /* usually negative. Only relevant for */ - /* scalable formats. */ + /* negative for values below the baseline. */ + /* Only relevant for scalable formats. */ /* */ /* height :: This value is the vertical distance */ /* between two consecutive baselines, */ @@ -1034,6 +1045,12 @@ FT_BEGIN_HEADER /* Fields may be changed after a call to @FT_Attach_File or */ /* @FT_Attach_Stream. */ /* */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `ascender', */ + /* `descender', `height', `underline_position', and */ + /* `underline_thickness'. */ + /* */ typedef struct FT_FaceRec_ { FT_Long num_faces; @@ -1105,49 +1122,51 @@ FT_BEGIN_HEADER /* */ /* */ /* FT_FACE_FLAG_SCALABLE :: */ - /* Indicates that the face contains outline glyphs. This doesn't */ - /* prevent bitmap strikes, i.e., a face can have both this and */ + /* The face contains outline glyphs. Note that a face can contain */ + /* bitmap strikes also, i.e., a face can have both this flag and */ /* @FT_FACE_FLAG_FIXED_SIZES set. */ /* */ /* FT_FACE_FLAG_FIXED_SIZES :: */ - /* Indicates that the face contains bitmap strikes. See also the */ + /* The face contains bitmap strikes. See also the */ /* `num_fixed_sizes' and `available_sizes' fields of @FT_FaceRec. */ /* */ /* FT_FACE_FLAG_FIXED_WIDTH :: */ - /* Indicates that the face contains fixed-width characters (like */ - /* Courier, Lucido, MonoType, etc.). */ + /* The face contains fixed-width characters (like Courier, Lucida, */ + /* MonoType, etc.). */ /* */ /* FT_FACE_FLAG_SFNT :: */ - /* Indicates that the face uses the `sfnt' storage scheme. For */ - /* now, this means TrueType and OpenType. */ + /* The face uses the SFNT storage scheme. For now, this means */ + /* TrueType and OpenType. */ /* */ /* FT_FACE_FLAG_HORIZONTAL :: */ - /* Indicates that the face contains horizontal glyph metrics. This */ - /* should be set for all common formats. */ + /* The face contains horizontal glyph metrics. This should be set */ + /* for all common formats. */ /* */ /* FT_FACE_FLAG_VERTICAL :: */ - /* Indicates that the face contains vertical glyph metrics. This */ - /* is only available in some formats, not all of them. */ + /* The face contains vertical glyph metrics. This is only */ + /* available in some formats, not all of them. */ /* */ /* FT_FACE_FLAG_KERNING :: */ - /* Indicates that the face contains kerning information. If set, */ - /* the kerning distance can be retrieved through the function */ - /* @FT_Get_Kerning. Otherwise the function always return the */ - /* vector (0,0). Note that FreeType doesn't handle kerning data */ - /* from the `GPOS' table (as present in some OpenType fonts). */ + /* The face contains kerning information. If set, the kerning */ + /* distance can be retrieved using the function @FT_Get_Kerning. */ + /* Otherwise the function always return the vector (0,0). Note */ + /* that FreeType doesn't handle kerning data from the SFNT `GPOS' */ + /* table (as present in many OpenType fonts). */ /* */ /* FT_FACE_FLAG_FAST_GLYPHS :: */ /* THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT. */ /* */ /* FT_FACE_FLAG_MULTIPLE_MASTERS :: */ - /* Indicates that the font contains multiple masters and is capable */ - /* of interpolating between them. See the multiple-masters */ - /* specific API for details. */ + /* The face contains multiple masters and is capable of */ + /* interpolating between them. Supported formats are Adobe MM, */ + /* TrueType GX, and OpenType variation fonts. */ + /* */ + /* See the multiple-masters specific API for details. */ /* */ /* FT_FACE_FLAG_GLYPH_NAMES :: */ - /* Indicates that the font contains glyph names that can be */ - /* retrieved through @FT_Get_Glyph_Name. Note that some TrueType */ - /* fonts contain broken glyph name tables. Use the function */ + /* The face contains glyph names, which can be retrieved using */ + /* @FT_Get_Glyph_Name. Note that some TrueType fonts contain */ + /* broken glyph name tables. Use the function */ /* @FT_Has_PS_Glyph_Names when needed. */ /* */ /* FT_FACE_FLAG_EXTERNAL_STREAM :: */ @@ -1156,31 +1175,31 @@ FT_BEGIN_HEADER /* when @FT_Done_Face is called. Don't read or test this flag. */ /* */ /* FT_FACE_FLAG_HINTER :: */ - /* Set if the font driver has a hinting machine of its own. For */ - /* example, with TrueType fonts, it makes sense to use data from */ - /* the SFNT `gasp' table only if the native TrueType hinting engine */ - /* (with the bytecode interpreter) is available and active. */ + /* The font driver has a hinting machine of its own. For example, */ + /* with TrueType fonts, it makes sense to use data from the SFNT */ + /* `gasp' table only if the native TrueType hinting engine (with */ + /* the bytecode interpreter) is available and active. */ /* */ /* FT_FACE_FLAG_CID_KEYED :: */ - /* Set if the font is CID-keyed. In that case, the font is not */ - /* accessed by glyph indices but by CID values. For subsetted */ - /* CID-keyed fonts this has the consequence that not all index */ - /* values are a valid argument to FT_Load_Glyph. Only the CID */ - /* values for which corresponding glyphs in the subsetted font */ - /* exist make FT_Load_Glyph return successfully; in all other cases */ - /* you get an `FT_Err_Invalid_Argument' error. */ - /* */ - /* Note that CID-keyed fonts that are in an SFNT wrapper don't */ - /* have this flag set since the glyphs are accessed in the normal */ - /* way (using contiguous indices); the `CID-ness' isn't visible to */ - /* the application. */ + /* The face is CID-keyed. In that case, the face is not accessed */ + /* by glyph indices but by CID values. For subsetted CID-keyed */ + /* fonts this has the consequence that not all index values are a */ + /* valid argument to @FT_Load_Glyph. Only the CID values for which */ + /* corresponding glyphs in the subsetted font exist make */ + /* `FT_Load_Glyph' return successfully; in all other cases you get */ + /* an `FT_Err_Invalid_Argument' error. */ + /* */ + /* Note that CID-keyed fonts that are in an SFNT wrapper (this is, */ + /* all OpenType/CFF fonts) don't have this flag set since the */ + /* glyphs are accessed in the normal way (using contiguous */ + /* indices); the `CID-ness' isn't visible to the application. */ /* */ /* FT_FACE_FLAG_TRICKY :: */ - /* Set if the font is `tricky', this is, it always needs the */ - /* font format's native hinting engine to get a reasonable result. */ - /* A typical example is the Chinese font `mingli.ttf' that uses */ - /* TrueType bytecode instructions to move and scale all of its */ - /* subglyphs. */ + /* The face is `tricky', this is, it always needs the font format's */ + /* native hinting engine to get a reasonable result. A typical */ + /* example is the old Chinese font `mingli.ttf' (but not */ + /* `mingliu.ttc') that uses TrueType bytecode instructions to move */ + /* and scale all of its subglyphs. */ /* */ /* It is not possible to auto-hint such fonts using */ /* @FT_LOAD_FORCE_AUTOHINT; it will also ignore */ @@ -1192,8 +1211,8 @@ FT_BEGIN_HEADER /* tricky fonts; they are hard-coded in file `ttobjs.c'. */ /* */ /* FT_FACE_FLAG_COLOR :: */ - /* Set if the font has color glyph tables. To access color glyphs */ - /* use @FT_LOAD_COLOR. */ + /* The face has color glyph tables. To access color glyphs use */ + /* @FT_LOAD_COLOR. */ /* */ #define FT_FACE_FLAG_SCALABLE ( 1L << 0 ) #define FT_FACE_FLAG_FIXED_SIZES ( 1L << 1 ) @@ -1265,7 +1284,7 @@ FT_BEGIN_HEADER * @description: * A macro that returns true whenever a face object contains a scalable * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, - * and PFR font formats. + * and PFR font formats). * */ #define FT_IS_SCALABLE( face ) \ @@ -1369,7 +1388,7 @@ FT_BEGIN_HEADER * * @description: * A macro that returns true whenever a face object is a named instance - * of a GX variation font. + * of a GX or OpenType variation font. * */ #define FT_IS_NAMED_INSTANCE( face ) \ @@ -1428,15 +1447,15 @@ FT_BEGIN_HEADER /* FT_STYLE_FLAG_XXX */ /* */ /* */ - /* 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. */ + /* A list of bit flags to indicate the style of a given face. These */ + /* are used in the `style_flags' field of @FT_FaceRec. */ /* */ /* */ /* FT_STYLE_FLAG_ITALIC :: */ - /* Indicates that a given face style is italic or oblique. */ + /* The face style is italic or oblique. */ /* */ /* FT_STYLE_FLAG_BOLD :: */ - /* Indicates that a given face is bold. */ + /* The face is bold. */ /* */ /* */ /* The style information as provided by FreeType is very basic. More */ @@ -1477,43 +1496,50 @@ FT_BEGIN_HEADER /* hence the term `ppem' (pixels per EM). It is also */ /* referred to as `nominal height'. */ /* */ - /* x_scale :: A 16.16 fractional scaling value used to convert */ + /* x_scale :: A 16.16 fractional scaling value to convert */ /* horizontal metrics from font units to 26.6 */ /* fractional pixels. Only relevant for scalable */ /* font formats. */ /* */ - /* y_scale :: A 16.16 fractional scaling value used to convert */ + /* y_scale :: A 16.16 fractional scaling value to convert */ /* vertical metrics from font units to 26.6 */ /* fractional pixels. Only relevant for scalable */ /* font formats. */ /* */ - /* ascender :: The ascender in 26.6 fractional pixels. See */ - /* @FT_FaceRec for the details. */ + /* ascender :: The ascender in 26.6 fractional pixels, rounded up */ + /* to an integer value. See @FT_FaceRec for the */ + /* details. */ /* */ - /* descender :: The descender in 26.6 fractional pixels. See */ - /* @FT_FaceRec for the details. */ + /* descender :: The descender in 26.6 fractional pixels, rounded */ + /* down to an integer value. See @FT_FaceRec for the */ + /* details. */ /* */ - /* height :: The height in 26.6 fractional pixels. See */ - /* @FT_FaceRec for the details. */ + /* height :: The height in 26.6 fractional pixels, rounded to */ + /* an integer value. See @FT_FaceRec for the */ + /* details. */ /* */ /* max_advance :: The maximum advance width in 26.6 fractional */ - /* pixels. See @FT_FaceRec for the details. */ + /* pixels, rounded to an integer value. See */ + /* @FT_FaceRec for the details. */ /* */ /* */ /* The scaling values, if relevant, are determined first during a */ /* size changing operation. The remaining fields are then set by the */ /* driver. For scalable formats, they are usually set to scaled */ - /* values of the corresponding fields in @FT_FaceRec. */ + /* values of the corresponding fields in @FT_FaceRec. Some values */ + /* like ascender or descender are rounded for historical reasons; */ + /* more precise values (for outline fonts) can be derived by scaling */ + /* the corresponding @FT_FaceRec values manually. */ /* */ - /* Note that due to glyph hinting, these values might not be exact */ - /* for certain fonts. Thus they must be treated as unreliable */ - /* with an error margin of at least one pixel! */ + /* Note that due to glyph hinting and the selected rendering mode */ + /* these values are usually not exact; consequently, they must be */ + /* treated as unreliable with an error margin of at least one pixel! */ /* */ /* Indeed, the only way to get the exact metrics is to render _all_ */ /* glyphs. As this would be a definite performance hit, it is up to */ /* client applications to perform such computations. */ /* */ - /* The FT_Size_Metrics structure is valid for bitmap fonts also. */ + /* The `FT_Size_Metrics' structure is valid for bitmap fonts also. */ /* */ typedef struct FT_Size_Metrics_ { @@ -1653,8 +1679,8 @@ FT_BEGIN_HEADER /* contained in the glyph slot. Typically */ /* @FT_GLYPH_FORMAT_BITMAP, */ /* @FT_GLYPH_FORMAT_OUTLINE, or */ - /* @FT_GLYPH_FORMAT_COMPOSITE, but others are */ - /* possible. */ + /* @FT_GLYPH_FORMAT_COMPOSITE, but other values */ + /* are possible. */ /* */ /* bitmap :: This field is used as a bitmap descriptor */ /* when the slot format is */ @@ -1669,16 +1695,15 @@ FT_BEGIN_HEADER /* glyph slot contains a bitmap. */ /* */ /* bitmap_top :: The bitmap's top bearing expressed in integer */ - /* pixels. Remember that this is the distance */ - /* from the baseline to the top-most glyph */ - /* scanline, upwards y~coordinates being */ - /* *positive*. */ + /* pixels. This is the distance from the */ + /* baseline to the top-most glyph scanline, */ + /* upwards y~coordinates being *positive*. */ /* */ /* outline :: The outline descriptor for the current glyph */ /* image if its format is */ /* @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is */ /* loaded, `outline' can be transformed, */ - /* distorted, embolded, etc. However, it must */ + /* distorted, emboldened, etc. However, it must */ /* not be freed. */ /* */ /* num_subglyphs :: The number of subglyphs in a composite glyph. */ @@ -1694,15 +1719,13 @@ FT_BEGIN_HEADER /* control_data :: Certain font drivers can also return the */ /* control data for a given glyph image (e.g. */ /* TrueType bytecode, Type~1 charstrings, etc.). */ - /* This field is a pointer to such data. */ + /* This field is a pointer to such data; it is */ + /* currently internal to FreeType. */ /* */ /* control_len :: This is the length in bytes of the control */ - /* data. */ + /* data. Currently internal to FreeType. */ /* */ - /* other :: Really wicked formats can use this pointer to */ - /* present their own glyph image to client */ - /* applications. Note that the application */ - /* needs to know about the image format. */ + /* other :: Reserved. */ /* */ /* lsb_delta :: The difference between hinted and unhinted */ /* left side bearing while auto-hinting is */ @@ -1719,7 +1742,7 @@ FT_BEGIN_HEADER /* formats). */ /* */ /* This image can later be converted into a bitmap by calling */ - /* @FT_Render_Glyph. This function finds the current renderer for */ + /* @FT_Render_Glyph. This function searches the current renderer for */ /* the native image's format, then invokes it. */ /* */ /* The renderer is in charge of transforming the native image through */ @@ -1732,29 +1755,55 @@ FT_BEGIN_HEADER /* `slot->format' is also changed to @FT_GLYPH_FORMAT_BITMAP. */ /* */ /* Here is a small pseudo code fragment that shows how to use */ - /* `lsb_delta' and `rsb_delta': */ + /* `lsb_delta' and `rsb_delta' to do fractional positioning of */ + /* glyphs: */ + /* */ + /* { */ + /* FT_GlyphSlot slot = face->glyph; */ + /* FT_Pos origin_x = 0; */ + /* */ + /* */ + /* for all glyphs do */ + /* */ + /* */ + /* FT_Outline_Translate( slot->outline, origin_x & 63, 0 ); */ + /* */ + /* */ + /* */ + /* */ + /* */ + /* origin_x += slot->advance.x; */ + /* origin_x += slot->rsb_delta - slot->lsb_relta; */ + /* endfor */ + /* } */ + /* */ + /* Here is another small pseudo code fragment that shows how to use */ + /* `lsb_delta' and `rsb_delta' to improve integer positioning of */ + /* glyphs: */ /* */ /* { */ - /* FT_Pos origin_x = 0; */ - /* FT_Pos prev_rsb_delta = 0; */ + /* FT_GlyphSlot slot = face->glyph; */ + /* FT_Pos origin_x = 0; */ + /* FT_Pos prev_rsb_delta = 0; */ /* */ /* */ /* for all glyphs do */ - /* */ + /* */ /* */ /* */ /* */ - /* if ( prev_rsb_delta - face->glyph->lsb_delta >= 32 ) */ + /* if ( prev_rsb_delta - slot->lsb_delta >= 32 ) */ /* origin_x -= 64; */ - /* else if ( prev_rsb_delta - face->glyph->lsb_delta < -32 ) */ + /* else if ( prev_rsb_delta - slot->lsb_delta < -32 ) */ /* origin_x += 64; */ /* */ - /* prev_rsb_delta = face->glyph->rsb_delta; */ + /* prev_rsb_delta = slot->rsb_delta; */ /* */ /* */ /* */ - /* origin_x += face->glyph->advance.x; */ + /* origin_x += slot->advance.x; */ /* endfor */ /* } */ /* */ @@ -1828,7 +1877,8 @@ FT_BEGIN_HEADER /* */ /* In case you want to provide your own memory allocating routines, */ /* use @FT_New_Library instead, followed by a call to */ - /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ + /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module) */ + /* and @FT_Set_Default_Properties. */ /* */ /* See the documentation of @FT_Library and @FT_Face for */ /* multi-threading issues. */ @@ -1836,6 +1886,11 @@ FT_BEGIN_HEADER /* If you need reference-counting (cf. @FT_Reference_Library), use */ /* @FT_New_Library and @FT_Done_Library. */ /* */ + /* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is */ + /* set, this function reads the `FREETYPE_PROPERTIES' environment */ + /* variable to control driver properties. See sections @auto_hinter, */ + /* @cff_driver, @pcf_driver, and @tt_driver for more. */ + /* */ FT_EXPORT( FT_Error ) FT_Init_FreeType( FT_Library *alibrary ); @@ -1906,8 +1961,8 @@ FT_BEGIN_HEADER /* FT_Parameter */ /* */ /* */ - /* A simple structure used to pass more or less generic parameters to */ - /* @FT_Open_Face. */ + /* A simple structure to pass more or less generic parameters to */ + /* @FT_Open_Face and @FT_Face_Properties. */ /* */ /* */ /* tag :: A four-byte identification tag. */ @@ -1932,9 +1987,9 @@ FT_BEGIN_HEADER /* FT_Open_Args */ /* */ /* */ - /* A structure used to indicate how to open a new font file or */ - /* stream. A pointer to such a structure can be used as a parameter */ - /* for the functions @FT_Open_Face and @FT_Attach_Stream. */ + /* A structure to indicate how to open a new font file or stream. A */ + /* pointer to such a structure can be used as a parameter for the */ + /* functions @FT_Open_Face and @FT_Attach_Stream. */ /* */ /* */ /* flags :: A set of bit flags indicating how to use the */ @@ -1949,9 +2004,10 @@ FT_BEGIN_HEADER /* stream :: A handle to a source stream object. */ /* */ /* driver :: This field is exclusively used by @FT_Open_Face; */ - /* it simply specifies the font driver to use to open */ - /* the face. If set to~0, FreeType tries to load the */ - /* face with each one of the drivers in its list. */ + /* it simply specifies the font driver to use for */ + /* opening the face. If set to NULL, FreeType tries */ + /* to load the face with each one of the drivers in */ + /* its list. */ /* */ /* num_params :: The number of extra parameters. */ /* */ @@ -1981,7 +2037,7 @@ FT_BEGIN_HEADER /* `num_params' and `params' is used. They are ignored otherwise. */ /* */ /* Ideally, both the `pathname' and `params' fields should be tagged */ - /* as `const'; this is missing for API backwards compatibility. In */ + /* as `const'; this is missing for API backward compatibility. In */ /* other words, applications should treat them as read-only. */ /* */ typedef struct FT_Open_Args_ @@ -2004,7 +2060,7 @@ FT_BEGIN_HEADER /* FT_New_Face */ /* */ /* */ - /* This function calls @FT_Open_Face to open a font by its pathname. */ + /* Call @FT_Open_Face to open a font by its pathname. */ /* */ /* */ /* library :: A handle to the library resource. */ @@ -2039,8 +2095,8 @@ FT_BEGIN_HEADER /* FT_New_Memory_Face */ /* */ /* */ - /* This function calls @FT_Open_Face to open a font that has been */ - /* loaded into memory. */ + /* Call @FT_Open_Face to open a font that has been loaded into */ + /* memory. */ /* */ /* */ /* library :: A handle to the library resource. */ @@ -2092,20 +2148,21 @@ FT_BEGIN_HEADER /* 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 */ + /* Bits 16-30 are relevant to GX and OpenType 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-variation 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 */ + /* 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 */ @@ -2114,10 +2171,10 @@ FT_BEGIN_HEADER /* `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 */ + /* the negative value `-(N+1)' (with `N' a non-negative */ + /* 16-bit value), bits 16-30 in `face->style_flags' */ + /* give the number of named instances in face `N' if we */ + /* have a variation font (or zero otherwise). After */ /* examination, the returned @FT_Face structure should */ /* be deallocated with a call to @FT_Done_Face. */ /* */ @@ -2224,7 +2281,7 @@ FT_BEGIN_HEADER /* FT_Attach_File */ /* */ /* */ - /* This function calls @FT_Attach_Stream to attach a file. */ + /* Call @FT_Attach_Stream to attach a file. */ /* */ /* */ /* face :: The target face object. */ @@ -2268,7 +2325,7 @@ FT_BEGIN_HEADER /* */ /* Client applications are expected to know what they are doing */ /* when invoking this function. Most drivers simply do not implement */ - /* file attachments. */ + /* file or stream attachments. */ /* */ FT_EXPORT( FT_Error ) FT_Attach_Stream( FT_Face face, @@ -2352,11 +2409,11 @@ FT_BEGIN_HEADER /* FreeType silently uses outlines if there is no bitmap for a given */ /* glyph index. */ /* */ - /* For GX variation fonts, a bitmap strike makes sense only if the */ - /* default instance is active (this is, no glyph variation takes */ - /* place); otherwise, FreeType simply ignores bitmap strikes. The */ - /* same is true for all named instances that are different from the */ - /* default instance. */ + /* For GX and OpenType variation fonts, a bitmap strike makes sense */ + /* only if the default instance is active (this is, no glyph */ + /* variation takes place); otherwise, FreeType simply ignores bitmap */ + /* strikes. The same is true for all named instances that are */ + /* different from the default instance. */ /* */ /* Don't use this function if you are using the FreeType cache API. */ /* */ @@ -2389,7 +2446,7 @@ FT_BEGIN_HEADER /* */ /* FT_SIZE_REQUEST_TYPE_REAL_DIM :: */ /* The real dimension. The sum of the `ascender' and (minus of) */ - /* the `descender' fields of @FT_FaceRec are used to determine both */ + /* the `descender' fields of @FT_FaceRec is used to determine both */ /* scaling values. */ /* */ /* FT_SIZE_REQUEST_TYPE_BBOX :: */ @@ -2435,7 +2492,7 @@ FT_BEGIN_HEADER /* FT_Size_RequestRec */ /* */ /* */ - /* A structure used to model a size request. */ + /* A structure to model a size request. */ /* */ /* */ /* type :: See @FT_Size_Request_Type. */ @@ -2448,14 +2505,16 @@ FT_BEGIN_HEADER /* */ /* horiResolution :: The horizontal resolution (dpi, i.e., pixels per */ /* inch). If set to zero, `width' is treated as a */ - /* 26.6 fractional *pixel* value. */ + /* 26.6 fractional *pixel* value, which gets */ + /* internally rounded to an integer. */ /* */ /* vertResolution :: The vertical resolution (dpi, i.e., pixels per */ /* inch). If set to zero, `height' is treated as a */ - /* 26.6 fractional *pixel* value. */ + /* 26.6 fractional *pixel* value, which gets */ + /* internally rounded to an integer. */ /* */ /* */ - /* If `width' is zero, then the horizontal scaling value is set equal */ + /* If `width' is zero, the horizontal scaling value is set equal */ /* to the vertical scaling value, and vice versa. */ /* */ /* If `type' is FT_SIZE_REQUEST_TYPE_SCALES, `width' and `height' are */ @@ -2512,7 +2571,11 @@ FT_BEGIN_HEADER /* size is dependent entirely on how the size is defined in the */ /* source face. The font designer chooses the final size of each */ /* glyph relative to this size. For more information refer to */ - /* `http://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html' */ + /* `https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'. */ + /* */ + /* Contrary to @FT_Set_Char_Size, this function doesn't have special */ + /* code to normalize zero-valued widths, heights, or resolutions */ + /* (which lead to errors in most cases). */ /* */ /* Don't use this function if you are using the FreeType cache API. */ /* */ @@ -2527,8 +2590,7 @@ FT_BEGIN_HEADER /* FT_Set_Char_Size */ /* */ /* */ - /* This function calls @FT_Request_Size to request the nominal size */ - /* (in points). */ + /* Call @FT_Request_Size to request the nominal size (in points). */ /* */ /* */ /* face :: A handle to a target face object. */ @@ -2546,6 +2608,10 @@ FT_BEGIN_HEADER /* FreeType error code. 0~means success. */ /* */ /* */ + /* While this function allows fractional points as input values, the */ + /* resulting ppem value for the given resolution is always rounded to */ + /* the nearest integer. */ + /* */ /* If either the character width or height is zero, it is set equal */ /* to the other value. */ /* */ @@ -2571,8 +2637,7 @@ FT_BEGIN_HEADER /* FT_Set_Pixel_Sizes */ /* */ /* */ - /* This function calls @FT_Request_Size to request the nominal size */ - /* (in pixels). */ + /* Call @FT_Request_Size to request the nominal size (in pixels). */ /* */ /* */ /* face :: A handle to the target face object. */ @@ -2586,8 +2651,8 @@ FT_BEGIN_HEADER /* FreeType error code. 0~means success. */ /* */ /* */ - /* You should not rely on the resulting glyphs matching, or being */ - /* constrained, to this pixel size. Refer to @FT_Request_Size to */ + /* You should not rely on the resulting glyphs matching or being */ + /* constrained to this pixel size. Refer to @FT_Request_Size to */ /* understand how requested sizes relate to actual sizes. */ /* */ /* Don't use this function if you are using the FreeType cache API. */ @@ -2604,8 +2669,7 @@ FT_BEGIN_HEADER /* FT_Load_Glyph */ /* */ /* */ - /* A function used to load a single glyph into the glyph slot of a */ - /* face object. */ + /* Load a glyph into the glyph slot of a face object. */ /* */ /* */ /* face :: A handle to the target face object where the glyph */ @@ -2650,8 +2714,8 @@ FT_BEGIN_HEADER /* FT_Load_Char */ /* */ /* */ - /* A function used to load a single glyph into the glyph slot of a */ - /* face object, according to its character code. */ + /* Load a glyph into the glyph slot of a face object, accessed by its */ + /* character code. */ /* */ /* */ /* face :: A handle to a target face object where the glyph */ @@ -2673,6 +2737,10 @@ FT_BEGIN_HEADER /* */ /* This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph. */ /* */ + /* Many fonts contain glyphs that can't be loaded by this function */ + /* since its glyph indices are not listed in any of the font's */ + /* charmaps. */ + /* */ FT_EXPORT( FT_Error ) FT_Load_Char( FT_Face face, FT_ULong char_code, @@ -2685,8 +2753,8 @@ FT_BEGIN_HEADER * FT_LOAD_XXX * * @description: - * A list of bit field constants used with @FT_Load_Glyph to indicate - * what kind of operations to perform during glyph loading. + * A list of bit field constants for @FT_Load_Glyph to indicate what + * kind of operations to perform during glyph loading. * * @values: * FT_LOAD_DEFAULT :: @@ -2698,13 +2766,13 @@ FT_BEGIN_HEADER * The bitmap data can be accessed from the glyph slot (see note * below). * - * 2. If no embedded bitmap is searched or found, FreeType looks for a - * scalable outline. If one is found, it is loaded from the font - * file, scaled to device pixels, then `hinted' to the pixel grid - * in order to optimize it. The outline data can be accessed from - * the glyph slot (see note below). + * 2. If no embedded bitmap is searched for or found, FreeType looks + * for a scalable outline. If one is found, it is loaded from + * the font file, scaled to device pixels, then `hinted' to the + * pixel grid in order to optimize it. The outline data can be + * accessed from the glyph slot (see note below). * - * Note that by default, the glyph loader doesn't render outlines into + * Note that by default the glyph loader doesn't render outlines into * bitmaps. The following flags are used to modify this default * behaviour to more specific and useful cases. * @@ -2751,13 +2819,13 @@ FT_BEGIN_HEADER * various font formats. * * FT_LOAD_FORCE_AUTOHINT :: - * Indicates that the auto-hinter is preferred over the font's native - * hinter. See also the note below. + * Prefer the auto-hinter over the font's native hinter. See also + * the note below. * * FT_LOAD_PEDANTIC :: - * Indicates that the font driver should perform pedantic verifications - * during glyph loading. This is mostly used to detect broken glyphs - * in fonts. By default, FreeType tries to handle broken fonts also. + * Make the font driver perform pedantic verifications during glyph + * loading. This is mostly used to detect broken glyphs in fonts. + * By default, FreeType tries to handle broken fonts also. * * In particular, errors from the TrueType bytecode engine are not * passed to the application if this flag is not set; this might @@ -2765,17 +2833,16 @@ FT_BEGIN_HEADER * bytecode is buggy. * * FT_LOAD_NO_RECURSE :: - * Indicate that the font driver should not load composite glyphs - * recursively. Instead, it should set the `num_subglyph' and - * `subglyphs' values of the glyph slot accordingly, and set - * `glyph->format' to @FT_GLYPH_FORMAT_COMPOSITE. The description of - * subglyphs can then be accessed with @FT_Get_SubGlyph_Info. + * Don't load composite glyphs recursively. Instead, the font + * driver should set the `num_subglyph' and `subglyphs' values of + * the glyph slot accordingly, and set `glyph->format' to + * @FT_GLYPH_FORMAT_COMPOSITE. The description of subglyphs can + * then be accessed with @FT_Get_SubGlyph_Info. * * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM. * * FT_LOAD_IGNORE_TRANSFORM :: - * Indicates that the transform matrix set by @FT_Set_Transform should - * be ignored. + * Ignore the transform matrix set by @FT_Set_Transform. * * FT_LOAD_MONOCHROME :: * This flag is used with @FT_LOAD_RENDER to indicate that you want to @@ -2787,36 +2854,34 @@ FT_BEGIN_HEADER * monochrome-optimized hinting algorithm is used. * * FT_LOAD_LINEAR_DESIGN :: - * Indicates that the `linearHoriAdvance' and `linearVertAdvance' - * fields of @FT_GlyphSlotRec should be kept in font units. See - * @FT_GlyphSlotRec for details. + * Keep `linearHoriAdvance' and `linearVertAdvance' fields of + * @FT_GlyphSlotRec in font units. See @FT_GlyphSlotRec for + * details. * * FT_LOAD_NO_AUTOHINT :: - * Disable auto-hinter. See also the note below. + * Disable the auto-hinter. See also the note below. * * FT_LOAD_COLOR :: - * This flag is used to request loading of color embedded-bitmap - * images. The resulting color bitmaps, if available, will have the - * @FT_PIXEL_MODE_BGRA format. When the flag is not used and color - * bitmaps are found, they will be converted to 256-level gray - * bitmaps transparently. Those bitmaps will be in the + * Load embedded color bitmap images. The resulting color bitmaps, + * if available, will have the @FT_PIXEL_MODE_BGRA format. If the + * flag is not set and color bitmaps are found, they are converted + * to 256-level gray bitmaps transparently, using 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 + * Compute glyph metrics from the glyph data, without the use of + * bundled metrics tables (for example, the `hdmx' table in TrueType + * fonts). 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_BITMAP_METRICS_ONLY :: - * This flag is used to request loading of the metrics and bitmap - * image information of a (possibly embedded) bitmap glyph without - * allocating or copying the bitmap image data itself. No effect if - * the target glyph is not a bitmap image. + * Request loading of the metrics and bitmap image information of a + * (possibly embedded) bitmap glyph without allocating or copying + * the bitmap image data itself. No effect if the target glyph is + * not a bitmap image. * * This flag unsets @FT_LOAD_RENDER. * @@ -2863,14 +2928,14 @@ FT_BEGIN_HEADER #define FT_LOAD_MONOCHROME ( 1L << 12 ) #define FT_LOAD_LINEAR_DESIGN ( 1L << 13 ) #define FT_LOAD_NO_AUTOHINT ( 1L << 15 ) - /* Bits 16..19 are used by `FT_LOAD_TARGET_' */ + /* Bits 16-19 are used by `FT_LOAD_TARGET_' */ #define FT_LOAD_COLOR ( 1L << 20 ) #define FT_LOAD_COMPUTE_METRICS ( 1L << 21 ) #define FT_LOAD_BITMAP_METRICS_ONLY ( 1L << 22 ) /* */ - /* used internally only by certain font drivers! */ + /* used internally only by certain font drivers */ #define FT_LOAD_ADVANCE_ONLY ( 1L << 8 ) #define FT_LOAD_SBITS_ONLY ( 1L << 14 ) @@ -2881,37 +2946,48 @@ FT_BEGIN_HEADER * FT_LOAD_TARGET_XXX * * @description: - * A list of values that are used to select a specific hinting algorithm - * to use by the hinter. You should OR one of these values to your - * `load_flags' when calling @FT_Load_Glyph. + * A list of values to select a specific hinting algorithm for the + * hinter. You should OR one of these values to your `load_flags' + * when calling @FT_Load_Glyph. * - * Note that font's native hinters may ignore the hinting algorithm you - * have specified (e.g., the TrueType bytecode interpreter). You can set - * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used. + * Note that a font's native hinters may ignore the hinting algorithm + * you have specified (e.g., the TrueType bytecode interpreter). You + * can set @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is + * used. * * @values: * FT_LOAD_TARGET_NORMAL :: - * This corresponds to the default hinting algorithm, optimized for - * standard gray-level rendering. For monochrome output, use - * @FT_LOAD_TARGET_MONO instead. + * The default hinting algorithm, optimized for standard gray-level + * rendering. For monochrome output, use @FT_LOAD_TARGET_MONO + * instead. * * FT_LOAD_TARGET_LIGHT :: * 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 + * (Y-axis), as is done by FreeType's new CFF engine or Microsoft's + * ClearType 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 + * driver, if the driver itself and the font support it, or by the * auto-hinter. * + * Advance widths are rounded to integer values; however, using the + * `lsb_delta' and `rsb_delta' fields of @FT_GlyphSlotRec, it is + * possible to get fractional advance widths for sub-pixel positioning + * (which is recommended to use). + * + * If configuration option AF_CONFIG_OPTION_TT_SIZE_METRICS is active, + * TrueType-like metrics are used to make this mode behave similarly + * as in unpatched FreeType versions between 2.4.6 and 2.7.1 + * (inclusive). + * * FT_LOAD_TARGET_MONO :: * Strong hinting algorithm that should only be used for monochrome * output. The result is probably unpleasant if the glyph is rendered * in non-monochrome modes. * * FT_LOAD_TARGET_LCD :: - * A variant of @FT_LOAD_TARGET_NORMAL optimized for horizontally + * A variant of @FT_LOAD_TARGET_LIGHT optimized for horizontally * decimated LCD displays. * * FT_LOAD_TARGET_LCD_V :: @@ -2939,6 +3015,13 @@ FT_BEGIN_HEADER * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD ); * } * + * In general, you should stick with one rendering mode. For example, + * switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO + * enforces a lot of recomputation for TrueType fonts, which is slow. + * Another reason is caching: Selecting a different mode usually causes + * changes in both the outlines and the rasterized bitmaps; it is thus + * necessary to empty the cache after a mode switch to avoid false hits. + * */ #define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 ) @@ -2968,18 +3051,17 @@ FT_BEGIN_HEADER /* FT_Set_Transform */ /* */ /* */ - /* A function used to set the transformation that is applied to glyph */ - /* images when they are loaded into a glyph slot through */ - /* @FT_Load_Glyph. */ + /* Set the transformation that is applied to glyph images when they */ + /* are loaded into a glyph slot through @FT_Load_Glyph. */ /* */ /* */ /* face :: A handle to the source face object. */ /* */ /* */ - /* matrix :: A pointer to the transformation's 2x2 matrix. Use~0 for */ - /* the identity matrix. */ - /* delta :: A pointer to the translation vector. Use~0 for the null */ - /* vector. */ + /* matrix :: A pointer to the transformation's 2x2 matrix. Use NULL */ + /* for the identity matrix. */ + /* delta :: A pointer to the translation vector. Use NULL for the */ + /* null vector. */ /* */ /* */ /* The transformation is only applied to scalable image formats after */ @@ -3002,9 +3084,8 @@ FT_BEGIN_HEADER /* FT_Render_Mode */ /* */ /* */ - /* An enumeration type that lists the render modes supported by */ - /* FreeType~2. Each mode corresponds to a specific type of scanline */ - /* conversion performed on the outline. */ + /* Render modes supported by FreeType~2. Each mode corresponds to a */ + /* specific type of scanline conversion performed on the outline. */ /* */ /* For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode' */ /* field in the @FT_GlyphSlotRec structure gives the format of the */ @@ -3017,8 +3098,8 @@ FT_BEGIN_HEADER /* */ /* */ /* FT_RENDER_MODE_NORMAL :: */ - /* This is the default render mode; it corresponds to 8-bit */ - /* anti-aliased bitmaps. */ + /* Default render mode; it corresponds to 8-bit anti-aliased */ + /* bitmaps. */ /* */ /* FT_RENDER_MODE_LIGHT :: */ /* This is equivalent to @FT_RENDER_MODE_NORMAL. It is only */ @@ -3043,11 +3124,11 @@ FT_BEGIN_HEADER /* glyph outline in pixels and use the @FT_PIXEL_MODE_LCD_V mode. */ /* */ /* */ - /* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph can be */ - /* filtered to reduce color-fringes by using @FT_Library_SetLcdFilter */ - /* (not active in the default builds). It is up to the caller to */ - /* either call @FT_Library_SetLcdFilter (if available) or do the */ - /* filtering itself. */ + /* The LCD-optimized glyph bitmaps produced by `FT_Render_Glyph' can */ + /* be filtered to reduce color-fringes by using */ + /* @FT_Library_SetLcdFilter (not active in the default builds). It */ + /* is up to the caller to either call `FT_Library_SetLcdFilter' (if */ + /* available) or do the filtering itself. */ /* */ /* The selected render mode only affects vector glyphs of a font. */ /* Embedded bitmaps often have a different pixel mode like */ @@ -3088,16 +3169,16 @@ FT_BEGIN_HEADER /* convert. */ /* */ /* */ - /* render_mode :: This is the render mode used to render the glyph */ - /* image into a bitmap. See @FT_Render_Mode for a */ - /* list of possible values. */ + /* render_mode :: The render mode used to render the glyph image into */ + /* a bitmap. See @FT_Render_Mode for a list of */ + /* possible values. */ /* */ /* */ /* FreeType error code. 0~means success. */ /* */ /* */ /* To get meaningful results, font scaling values must be set with */ - /* functions like @FT_Set_Char_Size before calling FT_Render_Glyph. */ + /* functions like @FT_Set_Char_Size before calling `FT_Render_Glyph'. */ /* */ /* When FreeType outputs a bitmap of a glyph, it really outputs an */ /* alpha coverage map. If a pixel is completely covered by a */ @@ -3123,7 +3204,7 @@ FT_BEGIN_HEADER /* 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 */ + /* 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 */ @@ -3187,17 +3268,15 @@ FT_BEGIN_HEADER /* FT_Kerning_Mode */ /* */ /* */ - /* An enumeration used to specify which kerning values to return in */ + /* An enumeration to specify the format of kerning values returned by */ /* @FT_Get_Kerning. */ /* */ /* */ /* FT_KERNING_DEFAULT :: Return grid-fitted kerning distances in */ - /* pixels (value is~0). Whether they are */ - /* scaled depends on @FT_LOAD_NO_SCALE. */ + /* 26.6 fractional pixels. */ /* */ /* FT_KERNING_UNFITTED :: Return un-grid-fitted kerning distances in */ - /* 26.6 fractional pixels. Whether they are */ - /* scaled depends on @FT_LOAD_NO_SCALE. */ + /* 26.6 fractional pixels. */ /* */ /* FT_KERNING_UNSCALED :: Return the kerning vector in original font */ /* units. */ @@ -3207,9 +3286,13 @@ FT_BEGIN_HEADER /* FreeType heuristically scale down kerning distances at small ppem */ /* values so that they don't become too big. */ /* */ + /* Both FT_KERNING_DEFAULT and FT_KERNING_UNFITTED use the current */ + /* horizontal scaling factor (as set e.g. with @FT_Set_Char_Size) to */ + /* convert font units to pixels. */ + /* */ typedef enum FT_Kerning_Mode_ { - FT_KERNING_DEFAULT = 0, + FT_KERNING_DEFAULT = 0, FT_KERNING_UNFITTED, FT_KERNING_UNSCALED @@ -3229,7 +3312,7 @@ FT_BEGIN_HEADER /* FT_Get_Kerning */ /* */ /* */ - /* Return the kerning vector between two glyphs of a same face. */ + /* Return the kerning vector between two glyphs of the same face. */ /* */ /* */ /* face :: A handle to a source face object. */ @@ -3257,6 +3340,10 @@ FT_BEGIN_HEADER /* kernings, are out of the scope of this API function -- they can be */ /* implemented through format-specific interfaces. */ /* */ + /* Kerning for OpenType fonts implemented in a `GPOS' table is not */ + /* supported; use @FT_HAS_KERNING to find out whether a font has data */ + /* that can be extracted with `FT_Get_Kerning'. */ + /* */ FT_EXPORT( FT_Error ) FT_Get_Kerning( FT_Face face, FT_UInt left_glyph, @@ -3296,7 +3383,7 @@ FT_BEGIN_HEADER /* @FT_Attach_Stream). */ /* */ /* Only very few AFM files come with track kerning data; please refer */ - /* to the Adobe's AFM specification for more details. */ + /* to Adobe's AFM specification for more details. */ /* */ FT_EXPORT( FT_Error ) FT_Get_Track_Kerning( FT_Face face, @@ -3358,7 +3445,7 @@ FT_BEGIN_HEADER /* */ /* */ /* Retrieve the ASCII PostScript name of a given face, if available. */ - /* This only works with PostScript and TrueType fonts. */ + /* This only works with PostScript, TrueType, and OpenType fonts. */ /* */ /* */ /* face :: A handle to the source face object. */ @@ -3370,6 +3457,13 @@ FT_BEGIN_HEADER /* The returned pointer is owned by the face and is destroyed with */ /* it. */ /* */ + /* For variation fonts, this string changes if you select a different */ + /* instance, and you have to call `FT_Get_PostScript_Name' again to */ + /* retrieve it. FreeType follows Adobe TechNote #5902, `Generating */ + /* PostScript Names for Fonts Using OpenType Font Variations'. */ + /* */ + /* http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/font/pdfs/5902.AdobePSNameGeneration.html */ + /* */ FT_EXPORT( const char* ) FT_Get_Postscript_Name( FT_Face face ); @@ -3429,7 +3523,8 @@ FT_BEGIN_HEADER /* the face (i.e., if it is not listed in the `face->charmaps' */ /* table). */ /* */ - /* It also fails if a type~14 charmap is selected. */ + /* It also fails if an OpenType type~14 charmap is selected (which */ + /* doesn't map character codes to glyph indices at all). */ /* */ FT_EXPORT( FT_Error ) FT_Set_Charmap( FT_Face face, @@ -3464,7 +3559,7 @@ FT_BEGIN_HEADER /* */ /* */ /* Return the glyph index of a given character code. This function */ - /* uses a charmap object to do the mapping. */ + /* uses the currently selected charmap to do the mapping. */ /* */ /* */ /* face :: A handle to the source face object. */ @@ -3498,9 +3593,8 @@ FT_BEGIN_HEADER /* FT_Get_First_Char */ /* */ /* */ - /* This function is used to return the first character code in the */ - /* current charmap of a given face. It also returns the */ - /* corresponding glyph index. */ + /* Return the first character code in the current charmap of a given */ + /* face, together with its corresponding glyph index. */ /* */ /* */ /* face :: A handle to the source face object. */ @@ -3513,7 +3607,7 @@ FT_BEGIN_HEADER /* The charmap's first character code. */ /* */ /* */ - /* You should use this function with @FT_Get_Next_Char to be able to */ + /* You should use this function together with @FT_Get_Next_Char to */ /* parse all character codes available in a given charmap. The code */ /* should look like this: */ /* */ @@ -3553,12 +3647,13 @@ FT_BEGIN_HEADER /* FT_Get_Next_Char */ /* */ /* */ - /* This function is used to return the next character code in the */ - /* current charmap of a given face following the value `char_code', */ - /* as well as the corresponding glyph index. */ + /* Return the next character code in the current charmap of a given */ + /* face following the value `char_code', as well as the corresponding */ + /* glyph index. */ /* */ /* */ /* face :: A handle to the source face object. */ + /* */ /* char_code :: The starting character code. */ /* */ /* */ @@ -3571,7 +3666,7 @@ FT_BEGIN_HEADER /* */ /* You should use this function with @FT_Get_First_Char to walk */ /* over all character codes available in a given charmap. See the */ - /* note for this function for a simple code example. */ + /* note for that function for a simple code example. */ /* */ /* Note that `*agindex' is set to~0 when there are no more codes in */ /* the charmap. */ @@ -3582,14 +3677,109 @@ FT_BEGIN_HEADER FT_UInt *agindex ); + /************************************************************************* + * + * @function: + * FT_Face_Properties + * + * @description: + * Set or override certain (library or module-wide) properties on a + * face-by-face basis. Useful for finer-grained control and avoiding + * locks on shared structures (threads can modify their own faces as + * they see fit). + * + * Contrary to @FT_Property_Set, this function uses @FT_Parameter so + * that you can pass multiple properties to the target face in one call. + * Note that only a subset of the available properties can be + * controlled. + * + * * Stem darkening (@FT_PARAM_TAG_STEM_DARKENING, corresponding to the + * property `no-stem-darkening' provided by the `autofit' and `cff' + * modules; see @no-stem-darkening[autofit] and + * @no-stem-darkening[cff]). + * + * * LCD filter weights (@FT_PARAM_TAG_LCD_FILTER_WEIGHTS, corresponding + * to function @FT_Library_SetLcdFilterWeights). + * + * * Seed value for the CFF `random' operator + * (@FT_PARAM_TAG_RANDOM_SEED, corresponding to the `random-seed' + * property provided by the `cff' module; see @random-seed). + * + * Pass NULL as `data' in @FT_Parameter for a given tag to reset the + * option and use the library or module default again. + * + * @input: + * face :: + * A handle to the source face object. + * + * num_properties :: + * The number of properties that follow. + * + * properties :: + * A handle to an @FT_Parameter array with `num_properties' elements. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * Here an example that sets three properties. You must define + * FT_CONFIG_OPTION_SUBPIXEL_RENDERING to make the LCD filter examples + * work. + * + * { + * FT_Parameter property1; + * FT_Bool darken_stems = 1; + * + * FT_Parameter property2; + * FT_LcdFiveTapFilter custom_weight = + * { 0x11, 0x44, 0x56, 0x44, 0x11 }; + * + * FT_Parameter property3; + * FT_Int32 random_seed = 314159265; + * + * FT_Parameter properties[3] = { property1, + * property2, + * property3 }; + * + * + * property1.tag = FT_PARAM_TAG_STEM_DARKENING; + * property1.data = &darken_stems; + * + * property2.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; + * property2.data = custom_weight; + * + * property3.tag = FT_PARAM_TAG_RANDOM_SEED; + * property3.data = &random_seed; + * + * FT_Face_Properties( face, 3, properties ); + * } + * + * The next example resets a single property to its default value. + * + * { + * FT_Parameter property; + * + * + * property.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS; + * property.data = NULL; + * + * FT_Face_Properties( face, 1, &property ); + * } + * + */ + FT_EXPORT( FT_Error ) + FT_Face_Properties( FT_Face face, + FT_UInt num_properties, + FT_Parameter* properties ); + + /*************************************************************************/ /* */ /* */ /* FT_Get_Name_Index */ /* */ /* */ - /* Return the glyph index of a given glyph name. This function uses */ - /* driver specific objects to do the translation. */ + /* Return the glyph index of a given glyph name. */ /* */ /* */ /* face :: A handle to the source face object. */ @@ -3610,8 +3800,10 @@ FT_BEGIN_HEADER * FT_SUBGLYPH_FLAG_XXX * * @description: - * A list of constants used to describe subglyphs. Please refer to the - * TrueType specification for the meaning of the various flags. + * A list of constants describing subglyphs. Please refer to the + * `glyf' table description in the OpenType specification for the + * meaning of the various flags (which get synthesized for + * non-OpenType subglyphs). * * @values: * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS :: @@ -3672,7 +3864,7 @@ FT_BEGIN_HEADER * @note: * The values of `*p_arg1', `*p_arg2', and `*p_transform' must be * interpreted depending on the flags returned in `*p_flags'. See the - * TrueType specification for details. + * OpenType specification for details. * */ FT_EXPORT( FT_Error ) @@ -3712,33 +3904,31 @@ FT_BEGIN_HEADER /* the font software copyright owner. */ /* */ /* FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING :: */ - /* If this bit is set, the font may be embedded and temporarily */ - /* loaded on the remote system. Documents containing Preview & */ - /* Print fonts must be opened `read-only'; no edits can be applied */ - /* to the document. */ + /* The font may be embedded and temporarily loaded on the remote */ + /* system. Documents containing Preview & Print fonts must be */ + /* opened `read-only'; no edits can be applied to the document. */ /* */ /* FT_FSTYPE_EDITABLE_EMBEDDING :: */ - /* If this bit is set, the font may be embedded but must only be */ - /* installed temporarily on other systems. In contrast to Preview */ - /* & Print fonts, documents containing editable fonts may be opened */ - /* for reading, editing is permitted, and changes may be saved. */ + /* The font may be embedded but must only be installed temporarily */ + /* on other systems. In contrast to Preview & Print fonts, */ + /* documents containing editable fonts may be opened for reading, */ + /* editing is permitted, and changes may be saved. */ /* */ /* FT_FSTYPE_NO_SUBSETTING :: */ - /* If this bit is set, the font may not be subsetted prior to */ - /* embedding. */ + /* The font may not be subsetted prior to embedding. */ /* */ /* FT_FSTYPE_BITMAP_EMBEDDING_ONLY :: */ - /* If this bit is set, only bitmaps contained in the font may be */ - /* embedded; no outline data may be embedded. If there are no */ - /* bitmaps available in the font, then the font is unembeddable. */ + /* Only bitmaps contained in the font may be embedded; no outline */ + /* data may be embedded. If there are no bitmaps available in the */ + /* font, then the font is unembeddable. */ /* */ /* */ /* 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. */ + /* 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. */ /* */ #define FT_FSTYPE_INSTALLABLE_EMBEDDING 0x0000 #define FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING 0x0002 @@ -3754,13 +3944,13 @@ FT_BEGIN_HEADER /* FT_Get_FSType_Flags */ /* */ /* */ - /* Return the fsType flags for a font. */ + /* Return the `fsType' flags for a font. */ /* */ /* */ /* face :: A handle to the source face object. */ /* */ /* */ - /* The fsType flags, @FT_FSTYPE_XXX. */ + /* The `fsType' flags, see @FT_FSTYPE_XXX. */ /* */ /* */ /* Use this function rather than directly reading the `fs_type' field */ @@ -3780,39 +3970,51 @@ FT_BEGIN_HEADER /* glyph_variants */ /* */ /* */ - /* Glyph Variants */ + /* Unicode Variation Sequences */ /* */ /* <Abstract> */ - /* The FreeType~2 interface to Unicode Ideographic Variation */ - /* Sequences (IVS), using the SFNT cmap format~14. */ + /* The FreeType~2 interface to Unicode Variation Sequences (UVS), */ + /* using the SFNT cmap format~14. */ /* */ /* <Description> */ - /* Many CJK characters have variant forms. They are a sort of grey */ - /* area somewhere between being totally irrelevant and semantically */ - /* distinct; for this reason, the Unicode consortium decided to */ - /* introduce Ideographic Variation Sequences (IVS), consisting of a */ - /* Unicode base character and one of 240 variant selectors */ - /* (U+E0100-U+E01EF), instead of further extending the already huge */ - /* code range for CJK characters. */ - /* */ - /* An IVS is registered and unique; for further details please refer */ - /* to Unicode Technical Standard #37, the Ideographic Variation */ - /* Database: */ - /* */ - /* http://www.unicode.org/reports/tr37/ */ - /* */ - /* To date (November 2014), the character with the most variants is */ - /* U+9089, having 32 such IVS. */ - /* */ - /* Adobe and MS decided to support IVS with a new cmap subtable */ - /* (format~14). It is an odd subtable because it is not a mapping of */ - /* input code points to glyphs, but contains lists of all variants */ - /* supported by the font. */ - /* */ - /* A variant may be either `default' or `non-default'. A default */ - /* variant is the one you will get for that code point if you look it */ - /* up in the standard Unicode cmap. A non-default variant is a */ - /* different glyph. */ + /* Many characters, especially for CJK scripts, have variant forms. */ + /* They are a sort of grey area somewhere between being totally */ + /* irrelevant and semantically distinct; for this reason, the Unicode */ + /* consortium decided to introduce Variation Sequences (VS), */ + /* consisting of a Unicode base character and a variation selector */ + /* instead of further extending the already huge number of */ + /* characters. */ + /* */ + /* Unicode maintains two different sets, namely `Standardized */ + /* Variation Sequences' and registered `Ideographic Variation */ + /* Sequences' (IVS), collected in the `Ideographic Variation */ + /* Database' (IVD). */ + /* */ + /* http://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt */ + /* http://unicode.org/reports/tr37/ */ + /* http://unicode.org/ivd/ */ + /* */ + /* To date (January 2017), the character with the most ideographic */ + /* variations is U+9089, having 32 such IVS. */ + /* */ + /* Three Mongolian Variation Selectors have the values U+180B-U+180D; */ + /* 256 generic Variation Selectors are encoded in the ranges */ + /* U+FE00-U+FE0F and U+E0100-U+E01EF. IVS currently use Variation */ + /* Selectors from the range U+E0100-U+E01EF only. */ + /* */ + /* A VS consists of the base character value followed by a single */ + /* Variation Selector. For example, to get the first variation of */ + /* U+9089, you have to write the character sequence `U+9089 U+E0100'. */ + /* */ + /* Adobe and MS decided to support both standardized and ideographic */ + /* VS with a new cmap subtable (format~14). It is an odd subtable */ + /* because it is not a mapping of input code points to glyphs, but */ + /* contains lists of all variations supported by the font. */ + /* */ + /* A variation may be either `default' or `non-default' for a given */ + /* font. A default variation is the one you will get for that code */ + /* point if you look it up in the standard Unicode cmap. A */ + /* non-default variation is a different glyph. */ /* */ /*************************************************************************/ @@ -3868,8 +4070,8 @@ FT_BEGIN_HEADER /* FT_Face_GetCharVariantIsDefault */ /* */ /* <Description> */ - /* Check whether this variant of this Unicode character is the one to */ - /* be found in the `cmap'. */ + /* Check whether this variation of this Unicode character is the one */ + /* to be found in the `cmap'. */ /* */ /* <Input> */ /* face :: */ @@ -3883,7 +4085,7 @@ FT_BEGIN_HEADER /* */ /* <Return> */ /* 1~if found in the standard (Unicode) cmap, 0~if found in the */ - /* variation selector cmap, or -1 if it is not a variant. */ + /* variation selector cmap, or -1 if it is not a variation. */ /* */ /* <Note> */ /* This function is only meaningful if the font has a variation */ @@ -3904,7 +4106,7 @@ FT_BEGIN_HEADER /* FT_Face_GetVariantSelectors */ /* */ /* <Description> */ - /* Return a zero-terminated list of Unicode variant selectors found */ + /* Return a zero-terminated list of Unicode variation selectors found */ /* in the font. */ /* */ /* <Input> */ @@ -3913,7 +4115,7 @@ FT_BEGIN_HEADER /* */ /* <Return> */ /* A pointer to an array of selector code points, or NULL if there is */ - /* no valid variant selector cmap subtable. */ + /* no valid variation selector cmap subtable. */ /* */ /* <Note> */ /* The last item in the array is~0; the array is owned by the */ @@ -3933,7 +4135,7 @@ FT_BEGIN_HEADER /* FT_Face_GetVariantsOfChar */ /* */ /* <Description> */ - /* Return a zero-terminated list of Unicode variant selectors found */ + /* Return a zero-terminated list of Unicode variation selectors found */ /* for the specified character code. */ /* */ /* <Input> */ @@ -3944,7 +4146,7 @@ FT_BEGIN_HEADER /* The character codepoint in Unicode. */ /* */ /* <Return> */ - /* A pointer to an array of variant selector code points that are */ + /* A pointer to an array of variation selector code points that are */ /* active for the given character, or NULL if the corresponding list */ /* is empty. */ /* */ @@ -3968,19 +4170,19 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* Return a zero-terminated list of Unicode character codes found for */ - /* the specified variant selector. */ + /* the specified variation selector. */ /* */ /* <Input> */ /* face :: */ /* A handle to the source face object. */ /* */ /* variantSelector :: */ - /* The variant selector code point in Unicode. */ + /* The variation selector code point in Unicode. */ /* */ /* <Return> */ /* A list of all the code points that are specified by this selector */ /* (both default and non-default codes are returned) or NULL if there */ - /* is no valid cmap or the variant selector is invalid. */ + /* is no valid cmap or the variation selector is invalid. */ /* */ /* <Note> */ /* The last item in the array is~0; the array is owned by the */ @@ -4030,16 +4232,17 @@ FT_BEGIN_HEADER /* FT_MulDiv */ /* */ /* <Description> */ - /* A very simple function used to perform the computation `(a*b)/c' */ - /* with maximum accuracy (it uses a 64-bit intermediate integer */ - /* whenever necessary). */ + /* Compute `(a*b)/c' with maximum accuracy, using a 64-bit */ + /* intermediate integer whenever necessary. */ /* */ /* This function isn't necessarily as fast as some processor specific */ /* operations, but is at least completely portable. */ /* */ /* <Input> */ /* a :: The first multiplier. */ + /* */ /* b :: The second multiplier. */ + /* */ /* c :: The divisor. */ /* */ /* <Return> */ @@ -4059,12 +4262,12 @@ FT_BEGIN_HEADER /* FT_MulFix */ /* */ /* <Description> */ - /* A very simple function used to perform the computation */ - /* `(a*b)/0x10000' with maximum accuracy. Most of the time this is */ - /* used to multiply a given value by a 16.16 fixed-point factor. */ + /* Compute `(a*b)/0x10000' with maximum accuracy. Its main use is to */ + /* multiply a given value by a 16.16 fixed-point factor. */ /* */ /* <Input> */ /* a :: The first multiplier. */ + /* */ /* b :: The second multiplier. Use a 16.16 factor here whenever */ /* possible (see note below). */ /* */ @@ -4093,12 +4296,12 @@ FT_BEGIN_HEADER /* FT_DivFix */ /* */ /* <Description> */ - /* A very simple function used to perform the computation */ - /* `(a*0x10000)/b' with maximum accuracy. Most of the time, this is */ - /* used to divide a given value by a 16.16 fixed-point factor. */ + /* Compute `(a*0x10000)/b' with maximum accuracy. Its main use is to */ + /* divide a given value by a 16.16 fixed-point factor. */ /* */ /* <Input> */ /* a :: The numerator. */ + /* */ /* b :: The denominator. Use a 16.16 factor here. */ /* */ /* <Return> */ @@ -4115,13 +4318,13 @@ FT_BEGIN_HEADER /* FT_RoundFix */ /* */ /* <Description> */ - /* A very simple function used to round a 16.16 fixed number. */ + /* Round a 16.16 fixed number. */ /* */ /* <Input> */ /* a :: The number to be rounded. */ /* */ /* <Return> */ - /* `a' rounded to nearest 16.16 fixed integer, halfway cases away */ + /* `a' rounded to the nearest 16.16 fixed integer, halfway cases away */ /* from zero. */ /* */ FT_EXPORT( FT_Fixed ) @@ -4134,8 +4337,7 @@ FT_BEGIN_HEADER /* FT_CeilFix */ /* */ /* <Description> */ - /* A very simple function used to compute the ceiling function of a */ - /* 16.16 fixed number. */ + /* Compute the smallest following integer of a 16.16 fixed number. */ /* */ /* <Input> */ /* a :: The number for which the ceiling function is to be computed. */ @@ -4153,8 +4355,7 @@ FT_BEGIN_HEADER /* FT_FloorFix */ /* */ /* <Description> */ - /* A very simple function used to compute the floor function of a */ - /* 16.16 fixed number. */ + /* Compute the largest previous integer of a 16.16 fixed number. */ /* */ /* <Input> */ /* a :: The number for which the floor function is to be computed. */ @@ -4240,8 +4441,8 @@ FT_BEGIN_HEADER * */ #define FREETYPE_MAJOR 2 -#define FREETYPE_MINOR 7 -#define FREETYPE_PATCH 1 +#define FREETYPE_MINOR 8 +#define FREETYPE_PATCH 0 /*************************************************************************/ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftadvanc.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftadvanc.h index 023dd84b7a3..dea96e0db43 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftadvanc.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftadvanc.h @@ -4,7 +4,7 @@ /* */ /* Quick computation of advance widths (specification only). */ /* */ -/* Copyright 2008-2016 by */ +/* Copyright 2008-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftautoh.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftautoh.h index 48ff1aa26e4..abd540f0b5d 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftautoh.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftautoh.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for controlling the auto-hinter (specification only). */ /* */ -/* Copyright 2012-2016 by */ +/* Copyright 2012-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -448,7 +448,7 @@ FT_BEGIN_HEADER * no-stem-darkening[autofit] * * @description: - * *Experimental* *only,* *requires* *linear* *alpha* *blending* *and* + * *Experimental* *only*, *requires* *linear* *alpha* *blending* *and* * *gamma* *correction* * * Stem darkening emboldens glyphs at smaller sizes to make them more @@ -477,9 +477,31 @@ FT_BEGIN_HEADER * of emboldening versus the CFF driver. * * This property can be set via the `FREETYPE_PROPERTIES' environment - * variable similar to the CFF driver. + * variable similar to the CFF driver. It can also be set per face + * using @FT_Face_Properties with @FT_PARAM_TAG_STEM_DARKENING. + * + */ + + + /************************************************************************** + * + * @constant: + * FT_PARAM_TAG_STEM_DARKENING + * + * @description: + * An @FT_Parameter tag to be used with @FT_Face_Properties. The + * corresponding Boolean argument specifies whether to apply stem + * darkening, overriding the global default values or the values set up + * with @FT_Property_Set (see @no-stem-darkening[autofit] and + * @no-stem-darkening[cff]). + * + * This is a passive setting that only takes effect if the font driver + * or autohinter honors it, which the CFF driver always does, but the + * autohinter only in `light' hinting mode (as of version 2.7.0). * */ +#define FT_PARAM_TAG_STEM_DARKENING \ + FT_MAKE_TAG( 'd', 'a', 'r', 'k' ) /************************************************************************** diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftbbox.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftbbox.h index 2a4d214416d..f03bdc1e1e4 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftbbox.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftbbox.h @@ -4,7 +4,7 @@ /* */ /* FreeType exact bbox computation (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftbdf.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftbdf.h index 016dba086df..3d3106bad03 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftbdf.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftbdf.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing BDF-specific strings (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftbitmap.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftbitmap.h index 0eac7b9d7db..04b2402ad0f 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftbitmap.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftbitmap.h @@ -4,7 +4,7 @@ /* */ /* FreeType utility functions for bitmaps (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftbzip2.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftbzip2.h index b7f2eee87df..9147a790a42 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftbzip2.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftbzip2.h @@ -4,7 +4,7 @@ /* */ /* Bzip2-compressed stream support. */ /* */ -/* Copyright 2010-2016 by */ +/* Copyright 2010-2017 by */ /* Joel Klinghed. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftcache.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftcache.h index 883c88d5d20..5ff3ccf4042 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftcache.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftcache.h @@ -4,7 +4,7 @@ /* */ /* FreeType Cache subsystem (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftcffdrv.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftcffdrv.h index 8f88cc48fd4..477b6ddb184 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftcffdrv.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftcffdrv.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for controlling the CFF driver (specification only). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -113,6 +113,7 @@ FT_BEGIN_HEADER * hinting-engine[cff] * no-stem-darkening[cff] * darkening-parameters[cff] + * random-seed * */ @@ -203,6 +204,8 @@ FT_BEGIN_HEADER * * This property can be set via the `FREETYPE_PROPERTIES' environment * variable (using values 1 and 0 for `on' and `off', respectively). + * It can also be set per face using @FT_Face_Properties with + * @FT_PARAM_TAG_STEM_DARKENING. * */ @@ -263,6 +266,49 @@ FT_BEGIN_HEADER * } */ + + /************************************************************************** + * + * @property: + * random-seed + * + * @description: + * By default, the seed value for the CFF `random' operator is set to a + * random value. However, mainly for debugging purposes, it is often + * necessary to use a known value as a seed so that the pseudo-random + * number sequences generated by `random' are repeatable. + * + * The `random-seed' property does that. Its argument is a signed 32bit + * integer; if the value is zero or negative, the seed given by the + * `intitialRandomSeed' private DICT operator in a CFF file gets used + * (or a default value if there is no such operator). If the value is + * positive, use it instead of `initialRandomSeed', which is + * consequently ignored. + * + * @note: + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable. It can also be set per face using @FT_Face_Properties with + * @FT_PARAM_TAG_RANDOM_SEED. + * + */ + + + /************************************************************************** + * + * @constant: + * FT_PARAM_TAG_RANDOM_SEED + * + * @description: + * An @FT_Parameter tag to be used with @FT_Face_Properties. The + * corresponding 32bit signed integer argument overrides the CFF + * module's random seed value with a face-specific one; see + * @random-seed. + * + */ +#define FT_PARAM_TAG_RANDOM_SEED \ + FT_MAKE_TAG( 's', 'e', 'e', 'd' ) + + /* */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftchapters.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftchapters.h index ab4389530ef..a0a121b0a17 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftchapters.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftchapters.h @@ -77,6 +77,7 @@ /* auto_hinter */ /* cff_driver */ /* tt_driver */ +/* pcf_driver */ /* */ /***************************************************************************/ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftcid.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftcid.h index e1bc9fe015c..4adcbeeda99 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftcid.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftcid.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing CID font information (specification). */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* Dereg Clegg and Michael Toftdal. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/fterrdef.h b/Build/source/libs/freetype2/freetype-src/include/freetype/fterrdef.h index 3f53dd58200..cabbac82739 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/fterrdef.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/fterrdef.h @@ -4,7 +4,7 @@ /* */ /* FreeType error codes (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -231,6 +231,8 @@ "invalid PostScript (post) table format" ) FT_ERRORDEF_( Invalid_Post_Table, 0x9B, "invalid PostScript (post) table" ) + FT_ERRORDEF_( DEF_In_Glyf_Bytecode, 0x9C, + "found FDEF or IDEF opcode in glyf bytecode" ) /* CFF, CID, and Type 1 errors */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/fterrors.h b/Build/source/libs/freetype2/freetype-src/include/freetype/fterrors.h index e15bfb001ed..42769fa7bf2 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/fterrors.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/fterrors.h @@ -4,7 +4,7 @@ /* */ /* FreeType error code handling (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -106,7 +106,7 @@ /* */ /* #undefine __FTERRORS_H__ */ /* */ - /* work for backwards compatibility. */ + /* work for backward compatibility. */ /* */ #if !( defined( FTERRORS_H_ ) && defined ( __FTERRORS_H__ ) ) #define FTERRORS_H_ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftfntfmt.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftfntfmt.h index bd423247bb6..337758328a6 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftfntfmt.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftfntfmt.h @@ -4,7 +4,7 @@ /* */ /* Support functions for font formats. */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftgasp.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftgasp.h index 3f5b3bc6954..ce18d647844 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftgasp.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftgasp.h @@ -4,7 +4,7 @@ /* */ /* Access of TrueType's `gasp' table (specification). */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -92,8 +92,8 @@ #define FT_GASP_NO_TABLE -1 #define FT_GASP_DO_GRIDFIT 0x01 #define FT_GASP_DO_GRAY 0x02 +#define FT_GASP_SYMMETRIC_GRIDFIT 0x04 #define FT_GASP_SYMMETRIC_SMOOTHING 0x08 -#define FT_GASP_SYMMETRIC_GRIDFIT 0x10 /************************************************************************* @@ -102,17 +102,25 @@ * FT_Get_Gasp * * @description: - * Read the `gasp' table from a TrueType or OpenType font file and - * return the entry corresponding to a given character pixel size. + * For a TrueType or OpenType font file, return the rasterizer behaviour + * flags from the font's `gasp' table corresponding to a given + * character pixel size. * * @input: * face :: The source face handle. + * * ppem :: The vertical character pixel size. * * @return: * Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE if there is no * `gasp' table in the face. * + * @note: + * If you want to use the MM functionality of OpenType variation fonts + * (i.e., using @FT_Set_Var_Design_Coordinates and friends), call this + * function *after* setting an instance since the return values can + * change. + * * @since: * 2.3.0 */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftglyph.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftglyph.h index d9840a81fc0..79879a7ac75 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftglyph.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftglyph.h @@ -4,7 +4,7 @@ /* */ /* FreeType convenience functions to handle glyphs (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -453,7 +453,7 @@ FT_BEGIN_HEADER /* */ /* */ /* // load glyph */ - /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAUT ); */ + /* error = FT_Load_Char( face, glyph_index, FT_LOAD_DEFAULT ); */ /* */ /* // extract glyph image */ /* error = FT_Get_Glyph( face->glyph, &glyph ); */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftgxval.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftgxval.h index a58e86a0404..f239c71eb1b 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftgxval.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftgxval.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* Masatake YAMATO, Redhat K.K, */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftgzip.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftgzip.h index 3932ce68871..bd5ceaab9f3 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftgzip.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftgzip.h @@ -4,7 +4,7 @@ /* */ /* Gzip-compressed stream support. */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftimage.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftimage.h index 7b461550cce..1a049ef16d9 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftimage.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftimage.h @@ -5,7 +5,7 @@ /* FreeType glyph image formats and default raster interface */ /* (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -619,7 +619,7 @@ FT_BEGIN_HEADER /* */ /* { */ /* x' = (x << shift) - delta */ - /* y' = (x << shift) - delta */ + /* y' = (y << shift) - delta */ /* } */ /* */ /* Set the values of `shift' and `delta' to~0 to get the original */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftincrem.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftincrem.h index 46b58b79175..f6ae2baed6c 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftincrem.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftincrem.h @@ -4,7 +4,7 @@ /* */ /* FreeType incremental loading (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftlcdfil.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftlcdfil.h index e06a8957f51..680bd90c89c 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftlcdfil.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftlcdfil.h @@ -5,7 +5,7 @@ /* FreeType API for color filtering of subpixel bitmap glyphs */ /* (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -268,6 +268,9 @@ FT_BEGIN_HEADER * defined in your build of the library, which should correspond to all * default builds of FreeType. * + * LCD filter weights can also be set per face using @FT_Face_Properties + * with @FT_PARAM_TAG_LCD_FILTER_WEIGHTS. + * * @since: * 2.4.0 */ @@ -275,6 +278,38 @@ FT_BEGIN_HEADER FT_Library_SetLcdFilterWeights( FT_Library library, unsigned char *weights ); + + /************************************************************************** + * + * @constant: + * FT_PARAM_TAG_LCD_FILTER_WEIGHTS + * + * @description: + * An @FT_Parameter tag to be used with @FT_Face_Properties. The + * corresponding argument specifies the five LCD filter weights for a + * given face (if using @FT_LOAD_TARGET_LCD, for example), overriding + * the global default values or the values set up with + * @FT_Library_SetLcdFilterWeights. + * + */ +#define FT_PARAM_TAG_LCD_FILTER_WEIGHTS \ + FT_MAKE_TAG( 'l', 'c', 'd', 'f' ) + + + /* + * @type: + * FT_LcdFiveTapFilter + * + * @description: + * A typedef for passing the five LCD filter weights to + * @FT_Face_Properties within an @FT_Parameter structure. + * + */ +#define FT_LCD_FILTER_FIVE_TAPS 5 + + typedef FT_Byte FT_LcdFiveTapFilter[FT_LCD_FILTER_FIVE_TAPS]; + + /* */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftlist.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftlist.h index 82f437ac611..5309cb18ba5 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftlist.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftlist.h @@ -4,7 +4,7 @@ /* */ /* Generic list support for FreeType (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftlzw.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftlzw.h index 582e2c1465a..a82c95e7c9f 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftlzw.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftlzw.h @@ -4,7 +4,7 @@ /* */ /* LZW-compressed stream support. */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftmac.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftmac.h index adb15cadf37..ad97c6e4c35 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftmac.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftmac.h @@ -4,7 +4,7 @@ /* */ /* Additional Mac-specific API. */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftmm.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftmm.h index a0238c5d29f..c41b80ea67c 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftmm.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftmm.h @@ -4,7 +4,7 @@ /* */ /* FreeType Multiple Master font interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -43,11 +43,10 @@ FT_BEGIN_HEADER /* Master fonts, i.e., the selection of specific design instances by */ /* setting design axis coordinates. */ /* */ - /* George Williams has extended this interface to make it work with */ - /* both Type~1 Multiple Masters fonts and GX distortable (var) */ - /* fonts. Some of these routines only work with MM fonts, others */ - /* will work with both types. They are similar enough that a */ - /* consistent interface makes sense. */ + /* Besides Adobe MM fonts, the interface supports Apple's TrueType GX */ + /* and OpenType variation fonts. Some of the routines only work with */ + /* Adobe MM fonts, others will work with all three types. They are */ + /* similar enough that a consistent interface makes sense. */ /* */ /*************************************************************************/ @@ -58,10 +57,11 @@ FT_BEGIN_HEADER /* FT_MM_Axis */ /* */ /* <Description> */ - /* A simple structure used to model a given axis in design space for */ - /* Multiple Masters fonts. */ + /* A structure to model a given axis in design space for Multiple */ + /* Masters fonts. */ /* */ - /* This structure can't be used for GX var fonts. */ + /* This structure can't be used for TrueType GX or OpenType variation */ + /* fonts. */ /* */ /* <Fields> */ /* name :: The axis's name. */ @@ -85,10 +85,11 @@ FT_BEGIN_HEADER /* FT_Multi_Master */ /* */ /* <Description> */ - /* A structure used to model the axes and space of a Multiple Masters */ + /* A structure to model the axes and space of a Multiple Masters */ /* font. */ /* */ - /* This structure can't be used for GX var fonts. */ + /* This structure can't be used for TrueType GX or OpenType variation */ + /* fonts. */ /* */ /* <Fields> */ /* num_axis :: Number of axes. Cannot exceed~4. */ @@ -115,27 +116,35 @@ FT_BEGIN_HEADER /* FT_Var_Axis */ /* */ /* <Description> */ - /* A simple structure used to model a given axis in design space for */ - /* Multiple Masters and GX var fonts. */ + /* A structure to model a given axis in design space for Multiple */ + /* Masters, TrueType GX, and OpenType variation fonts. */ /* */ /* <Fields> */ /* name :: The axis's name. */ - /* Not always meaningful for GX. */ + /* Not always meaningful for TrueType GX or OpenType */ + /* variation fonts. */ /* */ /* minimum :: The axis's minimum design coordinate. */ /* */ /* def :: The axis's default design coordinate. */ - /* FreeType computes meaningful default values for MM; it */ - /* is then an integer value, not in 16.16 format. */ + /* FreeType computes meaningful default values for Adobe */ + /* MM fonts. */ /* */ /* maximum :: The axis's maximum design coordinate. */ /* */ - /* tag :: The axis's tag (the GX equivalent to `name'). */ - /* FreeType provides default values for MM if possible. */ + /* tag :: The axis's tag (the equivalent to `name' for TrueType */ + /* GX and OpenType variation fonts). FreeType provides */ + /* default values for Adobe MM fonts if possible. */ /* */ - /* strid :: The entry in `name' table (another GX version of */ - /* `name'). */ - /* Not meaningful for MM. */ + /* strid :: The axis name entry in the font's `name' table. This */ + /* is another (and often better) version of the `name' */ + /* field for TrueType GX or OpenType variation fonts. Not */ + /* meaningful for Adobe MM fonts. */ + /* */ + /* <Note> */ + /* The fields `minimum', `def', and `maximum' are 16.16 fractional */ + /* values for TrueType GX and OpenType variation fonts. For Adobe MM */ + /* fonts, the values are integers. */ /* */ typedef struct FT_Var_Axis_ { @@ -157,15 +166,19 @@ FT_BEGIN_HEADER /* FT_Var_Named_Style */ /* */ /* <Description> */ - /* A simple structure used to model a named style in a GX var font. */ + /* A structure to model a named instance in a TrueType GX or OpenType */ + /* variation font. */ /* */ - /* This structure can't be used for MM fonts. */ + /* This structure can't be used for Adobe MM fonts. */ /* */ /* <Fields> */ - /* coords :: The design coordinates for this style. */ + /* coords :: The design coordinates for this instance. */ /* This is an array with one entry for each axis. */ /* */ - /* strid :: The entry in `name' table identifying this style. */ + /* strid :: The entry in `name' table identifying this instance. */ + /* */ + /* psid :: The entry in `name' table identifying a PostScript name */ + /* for this instance. */ /* */ typedef struct FT_Var_Named_Style_ { @@ -182,17 +195,19 @@ FT_BEGIN_HEADER /* FT_MM_Var */ /* */ /* <Description> */ - /* A structure used to model the axes and space of a Multiple Masters */ - /* or GX var distortable font. */ + /* A structure to model the axes and space of a Adobe MM, TrueType */ + /* GX, or OpenType variation font. */ /* */ - /* Some fields are specific to one format and not to the other. */ + /* Some fields are specific to one format and not to the others. */ /* */ /* <Fields> */ /* num_axis :: The number of axes. The maximum value is~4 for */ - /* MM; no limit in GX. */ + /* Adobe MM fonts; no limit in TrueType GX or */ + /* OpenType variation fonts. */ /* */ /* num_designs :: The number of designs; should be normally */ - /* 2^num_axis for MM fonts. Not meaningful for GX */ + /* 2^num_axis for Adobe MM fonts. Not meaningful */ + /* for TrueType GX or OpenType variation fonts */ /* (where every glyph could have a different */ /* number of designs). */ /* */ @@ -200,21 +215,23 @@ FT_BEGIN_HEADER /* a tuple of design coordinates that has a string */ /* ID (in the `name' table) associated with it. */ /* The font can tell the user that, for example, */ - /* [Weight=1.5,Width=1.1] is `Bold'. */ + /* [Weight=1.5,Width=1.1] is `Bold'. Another name */ + /* for `named style' is `named instance'. */ /* */ - /* For Type 1 Multiple Masters fonts, this value */ - /* is always zero because the format does not */ - /* support named styles. */ + /* For Adobe Multiple Masters fonts, this value is */ + /* always zero because the format does not support */ + /* named styles. */ /* */ /* axis :: An axis descriptor table. */ - /* GX fonts contain slightly more data than MM. */ + /* TrueType GX and OpenType variation fonts */ + /* contain slightly more data than Adobe MM fonts. */ /* 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. */ + /* namedstyle :: A named style (instance) table. */ + /* Only meaningful for TrueType GX and OpenType */ + /* variation fonts. Memory management of this */ + /* pointer is done internally by FreeType. */ /* */ typedef struct FT_MM_Var_ { @@ -233,9 +250,10 @@ FT_BEGIN_HEADER /* FT_Get_Multi_Master */ /* */ /* <Description> */ - /* Retrieve the Multiple Master descriptor of a given font. */ + /* Retrieve a variation descriptor of a given Adobe MM font. */ /* */ - /* This function can't be used with GX fonts. */ + /* This function can't be used with TrueType GX or OpenType variation */ + /* fonts. */ /* */ /* <Input> */ /* face :: A handle to the source face. */ @@ -257,13 +275,15 @@ FT_BEGIN_HEADER /* FT_Get_MM_Var */ /* */ /* <Description> */ - /* Retrieve the Multiple Master/GX var descriptor of a given font. */ + /* Retrieve a variation descriptor for a given font. */ + /* */ + /* This function works with all supported variation formats. */ /* */ /* <Input> */ /* face :: A handle to the source face. */ /* */ /* <Output> */ - /* amaster :: The Multiple Masters/GX var descriptor. */ + /* amaster :: The variation descriptor. */ /* Allocates a data structure, which the user must */ /* deallocate with `free' after use. */ /* */ @@ -281,10 +301,11 @@ FT_BEGIN_HEADER /* FT_Set_MM_Design_Coordinates */ /* */ /* <Description> */ - /* For Multiple Masters fonts, choose an interpolated font design */ - /* through design coordinates. */ + /* For Adobe MM fonts, choose an interpolated font design through */ + /* design coordinates. */ /* */ - /* This function can't be used with GX fonts. */ + /* This function can't be used with TrueType GX or OpenType variation */ + /* fonts. */ /* */ /* <InOut> */ /* face :: A handle to the source face. */ @@ -312,8 +333,9 @@ FT_BEGIN_HEADER /* FT_Set_Var_Design_Coordinates */ /* */ /* <Description> */ - /* For Multiple Master or GX Var fonts, choose an interpolated font */ - /* design through design coordinates. */ + /* Choose an interpolated font design through design coordinates. */ + /* */ + /* This function works with all supported variation formats. */ /* */ /* <InOut> */ /* face :: A handle to the source face. */ @@ -341,8 +363,10 @@ FT_BEGIN_HEADER /* FT_Get_Var_Design_Coordinates */ /* */ /* <Description> */ - /* For Multiple Master and GX Var fonts, get the design coordinates */ - /* of the currently selected interpolated font. */ + /* Get the design coordinates of the currently selected interpolated */ + /* font. */ + /* */ + /* This function works with all supported variation formats. */ /* */ /* <Input> */ /* face :: A handle to the source face. */ @@ -369,8 +393,10 @@ FT_BEGIN_HEADER /* FT_Set_MM_Blend_Coordinates */ /* */ /* <Description> */ - /* For Multiple Masters and GX var fonts, choose an interpolated font */ - /* design through normalized blend coordinates. */ + /* Choose an interpolated font design through normalized blend */ + /* coordinates. */ + /* */ + /* This function works with all supported variation formats. */ /* */ /* <InOut> */ /* face :: A handle to the source face. */ @@ -382,8 +408,9 @@ FT_BEGIN_HEADER /* use default values for the remaining axes. */ /* */ /* coords :: The design coordinates array (each element must be */ - /* between 0 and 1.0 for MM fonts, and between -1.0 and */ - /* 1.0 for GX var fonts). */ + /* between 0 and 1.0 for Adobe MM fonts, and between */ + /* -1.0 and 1.0 for TrueType GX and OpenType variation */ + /* fonts). */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ @@ -400,16 +427,18 @@ FT_BEGIN_HEADER /* FT_Get_MM_Blend_Coordinates */ /* */ /* <Description> */ - /* For Multiple Masters and GX var fonts, get the normalized blend */ - /* coordinates of the currently selected interpolated font. */ + /* Get the normalized blend coordinates of the currently selected */ + /* interpolated font. */ + /* */ + /* This function works with all supported variation formats. */ /* */ /* <Input> */ /* face :: A handle to the source face. */ /* */ /* num_coords :: The number of normalized blend coordinates to */ /* retrieve. If it is larger than the number of axes, */ - /* set the excess values to~0.5 for MM fonts, and to~0 */ - /* for GX var fonts. */ + /* set the excess values to~0.5 for Adobe MM fonts, and */ + /* to~0 for TrueType GX and OpenType variation fonts. */ /* */ /* <Output> */ /* coords :: The normalized blend coordinates array. */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftmodapi.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftmodapi.h index b4d2758efa6..4147aadf8b2 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftmodapi.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftmodapi.h @@ -4,7 +4,7 @@ /* */ /* FreeType modules public interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -89,6 +89,7 @@ FT_BEGIN_HEADER /* */ /* FT_Property_Set */ /* FT_Property_Get */ + /* FT_Set_Default_Properties */ /* */ /* FT_New_Library */ /* FT_Done_Library */ @@ -437,6 +438,47 @@ FT_BEGIN_HEADER void* value ); + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Set_Default_Properties */ + /* */ + /* <Description> */ + /* If compilation option FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES is */ + /* set, this function reads the `FREETYPE_PROPERTIES' environment */ + /* variable to control driver properties. See sections @auto_hinter, */ + /* @cff_driver, @pcf_driver, and @tt_driver for more. */ + /* */ + /* If the compilation option is not set, this function does nothing. */ + /* */ + /* `FREETYPE_PROPERTIES' has the following syntax form (broken here */ + /* into multiple lines for better readability). */ + /* */ + /* { */ + /* <optional whitespace> */ + /* <module-name1> ':' */ + /* <property-name1> '=' <property-value1> */ + /* <whitespace> */ + /* <module-name2> ':' */ + /* <property-name2> '=' <property-value2> */ + /* ... */ + /* } */ + /* */ + /* Example: */ + /* */ + /* { */ + /* FREETYPE_PROPERTIES=truetype:interpreter-version=35 \ */ + /* cff:no-stem-darkening=1 \ */ + /* autofitter:warping=1 */ + /* } */ + /* */ + /* <InOut> */ + /* library :: A handle to a new library object. */ + /* */ + FT_EXPORT( void ) + FT_Set_Default_Properties( FT_Library library ); + + /*************************************************************************/ /* */ /* <Function> */ @@ -477,8 +519,9 @@ FT_BEGIN_HEADER /* valid for the life of the @FT_Library object. */ /* */ /* Normally, you would call this function (followed by a call to */ - /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module) */ - /* instead of @FT_Init_FreeType to initialize the FreeType library. */ + /* @FT_Add_Default_Modules or a series of calls to @FT_Add_Module, */ + /* and a call to @FT_Set_Default_Properties) instead of */ + /* @FT_Init_FreeType to initialize the FreeType library. */ /* */ /* Don't use @FT_Done_FreeType but @FT_Done_Library to destroy a */ /* library instance. */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftmoderr.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftmoderr.h index 2a7671c816a..7f608375e8b 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftmoderr.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftmoderr.h @@ -4,7 +4,7 @@ /* */ /* FreeType module error offsets (specification). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftotval.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftotval.h index 3e6e18d8a62..b5d27cfe743 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftotval.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftotval.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating OpenType tables (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftoutln.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftoutln.h index ef66d48c8d4..07f73ebb1b5 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftoutln.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftoutln.h @@ -5,7 +5,7 @@ /* Support for the FT_Outline type used to store glyph shapes of */ /* most scalable font formats (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftpcfdrv.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftpcfdrv.h new file mode 100644 index 00000000000..6622c936fb7 --- /dev/null +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftpcfdrv.h @@ -0,0 +1,105 @@ +/***************************************************************************/ +/* */ +/* ftpcfdrv.h */ +/* */ +/* FreeType API for controlling the PCF driver (specification only). */ +/* */ +/* Copyright 2017 by */ +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ +/* */ +/* This file is part of the FreeType project, and may only be used, */ +/* modified, and distributed under the terms of the FreeType project */ +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ +/* this file you indicate that you have read the license and */ +/* understand and accept it fully. */ +/* */ +/***************************************************************************/ + + +#ifndef FTPCFDRV_H_ +#define FTPCFDRV_H_ + +#include <ft2build.h> +#include FT_FREETYPE_H + +#ifdef FREETYPE_H +#error "freetype.h of FreeType 1 has been loaded!" +#error "Please fix the directory search order for header files" +#error "so that freetype.h of FreeType 2 is found first." +#endif + + +FT_BEGIN_HEADER + + + /************************************************************************** + * + * @section: + * pcf_driver + * + * @title: + * The PCF driver + * + * @abstract: + * Controlling the PCF driver module. + * + * @description: + * While FreeType's PCF driver doesn't expose API functions by itself, + * it is possible to control its behaviour with @FT_Property_Set and + * @FT_Property_Get. Right now, there is a single property + * `no-long-family-names' available if FreeType is compiled with + * PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. + * + * The PCF driver's module name is `pcf'. + * + */ + + + /************************************************************************** + * + * @property: + * no-long-family-names + * + * @description: + * If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling + * FreeType, the PCF driver constructs long family names. + * + * There are many PCF fonts just called `Fixed' which look completely + * different, and which have nothing to do with each other. When + * selecting `Fixed' in KDE or Gnome one gets results that appear rather + * random, the style changes often if one changes the size and one + * cannot select some fonts at all. The improve this situation, the PCF + * module prepends the foundry name (plus a space) to the family name. + * It also checks whether there are `wide' characters; all put together, + * family names like `Sony Fixed' or `Misc Fixed Wide' are constructed. + * + * If `no-long-family-names' is set, this feature gets switched off. + * + * { + * FT_Library library; + * FT_Bool no_long_family_names = TRUE; + * + * + * FT_Init_FreeType( &library ); + * + * FT_Property_Set( library, "pcf", + * "no-long-family-names", + * &no_long_family_names ); + * } + * + * @note: + * This property can be used with @FT_Property_Get also. + * + * This property can be set via the `FREETYPE_PROPERTIES' environment + * variable (using values 1 and 0 for `on' and `off', respectively). + * + */ + + +FT_END_HEADER + + +#endif /* FTPCFDRV_H_ */ + + +/* END */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftpfr.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftpfr.h index 2e1bff2f67e..f2a6ae9349a 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftpfr.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftpfr.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing PFR-specific data (specification only). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftrender.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftrender.h index 278d24a3104..960837580ac 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftrender.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftrender.h @@ -4,7 +4,7 @@ /* */ /* FreeType renderer modules public interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftsizes.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftsizes.h index 55e0d5ccfd2..2f3958a8578 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftsizes.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftsizes.h @@ -4,7 +4,7 @@ /* */ /* FreeType size objects management (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftsnames.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftsnames.h index a7b51c2cbac..a3165405768 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftsnames.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftsnames.h @@ -2,12 +2,12 @@ /* */ /* ftsnames.h */ /* */ -/* Simple interface to access SFNT name tables (which are used */ +/* Simple interface to access SFNT `name' tables (which are used */ /* to hold font names, copyright info, notices, etc.) (specification). */ /* */ /* This is _not_ used to retrieve glyph names! */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -49,7 +49,7 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* The TrueType and OpenType specifications allow the inclusion of */ - /* a special `names table' in font files. This table contains */ + /* a special names table (`name') in font files. This table contains */ /* textual (and internationalized) information regarding the font, */ /* like family name, copyright, version, etc. */ /* */ @@ -70,30 +70,37 @@ FT_BEGIN_HEADER /* */ /* <Fields> */ /* platform_id :: The platform ID for `string'. */ + /* See @TT_PLATFORM_XXX for possible values. */ /* */ /* encoding_id :: The encoding ID for `string'. */ + /* See @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ + /* @TT_ISO_ID_XXX, @TT_MS_ID_XXX, and @TT_ADOBE_ID_XXX */ + /* for possible values. */ /* */ /* language_id :: The language ID for `string'. */ + /* See @TT_MAC_LANGID_XXX and @TT_MS_LANGID_XXX for */ + /* possible values. */ + /* */ + /* Registered OpenType values for `language_id' are */ + /* always smaller than 0x8000; values equal or larger */ + /* than 0x8000 usually indicate a language tag string */ + /* (introduced in OpenType version 1.6). Use function */ + /* @FT_Get_Sfnt_LangTag with `language_id' as its */ + /* argument to retrieve the associated language tag. */ /* */ /* name_id :: An identifier for `string'. */ + /* See @TT_NAME_ID_XXX for possible values. */ /* */ /* string :: The `name' string. Note that its format differs */ - /* depending on the (platform,encoding) pair. It can */ - /* be a Pascal String, a UTF-16 one, etc. */ - /* */ - /* Generally speaking, the string is not */ - /* zero-terminated. Please refer to the TrueType */ - /* specification for details. */ + /* depending on the (platform,encoding) pair, being */ + /* either a string of bytes (without a terminating */ + /* NULL byte) or containing UTF-16BE entities. */ /* */ /* string_len :: The length of `string' in bytes. */ /* */ /* <Note> */ - /* Possible values for `platform_id', `encoding_id', `language_id', */ - /* and `name_id' are given in the file `ttnameid.h'. For details */ - /* please refer to the TrueType or OpenType specification. */ - /* */ - /* See also @TT_PLATFORM_XXX, @TT_APPLE_ID_XXX, @TT_MAC_ID_XXX, */ - /* @TT_ISO_ID_XXX, and @TT_MS_ID_XXX. */ + /* Please refer to the TrueType or OpenType specification for more */ + /* details. */ /* */ typedef struct FT_SfntName_ { @@ -103,7 +110,7 @@ FT_BEGIN_HEADER FT_UShort name_id; FT_Byte* string; /* this string is *not* null-terminated! */ - FT_UInt string_len; /* in bytes */ + FT_UInt string_len; /* in bytes */ } FT_SfntName; @@ -147,47 +154,127 @@ FT_BEGIN_HEADER /* */ /* <Note> */ /* The `string' array returned in the `aname' structure is not */ - /* null-terminated. The application should deallocate it if it is no */ - /* longer in use. */ + /* null-terminated. Note that you don't have to deallocate `string' */ + /* by yourself; FreeType takes care of it if you call @FT_Done_Face. */ /* */ /* Use @FT_Get_Sfnt_Name_Count to get the total number of available */ /* `name' table entries, then do a loop until you get the right */ /* platform, encoding, and name ID. */ /* */ + /* `name' table format~1 entries can use language tags also, see */ + /* @FT_Get_Sfnt_LangTag. */ + /* */ FT_EXPORT( FT_Error ) FT_Get_Sfnt_Name( FT_Face face, FT_UInt idx, FT_SfntName *aname ); + /*************************************************************************/ + /* */ + /* <Struct> */ + /* FT_SfntLangTag */ + /* */ + /* <Description> */ + /* A structure to model a language tag entry from an SFNT `name' */ + /* table. */ + /* */ + /* <Fields> */ + /* string :: The language tag string, encoded in UTF-16BE */ + /* (without trailing NULL bytes). */ + /* */ + /* string_len :: The length of `string' in *bytes*. */ + /* */ + /* <Note> */ + /* Please refer to the TrueType or OpenType specification for more */ + /* details. */ + /* */ + typedef struct FT_SfntLangTag_ + { + FT_Byte* string; /* this string is *not* null-terminated! */ + FT_UInt string_len; /* in bytes */ + + } FT_SfntLangTag; + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Sfnt_LangTag */ + /* */ + /* <Description> */ + /* Retrieve the language tag associated with a language ID of an SFNT */ + /* `name' table entry. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face. */ + /* */ + /* langID :: The language ID, as returned by @FT_Get_Sfnt_Name. */ + /* This is always a value larger than 0x8000. */ + /* */ + /* <Output> */ + /* alangTag :: The language tag associated with the `name' table */ + /* entry's language ID. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + /* <Note> */ + /* The `string' array returned in the `alangTag' structure is not */ + /* null-terminated. Note that you don't have to deallocate `string' */ + /* by yourself; FreeType takes care of it if you call @FT_Done_Face. */ + /* */ + /* Only `name' table format~1 supports language tags. For format~0 */ + /* tables, this function always returns FT_Err_Invalid_Table. For */ + /* invalid format~1 language ID values, FT_Err_Invalid_Argument is */ + /* returned. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Sfnt_LangTag( FT_Face face, + FT_UInt langID, + FT_SfntLangTag *alangTag ); + + /*************************************************************************** * * @constant: - * FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY + * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY * * @description: - * A constant used as the tag of @FT_Parameter structures to make - * FT_Open_Face() ignore preferred family subfamily names in `name' - * table since OpenType version 1.4. For backwards compatibility with - * legacy systems that have a 4-face-per-family restriction. + * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic + * family names in the `name' table (introduced in OpenType version + * 1.4). Use this for backward compatibility with legacy systems that + * have a four-faces-per-family restriction. * */ -#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) +#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY \ + FT_MAKE_TAG( 'i', 'g', 'p', 'f' ) + + + /* this constant is deprecated */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY \ + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY /*************************************************************************** * * @constant: - * FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY + * FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY * * @description: - * A constant used as the tag of @FT_Parameter structures to make - * FT_Open_Face() ignore preferred subfamily names in `name' table since - * OpenType version 1.4. For backwards compatibility with legacy - * systems that have a 4-face-per-family restriction. + * A tag for @FT_Parameter to make @FT_Open_Face ignore typographic + * subfamily names in the `name' table (introduced in OpenType version + * 1.4). Use this for backward compatibility with legacy systems that + * have a four-faces-per-family restriction. * */ -#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY FT_MAKE_TAG( 'i', 'g', 'p', 's' ) +#define FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY \ + FT_MAKE_TAG( 'i', 'g', 'p', 's' ) + + + /* this constant is deprecated */ +#define FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY \ + FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY /* */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftstroke.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftstroke.h index b3b9922dada..4a20667c5e9 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftstroke.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftstroke.h @@ -4,7 +4,7 @@ /* */ /* FreeType path stroker (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -136,7 +136,7 @@ FT_BEGIN_HEADER * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line * join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias * for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for - * backwards compatibility. + * backward compatibility. */ typedef enum FT_Stroker_LineJoin_ { diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftsynth.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftsynth.h index fdfcb6912b6..1863fa2383e 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftsynth.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftsynth.h @@ -5,7 +5,7 @@ /* FreeType synthesizing code for emboldening and slanting */ /* (specification). */ /* */ -/* Copyright 2000-2016 by */ +/* Copyright 2000-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftsystem.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftsystem.h index a75f9580220..1aa4762ad65 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftsystem.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftsystem.h @@ -4,7 +4,7 @@ /* */ /* FreeType low-level system interface definition (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/fttrigon.h b/Build/source/libs/freetype2/freetype-src/include/freetype/fttrigon.h index f789b524cb8..89f0350675a 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/fttrigon.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/fttrigon.h @@ -4,7 +4,7 @@ /* */ /* FreeType trigonometric functions (specification). */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftttdrv.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftttdrv.h index 22186ee4a5a..26bc5e966ae 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftttdrv.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftttdrv.h @@ -5,7 +5,7 @@ /* FreeType API for controlling the TrueType driver */ /* (specification only). */ /* */ -/* Copyright 2013-2016 by */ +/* Copyright 2013-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -110,7 +110,7 @@ FT_BEGIN_HEADER * TrueType interpreter fully allows the advance width to be adjusted in * this mode, just the DWrite client will ignore those changes. * - * _ClearType_ _Backwards_ _Compatibility_ + * _ClearType_ _Backward_ _Compatibility_ * * This is a set of exceptions made in the TrueType interpreter to * minimize hinting techniques that were problematic with the extra @@ -118,9 +118,9 @@ FT_BEGIN_HEADER * 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 + * widths. ClearType backward 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 + * disabling some deltas. This could be worked around in backward * compatibility mode. * * _Native_ _ClearType_ _Mode_ @@ -138,7 +138,6 @@ FT_BEGIN_HEADER * interpreter-version * * @description: - * Currently, three versions are available, two representing the * bytecode interpreter with subpixel hinting support (old `Infinality' * code and new stripped-down and higher performance `minimal' code) and @@ -226,7 +225,7 @@ FT_BEGIN_HEADER * filtering. * * If FreeType has not been compiled with the configuration option - * FT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes + * TT_CONFIG_OPTION_SUBPIXEL_HINTING, selecting version~38 or~40 causes * an `FT_Err_Unimplemented_Feature' error. * * Depending on the graphics framework, Microsoft uses different diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/fttypes.h b/Build/source/libs/freetype2/freetype-src/include/freetype/fttypes.h index 2673e79c3c0..eab8adaad48 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/fttypes.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/fttypes.h @@ -4,7 +4,7 @@ /* */ /* FreeType simple types definitions (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ftwinfnt.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ftwinfnt.h index a1a715baa1a..1eeef6c8ba2 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ftwinfnt.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ftwinfnt.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for accessing Windows fnt-specific data. */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/autohint.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/autohint.h index 7ef82b8f3c0..bae83e73843 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/autohint.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/autohint.h @@ -4,7 +4,7 @@ /* */ /* High-level `autohint' module-specific interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftcalc.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftcalc.h index 8a884f680a4..c9ac9d8246d 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftcalc.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftcalc.h @@ -4,7 +4,7 @@ /* */ /* Arithmetic computations (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h index d110457157e..5dcd2b17400 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdebug.h @@ -4,7 +4,7 @@ /* */ /* Debugging and logging component (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdriver.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdriver.h index 902f02fd9d6..e82fa8d41f3 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdriver.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftdriver.h @@ -4,7 +4,7 @@ /* */ /* FreeType font driver interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftgloadr.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftgloadr.h index bebf5dbba26..f41c3df5541 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftgloadr.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftgloadr.h @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph loader (specification). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftmemory.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftmemory.h index fc33b2f50da..59e5b58a572 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftmemory.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftmemory.h @@ -4,7 +4,7 @@ /* */ /* The FreeType memory management macros (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftobjs.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftobjs.h index 25b18a53eb6..558409166dc 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftobjs.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftobjs.h @@ -4,7 +4,7 @@ /* */ /* The FreeType private base classes (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -342,6 +342,20 @@ FT_BEGIN_HEADER /* this data when first opened. This field exists only if */ /* @FT_CONFIG_OPTION_INCREMENTAL is defined. */ /* */ + /* no_stem_darkening :: */ + /* Overrides the module-level default, see @stem-darkening[cff], */ + /* for example. FALSE and TRUE toggle stem darkening on and off, */ + /* respectively, value~-1 means to use the module/driver default. */ + /* */ + /* random_seed :: */ + /* If positive, override the seed value for the CFF `random' */ + /* operator. Value~0 means to use the font's value. Value~-1 */ + /* means to use the CFF driver's default. */ + /* */ + /* lcd_weights :: */ + /* Overrides the library default with custom weights for the 5-tap */ + /* FIR filter. `{0, 0, 0, 0, 0}' means to use the library default. */ + /* */ /* refcount :: */ /* A counter initialized to~1 at the time an @FT_Face structure is */ /* created. @FT_Reference_Face increments this counter, and */ @@ -350,9 +364,9 @@ FT_BEGIN_HEADER /* */ typedef struct FT_Face_InternalRec_ { - FT_Matrix transform_matrix; - FT_Vector transform_delta; - FT_Int transform_flags; + FT_Matrix transform_matrix; + FT_Vector transform_delta; + FT_Int transform_flags; FT_ServiceCacheRec services; @@ -360,7 +374,13 @@ FT_BEGIN_HEADER FT_Incremental_InterfaceRec* incremental_interface; #endif - FT_Int refcount; + FT_Char no_stem_darkening; + FT_Int32 random_seed; +#ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING + FT_LcdFiveTapFilter lcd_weights; /* preset or custom filter weights */ +#endif + + FT_Int refcount; } FT_Face_InternalRec; @@ -413,8 +433,6 @@ FT_BEGIN_HEADER } FT_GlyphSlot_InternalRec; -#if 0 - /*************************************************************************/ /* */ /* <Struct> */ @@ -422,17 +440,25 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* This structure contains the internal fields of each FT_Size */ - /* object. Currently, it's empty. */ + /* object. */ + /* */ + /* <Fields> */ + /* module_data :: Data specific to a driver module. */ + /* */ + /* autohint_mode :: The used auto-hinting mode. */ + /* */ + /* autohint_metrics :: Metrics used by the auto-hinter. */ /* */ /*************************************************************************/ typedef struct FT_Size_InternalRec_ { - /* empty */ + void* module_data; - } FT_Size_InternalRec; + FT_Render_Mode autohint_mode; + FT_Size_Metrics autohint_metrics; -#endif + } FT_Size_InternalRec; /*************************************************************************/ @@ -775,12 +801,19 @@ FT_BEGIN_HEADER /* This hook is used by the TrueType debugger. It must be set to an */ /* alternate truetype bytecode interpreter function. */ -#define FT_DEBUG_HOOK_TRUETYPE 0 +#define FT_DEBUG_HOOK_TRUETYPE 0 typedef void (*FT_Bitmap_LcdFilterFunc)( FT_Bitmap* bitmap, FT_Render_Mode render_mode, - FT_Library library ); + FT_Byte* weights ); + + + /* This is the default LCD filter, an in-place, 5-tap FIR filter. */ + FT_BASE( void ) + ft_lcd_filter_fir( FT_Bitmap* bitmap, + FT_Render_Mode mode, + FT_LcdFiveTapFilter weights ); /*************************************************************************/ @@ -821,14 +854,17 @@ FT_BEGIN_HEADER /* handle to the current renderer for the */ /* FT_GLYPH_FORMAT_OUTLINE format. */ /* */ - /* auto_hinter :: XXX */ + /* auto_hinter :: The auto-hinter module interface. */ /* */ /* raster_pool :: The raster object's render pool. This can */ /* ideally be changed dynamically at run-time. */ /* */ /* raster_pool_size :: The size of the render pool in bytes. */ /* */ - /* debug_hooks :: XXX */ + /* debug_hooks :: An array of four function pointers that allow */ + /* debuggers to hook into a font format's */ + /* interpreter. Currently, only the TrueType */ + /* bytecode debugger uses this. */ /* */ /* lcd_filter :: If subpixel rendering is activated, the */ /* selected LCD filter mode. */ @@ -876,7 +912,7 @@ FT_BEGIN_HEADER #ifdef FT_CONFIG_OPTION_SUBPIXEL_RENDERING FT_LcdFilter lcd_filter; FT_Int lcd_extra; /* number of extra pixels */ - FT_Byte lcd_weights[5]; /* filter weights, if any */ + FT_LcdFiveTapFilter lcd_weights; /* filter weights, if any */ FT_Bitmap_LcdFilterFunc lcd_filter_func; /* filtering callback */ #endif diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftpic.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftpic.h index 6d800a08a16..0d43ed20f77 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftpic.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftpic.h @@ -4,7 +4,7 @@ /* */ /* The FreeType position independent code services (declaration). */ /* */ -/* Copyright 2009-2016 by */ +/* Copyright 2009-2017 by */ /* Oran Agra and Mickey Gabel. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftrfork.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftrfork.h index 718fa6268b3..25a44a44876 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftrfork.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftrfork.h @@ -4,7 +4,7 @@ /* */ /* Embedded resource forks accessor (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* Masatake YAMATO and Redhat K.K. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftserv.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftserv.h index 663722f84c1..71ef9cac3a1 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftserv.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftserv.h @@ -4,7 +4,7 @@ /* */ /* The FreeType services (specification only). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -306,6 +306,30 @@ FT_BEGIN_HEADER { NULL, NULL } \ }; +#define FT_DEFINE_SERVICEDESCREC9( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, \ + serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6, \ + serv_id_7, serv_data_7, \ + serv_id_8, serv_data_8, \ + serv_id_9, serv_data_9 ) \ + static const FT_ServiceDescRec class_[] = \ + { \ + { serv_id_1, serv_data_1 }, \ + { serv_id_2, serv_data_2 }, \ + { serv_id_3, serv_data_3 }, \ + { serv_id_4, serv_data_4 }, \ + { serv_id_5, serv_data_5 }, \ + { serv_id_6, serv_data_6 }, \ + { serv_id_7, serv_data_7 }, \ + { serv_id_8, serv_data_8 }, \ + { serv_id_9, serv_data_9 }, \ + { NULL, NULL } \ + }; + #else /* FT_CONFIG_OPTION_PIC */ #define FT_DEFINE_SERVICEDESCREC1( class_, \ @@ -672,6 +696,65 @@ FT_BEGIN_HEADER return FT_Err_Ok; \ } +#define FT_DEFINE_SERVICEDESCREC9( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, \ + serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6, \ + serv_id_7, serv_data_7, \ + serv_id_8, serv_data_8, \ + serv_id_9, serv_data_9 ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + \ + \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz = NULL; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 10 ) ) \ + return error; \ + \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = serv_id_5; \ + clazz[4].serv_data = serv_data_5; \ + clazz[5].serv_id = serv_id_6; \ + clazz[5].serv_data = serv_data_6; \ + clazz[6].serv_id = serv_id_7; \ + clazz[6].serv_data = serv_data_7; \ + clazz[7].serv_id = serv_id_8; \ + clazz[7].serv_data = serv_data_8; \ + clazz[8].serv_id = serv_id_9; \ + clazz[8].serv_data = serv_data_9; \ + clazz[9].serv_id = NULL; \ + clazz[9].serv_data = NULL; \ + \ + *output_class = clazz; \ + \ + return FT_Err_Ok; \ + } + #endif /* FT_CONFIG_OPTION_PIC */ @@ -714,6 +797,7 @@ FT_BEGIN_HEADER { FT_Pointer service_POSTSCRIPT_FONT_NAME; FT_Pointer service_MULTI_MASTERS; + FT_Pointer service_METRICS_VARIATIONS; FT_Pointer service_GLYPH_DICT; FT_Pointer service_PFR_METRICS; FT_Pointer service_WINFNT; @@ -734,7 +818,7 @@ FT_BEGIN_HEADER * FT_FACE_LOOKUP_SERVICE * * @description: - * This macro is used to lookup a service from a face's driver module + * This macro is used to look up a service from a face's driver module * using its cache. * * @input: diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftstream.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftstream.h index 6d048756577..3e2c07b269d 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftstream.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftstream.h @@ -4,7 +4,7 @@ /* */ /* Stream handling (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -502,7 +502,7 @@ FT_BEGIN_HEADER #define FT_STREAM_READ_AT( position, buffer, count ) \ FT_SET_ERROR( FT_Stream_ReadAt( stream, \ (FT_ULong)(position), \ - (FT_Byte*)buffer, \ + (FT_Byte*)(buffer), \ (FT_ULong)(count) ) ) #define FT_STREAM_READ_FIELDS( fields, object ) \ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/fttrace.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/fttrace.h index efb33559547..caf5fc9460b 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/fttrace.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/fttrace.h @@ -4,7 +4,7 @@ /* */ /* Tracing handling (specification only). */ /* */ -/* Copyright 2002-2016 by */ +/* Copyright 2002-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftvalid.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftvalid.h index aac92c9af88..df6f7c5778d 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftvalid.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/ftvalid.h @@ -4,7 +4,7 @@ /* */ /* FreeType validation support (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/internal.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/internal.h index 8c3c14c12a7..02046813a32 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/internal.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/internal.h @@ -4,7 +4,7 @@ /* */ /* Internal header files (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/psaux.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/psaux.h index 15dedfd28e3..935eb1a9c72 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/psaux.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/psaux.h @@ -5,7 +5,7 @@ /* Auxiliary functions and data structures related to PostScript fonts */ /* (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -817,7 +817,7 @@ FT_BEGIN_HEADER } PSAux_ServiceRec, *PSAux_Service; - /* backwards-compatible type definition */ + /* backward compatible type definition */ typedef PSAux_ServiceRec PSAux_Interface; diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/pshints.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/pshints.h index e60dc9cd558..49116eb4439 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/pshints.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/pshints.h @@ -6,7 +6,7 @@ /* recorders (specification only). These are used to support native */ /* T1/T2 hints in the `type1', `cid', and `cff' font drivers. */ /* */ -/* Copyright 2001-2016 by */ +/* Copyright 2001-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svbdf.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svbdf.h index c24475fc206..eeebf67da1a 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svbdf.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svbdf.h @@ -4,7 +4,7 @@ /* */ /* The FreeType BDF services (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svcid.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svcid.h index dbbe6044a49..cce94d8df68 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svcid.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svcid.h @@ -4,7 +4,7 @@ /* */ /* The FreeType CID font services (specification). */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* Derek Clegg and Michael Toftdal. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svfntfmt.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svfntfmt.h index bd295c9c6b4..376d9255bbe 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svfntfmt.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svfntfmt.h @@ -4,7 +4,7 @@ /* */ /* The FreeType font format service (specification only). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgldict.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgldict.h index fff29bc40cf..0cd13618d86 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgldict.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgldict.h @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph dictionary services (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgxval.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgxval.h index fb8ffba83cb..71bfa97af86 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgxval.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svgxval.h @@ -4,7 +4,7 @@ /* */ /* FreeType API for validating TrueTypeGX/AAT tables (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* Masatake YAMATO, Red Hat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svkern.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svkern.h index a636f1af1c2..b8344e96e9c 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svkern.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svkern.h @@ -4,7 +4,7 @@ /* */ /* The FreeType Kerning service (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svmetric.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svmetric.h index 7a4fed4233d..1f7d5ddd0c5 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svmetric.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svmetric.h @@ -4,7 +4,7 @@ /* */ /* The FreeType services for metrics variations (specification). */ /* */ -/* Copyright 2016 by */ +/* Copyright 2016-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -74,10 +74,8 @@ FT_BEGIN_HEADER /* MVAR */ - typedef FT_Error - (*FT_Metrics_Adjust_Func)( FT_Face face, - FT_ULong tag, - FT_Int *avalue ); + typedef void + (*FT_Metrics_Adjust_Func)( FT_Face face ); FT_DEFINE_SERVICE( MetricsVariations ) @@ -140,7 +138,7 @@ FT_BEGIN_HEADER clazz->bsb_adjust = bsb_adjust_; \ clazz->vorg_adjust = vorg_adjust_; \ clazz->metrics_adjust = metrics_adjust_; \ - }; + } #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svmm.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svmm.h index e54845a54b4..1d51cd90904 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svmm.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svmm.h @@ -4,7 +4,7 @@ /* */ /* The FreeType Multiple Masters and GX var services (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -72,6 +72,7 @@ FT_BEGIN_HEADER (*FT_Get_Var_Blend_Func)( FT_Face face, FT_UInt *num_coords, FT_Fixed* *coords, + FT_Fixed* *normalizedcoords, FT_MM_Var* *mm_var ); typedef void diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svotval.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svotval.h index bc929d4bd97..ac84abee46e 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svotval.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svotval.h @@ -4,7 +4,7 @@ /* */ /* The FreeType OpenType validation service (specification). */ /* */ -/* Copyright 2004-2016 by */ +/* Copyright 2004-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpfr.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpfr.h index d0f7c4df95a..c9a182fe39b 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpfr.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpfr.h @@ -4,7 +4,7 @@ /* */ /* Internal PFR service functions (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpostnm.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpostnm.h index f124380050c..022cdec1955 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpostnm.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpostnm.h @@ -4,7 +4,7 @@ /* */ /* The FreeType PostScript name services (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svprop.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svprop.h index 75e62446b25..eb2d4eed156 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svprop.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svprop.h @@ -4,7 +4,7 @@ /* */ /* The FreeType property service (specification). */ /* */ -/* Copyright 2012-2016 by */ +/* Copyright 2012-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpscmap.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpscmap.h index 9acc21690f3..b32122e5d6b 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpscmap.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpscmap.h @@ -4,7 +4,7 @@ /* */ /* The FreeType PostScript charmap service (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpsinfo.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpsinfo.h index f2c8060440e..0220ce529c4 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpsinfo.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svpsinfo.h @@ -4,7 +4,7 @@ /* */ /* The FreeType PostScript info service (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svsfnt.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svsfnt.h index 0f38cf195f0..49d18e43e08 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svsfnt.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svsfnt.h @@ -4,7 +4,7 @@ /* */ /* The FreeType SFNT table loading service (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svttcmap.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svttcmap.h index 772c72189e2..30f7feec71a 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svttcmap.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svttcmap.h @@ -4,7 +4,7 @@ /* */ /* The FreeType TrueType/sfnt cmap extra information service. */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* Masatake YAMATO, Redhat K.K., */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svtteng.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svtteng.h index c55061a034b..e4b368ad40f 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svtteng.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svtteng.h @@ -4,7 +4,7 @@ /* */ /* The FreeType TrueType engine query service (specification). */ /* */ -/* Copyright 2006-2016 by */ +/* Copyright 2006-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svttglyf.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svttglyf.h index c33edd46dee..b7793059fdf 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svttglyf.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svttglyf.h @@ -4,7 +4,7 @@ /* */ /* The FreeType TrueType glyph service. */ /* */ -/* Copyright 2007-2016 by */ +/* Copyright 2007-2017 by */ /* David Turner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svwinfnt.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svwinfnt.h index c2f6d4c6d39..c94b7e1073e 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svwinfnt.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/services/svwinfnt.h @@ -4,7 +4,7 @@ /* */ /* The FreeType Windows FNT/FONT service (specification). */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/sfnt.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/sfnt.h index e139315a1ff..b8667a003af 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/sfnt.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/sfnt.h @@ -4,7 +4,7 @@ /* */ /* High-level `sfnt' driver interface (specification). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -455,6 +455,37 @@ FT_BEGIN_HEADER FT_String** name ); + /*************************************************************************/ + /* */ + /* <FuncType> */ + /* TT_Get_Name_ID_Func */ + /* */ + /* <Description> */ + /* Search whether an ENGLISH version for a given name ID is in the */ + /* `name' table. */ + /* */ + /* <Input> */ + /* face :: A handle to the source face object. */ + /* */ + /* nameid :: The name id of the name record to return. */ + /* */ + /* <Out> */ + /* win :: If non-negative, an index into the `name' table with */ + /* the corresponding (3,1) or (3,0) Windows entry. */ + /* */ + /* apple :: If non-negative, an index into the `name' table with */ + /* the corresponding (1,0) Apple entry. */ + /* */ + /* <Return> */ + /* 1 if there is either a win or apple entry (or both), 0 otheriwse. */ + /* */ + typedef FT_Bool + (*TT_Get_Name_ID_Func)( TT_Face face, + FT_UShort nameid, + FT_Int *win, + FT_Int *apple ); + + /*************************************************************************/ /* */ /* <FuncType> */ @@ -588,6 +619,7 @@ FT_BEGIN_HEADER TT_Get_Metrics_Func get_metrics; TT_Get_Name_Func get_name; + TT_Get_Name_ID_Func get_name_id; } SFNT_Interface; @@ -628,7 +660,8 @@ FT_BEGIN_HEADER set_sbit_strike_, \ load_strike_metrics_, \ get_metrics_, \ - get_name_ ) \ + get_name_, \ + get_name_id_ ) \ static const SFNT_Interface class_ = \ { \ goto_table_, \ @@ -661,6 +694,7 @@ FT_BEGIN_HEADER load_strike_metrics_, \ get_metrics_, \ get_name_, \ + get_name_id_ \ }; #else /* FT_CONFIG_OPTION_PIC */ @@ -699,7 +733,8 @@ FT_BEGIN_HEADER set_sbit_strike_, \ load_strike_metrics_, \ get_metrics_, \ - get_name_ ) \ + get_name_, \ + get_name_id_ ) \ void \ FT_Init_Class_ ## class_( FT_Library library, \ SFNT_Interface* clazz ) \ @@ -736,6 +771,7 @@ FT_BEGIN_HEADER clazz->load_strike_metrics = load_strike_metrics_; \ clazz->get_metrics = get_metrics_; \ clazz->get_name = get_name_; \ + clazz->get_name_id = get_name_id_; \ } #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/t1types.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/t1types.h index 494c011fc79..b2e35d42d15 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/t1types.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/t1types.h @@ -5,7 +5,7 @@ /* Basic Type1/Type2 type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/tttypes.h b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/tttypes.h index eef3b108c2c..c0758e25fc4 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/internal/tttypes.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/internal/tttypes.h @@ -5,7 +5,7 @@ /* Basic SFNT/TrueType type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -243,7 +243,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* <Struct> */ - /* TT_NameEntryRec */ + /* TT_NameRec */ /* */ /* <Description> */ /* A structure modeling TrueType name records. Name records are used */ @@ -267,7 +267,7 @@ FT_BEGIN_HEADER /* string :: A pointer to the string's bytes. Note that these */ /* are usually UTF-16 encoded characters. */ /* */ - typedef struct TT_NameEntryRec_ + typedef struct TT_NameRec_ { FT_UShort platformID; FT_UShort encodingID; @@ -279,9 +279,39 @@ FT_BEGIN_HEADER /* this last field is not defined in the spec */ /* but used by the FreeType engine */ - FT_Byte* string; + FT_Byte* string; - } TT_NameEntryRec, *TT_NameEntry; + } TT_NameRec, *TT_Name; + + + /*************************************************************************/ + /* */ + /* <Struct> */ + /* TT_LangTagRec */ + /* */ + /* <Description> */ + /* A structure modeling language tag records in SFNT `name' tables, */ + /* introduced in OpenType version 1.6. */ + /* */ + /* <Fields> */ + /* stringLength :: The length of the string in bytes. */ + /* */ + /* stringOffset :: The offset to the string in the `name' table. */ + /* */ + /* string :: A pointer to the string's bytes. Note that these */ + /* are UTF-16BE encoded characters. */ + /* */ + typedef struct TT_LangTagRec_ + { + FT_UShort stringLength; + FT_ULong stringOffset; + + /* this last field is not defined in the spec */ + /* but used by the FreeType engine */ + + FT_Byte* string; + + } TT_LangTagRec, *TT_LangTag; /*************************************************************************/ @@ -293,24 +323,30 @@ FT_BEGIN_HEADER /* A structure modeling the TrueType name table. */ /* */ /* <Fields> */ - /* format :: The format of the name table. */ + /* format :: The format of the name table. */ + /* */ + /* numNameRecords :: The number of names in table. */ /* */ - /* numNameRecords :: The number of names in table. */ + /* storageOffset :: The offset of the name table in the `name' */ + /* TrueType table. */ /* */ - /* storageOffset :: The offset of the name table in the `name' */ - /* TrueType table. */ + /* names :: An array of name records. */ /* */ - /* names :: An array of name records. */ + /* numLangTagRecords :: The number of language tags in table. */ /* */ - /* stream :: the file's input stream. */ + /* langTags :: An array of language tag records. */ + /* */ + /* stream :: The file's input stream. */ /* */ typedef struct TT_NameTableRec_ { - FT_UShort format; - FT_UInt numNameRecords; - FT_UInt storageOffset; - TT_NameEntryRec* names; - FT_Stream stream; + FT_UShort format; + FT_UInt numNameRecords; + FT_UInt storageOffset; + TT_NameRec* names; + FT_UInt numLangTagRecords; + TT_LangTagRec* langTags; + FT_Stream stream; } TT_NameTableRec, *TT_NameTable; @@ -1084,49 +1120,8 @@ FT_BEGIN_HEADER #define TT_FACE_FLAG_VAR_BSB ( 1 << 6 ) #define TT_FACE_FLAG_VAR_VORG ( 1 << 7 ) - /* MVAR gasp data */ -#define TT_FACE_FLAG_VAR_GASP_0 ( 1 << 20 ) -#define TT_FACE_FLAG_VAR_GASP_1 ( 1 << 21 ) -#define TT_FACE_FLAG_VAR_GASP_2 ( 1 << 22 ) -#define TT_FACE_FLAG_VAR_GASP_3 ( 1 << 23 ) -#define TT_FACE_FLAG_VAR_GASP_4 ( 1 << 24 ) -#define TT_FACE_FLAG_VAR_GASP_5 ( 1 << 25 ) -#define TT_FACE_FLAG_VAR_GASP_6 ( 1 << 26 ) -#define TT_FACE_FLAG_VAR_GASP_7 ( 1 << 27 ) -#define TT_FACE_FLAG_VAR_GASP_8 ( 1 << 28 ) -#define TT_FACE_FLAG_VAR_GASP_9 ( 1 << 29 ) - - /* The following flag macros are for the field `mvar_support'. */ - - /* remaining MVAR data */ -#define TT_FACE_FLAG_VAR_CPHT ( 1 << 0 ) -#define TT_FACE_FLAG_VAR_HASC ( 1 << 1 ) -#define TT_FACE_FLAG_VAR_HCLA ( 1 << 2 ) -#define TT_FACE_FLAG_VAR_HCLD ( 1 << 3 ) -#define TT_FACE_FLAG_VAR_HCOF ( 1 << 4 ) -#define TT_FACE_FLAG_VAR_HCRN ( 1 << 5 ) -#define TT_FACE_FLAG_VAR_HCRS ( 1 << 6 ) -#define TT_FACE_FLAG_VAR_HDSC ( 1 << 7 ) -#define TT_FACE_FLAG_VAR_HLGP ( 1 << 8 ) -#define TT_FACE_FLAG_VAR_SBXO ( 1 << 9 ) -#define TT_FACE_FLAG_VAR_SBXS ( 1 << 10 ) -#define TT_FACE_FLAG_VAR_SBYO ( 1 << 11 ) -#define TT_FACE_FLAG_VAR_SBYS ( 1 << 12 ) -#define TT_FACE_FLAG_VAR_SPXO ( 1 << 13 ) -#define TT_FACE_FLAG_VAR_SPXS ( 1 << 14 ) -#define TT_FACE_FLAG_VAR_SPYO ( 1 << 15 ) -#define TT_FACE_FLAG_VAR_SPYS ( 1 << 16 ) -#define TT_FACE_FLAG_VAR_STRO ( 1 << 17 ) -#define TT_FACE_FLAG_VAR_STRS ( 1 << 18 ) -#define TT_FACE_FLAG_VAR_UNDO ( 1 << 19 ) -#define TT_FACE_FLAG_VAR_UNDS ( 1 << 20 ) -#define TT_FACE_FLAG_VAR_VASC ( 1 << 21 ) -#define TT_FACE_FLAG_VAR_VCOF ( 1 << 22 ) -#define TT_FACE_FLAG_VAR_VCRN ( 1 << 23 ) -#define TT_FACE_FLAG_VAR_VCRS ( 1 << 24 ) -#define TT_FACE_FLAG_VAR_VDSC ( 1 << 25 ) -#define TT_FACE_FLAG_VAR_VLGP ( 1 << 26 ) -#define TT_FACE_FLAG_VAR_XHGT ( 1 << 27 ) + /* MVAR */ +#define TT_FACE_FLAG_VAR_MVAR ( 1 << 8 ) /*************************************************************************/ @@ -1295,6 +1290,8 @@ FT_BEGIN_HEADER /* */ /* glyf_offset :: The file offset of the `glyf' table. */ /* */ + /* is_cff2 :: Set if the font format is CFF2. */ + /* */ /* doblend :: A boolean which is set if the font should */ /* be blended (this is for GX var). */ /* */ @@ -1312,8 +1309,14 @@ FT_BEGIN_HEADER /* For example, TT_FACE_FLAG_VAR_FVAR is only */ /* set if we have at least one design axis. */ /* */ - /* mvar_support :: Flags that indicate which metrics */ - /* variations are supported. */ + /* var_postscript_prefix :: */ + /* The PostScript name prefix needed for */ + /* constructing a variation font instance's */ + /* PS name . */ + /* */ + /* var_postscript_prefix_len :: */ + /* The length of the `var_postscript_prefix' */ + /* string. */ /* */ /* horz_metrics_size :: The size of the `hmtx' table. */ /* */ @@ -1344,7 +1347,7 @@ FT_BEGIN_HEADER /* */ /* sbit_table_size :: The size of `sbit_table'. */ /* */ - /* sbit_table_type :: The sbit table type (CBLC, SBIX, etc.). */ + /* sbit_table_type :: The sbit table type (CBLC, sbix, etc.). */ /* */ /* sbit_num_strikes :: The number of sbit strikes exposed by */ /* FreeType's API, omitting invalid strikes. */ @@ -1380,7 +1383,7 @@ FT_BEGIN_HEADER /* */ /* sph_compatibility_mode :: */ /* This flag is set if we are in ClearType */ - /* backwards compatibility mode (used by the */ + /* backward compatibility mode (used by the */ /* v38 implementation of the bytecode */ /* interpreter). */ /* */ @@ -1465,7 +1468,7 @@ FT_BEGIN_HEADER /***********************************************************************/ /* */ - /* TrueType-specific fields (ignored by the OTF-Type2 driver) */ + /* TrueType-specific fields (ignored by the CFF driver) */ /* */ /***********************************************************************/ @@ -1500,7 +1503,7 @@ FT_BEGIN_HEADER FT_ULong glyf_len; FT_ULong glyf_offset; /* since 2.7.1 */ - FT_Bool isCFF2; /* since 2.7.1 */ + FT_Bool is_cff2; /* since 2.7.1 */ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT FT_Bool doblend; @@ -1508,7 +1511,10 @@ FT_BEGIN_HEADER FT_Bool is_default_instance; /* since 2.7.1 */ FT_UInt32 variation_support; /* since 2.7.1 */ - FT_UInt32 mvar_support; /* since 2.7.1 */ + + const char* var_postscript_prefix; /* since 2.7.2 */ + FT_UInt var_postscript_prefix_len; /* since 2.7.2 */ + #endif /* since version 2.2 */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/t1tables.h b/Build/source/libs/freetype2/freetype-src/include/freetype/t1tables.h index e272324ba29..3f6b36e1089 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/t1tables.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/t1tables.h @@ -5,7 +5,7 @@ /* Basic Type 1/Type 2 tables definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -291,7 +291,7 @@ FT_BEGIN_HEADER } PS_DesignMapRec, *PS_DesignMap; - /* backwards-compatible definition */ + /* backward compatible definition */ typedef PS_DesignMapRec T1_DesignMap; @@ -326,7 +326,7 @@ FT_BEGIN_HEADER } PS_BlendRec, *PS_Blend; - /* backwards-compatible definition */ + /* backward compatible definition */ typedef PS_BlendRec T1_Blend; diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ttnameid.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ttnameid.h index ce707f1645b..494d6771868 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ttnameid.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ttnameid.h @@ -4,7 +4,7 @@ /* */ /* TrueType name ID definitions (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -36,7 +36,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* Possible values for the `platform' identifier code in the name */ - /* records of the TTF `name' table. */ + /* records of an SFNT `name' table. */ /* */ /*************************************************************************/ @@ -119,14 +119,19 @@ FT_BEGIN_HEADER * TT_APPLE_ID_VARIANT_SELECTOR :: * From Adobe, not Apple. Not a normal cmap. Specifies variations * on a real cmap. + * + * TT_APPLE_ID_FULL_UNICODE :: + * Used for fallback fonts that provide complete Unicode coverage with + * a type~13 cmap. */ -#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ -#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ -#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ -#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ +#define TT_APPLE_ID_DEFAULT 0 /* Unicode 1.0 */ +#define TT_APPLE_ID_UNICODE_1_1 1 /* specify Hangul at U+34xx */ +#define TT_APPLE_ID_ISO_10646 2 /* deprecated */ +#define TT_APPLE_ID_UNICODE_2_0 3 /* or later */ #define TT_APPLE_ID_UNICODE_32 4 /* 2.0 or later, full repertoire */ -#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */ +#define TT_APPLE_ID_VARIANT_SELECTOR 5 /* variation selector data */ +#define TT_APPLE_ID_FULL_UNICODE 6 /* used with type 13 cmaps */ /*********************************************************************** @@ -137,42 +142,6 @@ FT_BEGIN_HEADER * @description: * A list of valid values for the `encoding_id' for * @TT_PLATFORM_MACINTOSH charmaps and name entries. - * - * @values: - * TT_MAC_ID_ROMAN :: - * TT_MAC_ID_JAPANESE :: - * TT_MAC_ID_TRADITIONAL_CHINESE :: - * TT_MAC_ID_KOREAN :: - * TT_MAC_ID_ARABIC :: - * TT_MAC_ID_HEBREW :: - * TT_MAC_ID_GREEK :: - * TT_MAC_ID_RUSSIAN :: - * TT_MAC_ID_RSYMBOL :: - * TT_MAC_ID_DEVANAGARI :: - * TT_MAC_ID_GURMUKHI :: - * TT_MAC_ID_GUJARATI :: - * TT_MAC_ID_ORIYA :: - * TT_MAC_ID_BENGALI :: - * TT_MAC_ID_TAMIL :: - * TT_MAC_ID_TELUGU :: - * TT_MAC_ID_KANNADA :: - * TT_MAC_ID_MALAYALAM :: - * TT_MAC_ID_SINHALESE :: - * TT_MAC_ID_BURMESE :: - * TT_MAC_ID_KHMER :: - * TT_MAC_ID_THAI :: - * TT_MAC_ID_LAOTIAN :: - * TT_MAC_ID_GEORGIAN :: - * TT_MAC_ID_ARMENIAN :: - * TT_MAC_ID_MALDIVIAN :: - * TT_MAC_ID_SIMPLIFIED_CHINESE :: - * TT_MAC_ID_TIBETAN :: - * TT_MAC_ID_MONGOLIAN :: - * TT_MAC_ID_GEEZ :: - * TT_MAC_ID_SLAVIC :: - * TT_MAC_ID_VIETNAMESE :: - * TT_MAC_ID_SINDHI :: - * TT_MAC_ID_UNINTERP :: */ #define TT_MAC_ID_ROMAN 0 @@ -247,44 +216,47 @@ FT_BEGIN_HEADER * * @values: * TT_MS_ID_SYMBOL_CS :: - * Corresponds to Microsoft symbol encoding. See - * @FT_ENCODING_MS_SYMBOL. + * Microsoft symbol encoding. See @FT_ENCODING_MS_SYMBOL. * * TT_MS_ID_UNICODE_CS :: - * Corresponds to a Microsoft WGL4 charmap, matching Unicode. See + * Microsoft WGL4 charmap, matching Unicode. See * @FT_ENCODING_UNICODE. * * TT_MS_ID_SJIS :: - * Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS. + * Shift JIS Japanese encoding. See @FT_ENCODING_SJIS. * - * TT_MS_ID_GB2312 :: - * Corresponds to Simplified Chinese as used in Mainland China. See - * @FT_ENCODING_GB2312. + * TT_MS_ID_PRC :: + * Chinese encodings as used in the People's Republic of China (PRC). + * This means the encodings GB~2312 and its supersets GBK and + * GB~18030. See @FT_ENCODING_PRC. * * TT_MS_ID_BIG_5 :: - * Corresponds to Traditional Chinese as used in Taiwan and Hong Kong. - * See @FT_ENCODING_BIG5. + * Traditional Chinese as used in Taiwan and Hong Kong. See + * @FT_ENCODING_BIG5. * * TT_MS_ID_WANSUNG :: - * Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG. + * Korean Extended Wansung encoding. See @FT_ENCODING_WANSUNG. * * TT_MS_ID_JOHAB :: - * Corresponds to Johab encoding. See @FT_ENCODING_JOHAB. + * Korean Johab encoding. See @FT_ENCODING_JOHAB. * * TT_MS_ID_UCS_4 :: - * Corresponds to UCS-4 or UTF-32 charmaps. This has been added to - * the OpenType specification version 1.4 (mid-2001.) + * UCS-4 or UTF-32 charmaps. This has been added to the OpenType + * specification version 1.4 (mid-2001). */ #define TT_MS_ID_SYMBOL_CS 0 #define TT_MS_ID_UNICODE_CS 1 #define TT_MS_ID_SJIS 2 -#define TT_MS_ID_GB2312 3 +#define TT_MS_ID_PRC 3 #define TT_MS_ID_BIG_5 4 #define TT_MS_ID_WANSUNG 5 #define TT_MS_ID_JOHAB 6 #define TT_MS_ID_UCS_4 10 + /* this value is deprecated */ +#define TT_MS_ID_GB2312 TT_MS_ID_PRC + /*********************************************************************** * @@ -312,17 +284,22 @@ FT_BEGIN_HEADER #define TT_ADOBE_ID_LATIN_1 3 - /*************************************************************************/ - /* */ - /* Possible values of the language identifier field in the name records */ - /* of the TTF `name' table if the `platform' identifier code is */ - /* TT_PLATFORM_MACINTOSH. These values are also used as return values */ - /* for function @FT_Get_CMap_Language_ID. */ - /* */ - /* The canonical source for the Apple assigned Language ID's is at */ - /* */ - /* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html */ - /* */ + /*********************************************************************** + * + * @enum: + * TT_MAC_LANGID_XXX + * + * @description: + * Possible values of the language identifier field in the name records + * of the SFNT `name' table if the `platform' identifier code is + * @TT_PLATFORM_MACINTOSH. These values are also used as return values + * for function @FT_Get_CMap_Language_ID. + * + * The canonical source for Apple's IDs is + * + * https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html + */ + #define TT_MAC_LANGID_ENGLISH 0 #define TT_MAC_LANGID_FRENCH 1 #define TT_MAC_LANGID_GERMAN 2 @@ -433,15 +410,6 @@ FT_BEGIN_HEADER #define TT_MAC_LANGID_JAVANESE 138 #define TT_MAC_LANGID_SUNDANESE 139 - -#if 0 /* these seem to be errors that have been dropped */ - -#define TT_MAC_LANGID_SCOTTISH_GAELIC 140 -#define TT_MAC_LANGID_IRISH_GAELIC 141 - -#endif - - /* The following codes are new as of 2000-03-10 */ #define TT_MAC_LANGID_GALICIAN 140 #define TT_MAC_LANGID_AFRIKAANS 141 @@ -456,18 +424,30 @@ FT_BEGIN_HEADER #define TT_MAC_LANGID_AZERBAIJANI_ROMAN_SCRIPT 150 - /*************************************************************************/ - /* */ - /* Possible values of the language identifier field in the name records */ - /* of the TTF `name' table if the `platform' identifier code is */ - /* TT_PLATFORM_MICROSOFT. */ - /* */ - /* The canonical source for the MS assigned LCIDs is */ - /* */ - /* http://www.microsoft.com/globaldev/reference/lcid-all.mspx */ - /* */ + /*********************************************************************** + * + * @enum: + * TT_MS_LANGID_XXX + * + * @description: + * Possible values of the language identifier field in the name records + * of the SFNT `name' table if the `platform' identifier code is + * @TT_PLATFORM_MICROSOFT. These values are also used as return values + * for function @FT_Get_CMap_Language_ID. + * + * The canonical source for Microsoft's IDs is + * + * http://www.microsoft.com/globaldev/reference/lcid-all.mspx , + * + * however, we only provide macros for language identifiers present in + * the OpenType specification: Microsoft has abandoned the concept of + * LCIDs (language code identifiers), and format~1 of the `name' table + * provides a better mechanism for languages not covered here. + * + * More legacy values not listed in the reference can be found in the + * @FT_TRUETYPE_IDS_H header file. + */ -#define TT_MS_LANGID_ARABIC_GENERAL 0x0001 #define TT_MS_LANGID_ARABIC_SAUDI_ARABIA 0x0401 #define TT_MS_LANGID_ARABIC_IRAQ 0x0801 #define TT_MS_LANGID_ARABIC_EGYPT 0x0C01 @@ -485,39 +465,20 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_ARABIC_BAHRAIN 0x3C01 #define TT_MS_LANGID_ARABIC_QATAR 0x4001 #define TT_MS_LANGID_BULGARIAN_BULGARIA 0x0402 -#define TT_MS_LANGID_CATALAN_SPAIN 0x0403 -#define TT_MS_LANGID_CHINESE_GENERAL 0x0004 +#define TT_MS_LANGID_CATALAN_CATALAN 0x0403 #define TT_MS_LANGID_CHINESE_TAIWAN 0x0404 #define TT_MS_LANGID_CHINESE_PRC 0x0804 #define TT_MS_LANGID_CHINESE_HONG_KONG 0x0C04 #define TT_MS_LANGID_CHINESE_SINGAPORE 0x1004 - -#if 1 /* this looks like the correct value */ -#define TT_MS_LANGID_CHINESE_MACAU 0x1404 -#else /* but beware, Microsoft may change its mind... - the most recent Word reference has the following: */ -#define TT_MS_LANGID_CHINESE_MACAU TT_MS_LANGID_CHINESE_HONG_KONG -#endif - -#if 0 /* used only with .NET `cultures'; commented out */ -#define TT_MS_LANGID_CHINESE_TRADITIONAL 0x7C04 -#endif - +#define TT_MS_LANGID_CHINESE_MACAO 0x1404 #define TT_MS_LANGID_CZECH_CZECH_REPUBLIC 0x0405 #define TT_MS_LANGID_DANISH_DENMARK 0x0406 #define TT_MS_LANGID_GERMAN_GERMANY 0x0407 #define TT_MS_LANGID_GERMAN_SWITZERLAND 0x0807 #define TT_MS_LANGID_GERMAN_AUSTRIA 0x0C07 #define TT_MS_LANGID_GERMAN_LUXEMBOURG 0x1007 -#define TT_MS_LANGID_GERMAN_LIECHTENSTEI 0x1407 +#define TT_MS_LANGID_GERMAN_LIECHTENSTEIN 0x1407 #define TT_MS_LANGID_GREEK_GREECE 0x0408 - - /* don't ask what this one means... It is commented out currently. */ -#if 0 -#define TT_MS_LANGID_GREEK_GREECE2 0x2008 -#endif - -#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 #define TT_MS_LANGID_ENGLISH_UNITED_STATES 0x0409 #define TT_MS_LANGID_ENGLISH_UNITED_KINGDOM 0x0809 #define TT_MS_LANGID_ENGLISH_AUSTRALIA 0x0C09 @@ -531,14 +492,12 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_ENGLISH_TRINIDAD 0x2C09 #define TT_MS_LANGID_ENGLISH_ZIMBABWE 0x3009 #define TT_MS_LANGID_ENGLISH_PHILIPPINES 0x3409 -#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 -#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09 #define TT_MS_LANGID_ENGLISH_INDIA 0x4009 #define TT_MS_LANGID_ENGLISH_MALAYSIA 0x4409 #define TT_MS_LANGID_ENGLISH_SINGAPORE 0x4809 #define TT_MS_LANGID_SPANISH_SPAIN_TRADITIONAL_SORT 0x040A #define TT_MS_LANGID_SPANISH_MEXICO 0x080A -#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT 0x0C0A +#define TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT 0x0C0A #define TT_MS_LANGID_SPANISH_GUATEMALA 0x100A #define TT_MS_LANGID_SPANISH_COSTA_RICA 0x140A #define TT_MS_LANGID_SPANISH_PANAMA 0x180A @@ -557,9 +516,6 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_SPANISH_NICARAGUA 0x4C0A #define TT_MS_LANGID_SPANISH_PUERTO_RICO 0x500A #define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540A - /* The following ID blatantly violate MS specs by using a */ - /* sublanguage > 0x1F. */ -#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU #define TT_MS_LANGID_FINNISH_FINLAND 0x040B #define TT_MS_LANGID_FRENCH_FRANCE 0x040C #define TT_MS_LANGID_FRENCH_BELGIUM 0x080C @@ -567,27 +523,13 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_FRENCH_SWITZERLAND 0x100C #define TT_MS_LANGID_FRENCH_LUXEMBOURG 0x140C #define TT_MS_LANGID_FRENCH_MONACO 0x180C -#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C -#define TT_MS_LANGID_FRENCH_REUNION 0x200C -#define TT_MS_LANGID_FRENCH_CONGO 0x240C - /* which was formerly: */ -#define TT_MS_LANGID_FRENCH_ZAIRE TT_MS_LANGID_FRENCH_CONGO -#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C -#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C -#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C -#define TT_MS_LANGID_FRENCH_MALI 0x340C -#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C -#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C - /* and another violation of the spec (see 0xE40AU) */ -#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU #define TT_MS_LANGID_HEBREW_ISRAEL 0x040D #define TT_MS_LANGID_HUNGARIAN_HUNGARY 0x040E #define TT_MS_LANGID_ICELANDIC_ICELAND 0x040F #define TT_MS_LANGID_ITALIAN_ITALY 0x0410 #define TT_MS_LANGID_ITALIAN_SWITZERLAND 0x0810 #define TT_MS_LANGID_JAPANESE_JAPAN 0x0411 -#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA 0x0412 -#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 +#define TT_MS_LANGID_KOREAN_KOREA 0x0412 #define TT_MS_LANGID_DUTCH_NETHERLANDS 0x0413 #define TT_MS_LANGID_DUTCH_BELGIUM 0x0813 #define TT_MS_LANGID_NORWEGIAN_NORWAY_BOKMAL 0x0414 @@ -595,26 +537,17 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_POLISH_POLAND 0x0415 #define TT_MS_LANGID_PORTUGUESE_BRAZIL 0x0416 #define TT_MS_LANGID_PORTUGUESE_PORTUGAL 0x0816 -#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND 0x0417 +#define TT_MS_LANGID_ROMANSH_SWITZERLAND 0x0417 #define TT_MS_LANGID_ROMANIAN_ROMANIA 0x0418 -#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 #define TT_MS_LANGID_RUSSIAN_RUSSIA 0x0419 -#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 #define TT_MS_LANGID_CROATIAN_CROATIA 0x041A #define TT_MS_LANGID_SERBIAN_SERBIA_LATIN 0x081A #define TT_MS_LANGID_SERBIAN_SERBIA_CYRILLIC 0x0C1A - -#if 0 /* this used to be this value, but it looks like we were wrong */ -#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x101A -#else /* current sources say */ #define TT_MS_LANGID_CROATIAN_BOSNIA_HERZEGOVINA 0x101A #define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZEGOVINA 0x141A - /* and XPsp2 Platform SDK added (2004-07-26) */ - /* Names are shortened to be significant within 40 chars. */ #define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_LATIN 0x181A -#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x181A -#endif - +#define TT_MS_LANGID_SERBIAN_BOSNIA_HERZ_CYRILLIC 0x1C1A +#define TT_MS_LANGID_BOSNIAN_BOSNIA_HERZ_CYRILLIC 0x201A #define TT_MS_LANGID_SLOVAK_SLOVAKIA 0x041B #define TT_MS_LANGID_ALBANIAN_ALBANIA 0x041C #define TT_MS_LANGID_SWEDISH_SWEDEN 0x041D @@ -622,36 +555,30 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_THAI_THAILAND 0x041E #define TT_MS_LANGID_TURKISH_TURKEY 0x041F #define TT_MS_LANGID_URDU_PAKISTAN 0x0420 -#define TT_MS_LANGID_URDU_INDIA 0x0820 #define TT_MS_LANGID_INDONESIAN_INDONESIA 0x0421 #define TT_MS_LANGID_UKRAINIAN_UKRAINE 0x0422 #define TT_MS_LANGID_BELARUSIAN_BELARUS 0x0423 -#define TT_MS_LANGID_SLOVENE_SLOVENIA 0x0424 +#define TT_MS_LANGID_SLOVENIAN_SLOVENIA 0x0424 #define TT_MS_LANGID_ESTONIAN_ESTONIA 0x0425 #define TT_MS_LANGID_LATVIAN_LATVIA 0x0426 #define TT_MS_LANGID_LITHUANIAN_LITHUANIA 0x0427 -#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 #define TT_MS_LANGID_TAJIK_TAJIKISTAN 0x0428 -#define TT_MS_LANGID_FARSI_IRAN 0x0429 #define TT_MS_LANGID_VIETNAMESE_VIET_NAM 0x042A #define TT_MS_LANGID_ARMENIAN_ARMENIA 0x042B #define TT_MS_LANGID_AZERI_AZERBAIJAN_LATIN 0x042C #define TT_MS_LANGID_AZERI_AZERBAIJAN_CYRILLIC 0x082C -#define TT_MS_LANGID_BASQUE_SPAIN 0x042D -#define TT_MS_LANGID_SORBIAN_GERMANY 0x042E +#define TT_MS_LANGID_BASQUE_BASQUE 0x042D +#define TT_MS_LANGID_UPPER_SORBIAN_GERMANY 0x042E +#define TT_MS_LANGID_LOWER_SORBIAN_GERMANY 0x082E #define TT_MS_LANGID_MACEDONIAN_MACEDONIA 0x042F -#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 -#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 -#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA 0x0432 -#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 -#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA 0x0434 -#define TT_MS_LANGID_ZULU_SOUTH_AFRICA 0x0435 +#define TT_MS_LANGID_SETSWANA_SOUTH_AFRICA 0x0432 +#define TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA 0x0434 +#define TT_MS_LANGID_ISIZULU_SOUTH_AFRICA 0x0435 #define TT_MS_LANGID_AFRIKAANS_SOUTH_AFRICA 0x0436 #define TT_MS_LANGID_GEORGIAN_GEORGIA 0x0437 #define TT_MS_LANGID_FAEROESE_FAEROE_ISLANDS 0x0438 #define TT_MS_LANGID_HINDI_INDIA 0x0439 #define TT_MS_LANGID_MALTESE_MALTA 0x043A - /* Added by XPsp2 Platform SDK (2004-07-26) */ #define TT_MS_LANGID_SAMI_NORTHERN_NORWAY 0x043B #define TT_MS_LANGID_SAMI_NORTHERN_SWEDEN 0x083B #define TT_MS_LANGID_SAMI_NORTHERN_FINLAND 0x0C3B @@ -661,37 +588,21 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_SAMI_SOUTHERN_SWEDEN 0x1C3B #define TT_MS_LANGID_SAMI_SKOLT_FINLAND 0x203B #define TT_MS_LANGID_SAMI_INARI_FINLAND 0x243B - /* ... and we also keep our old identifier... */ -#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B - -#if 0 /* this seems to be a previous inversion */ -#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C -#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C -#else -#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C -#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C -#endif - -#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D +#define TT_MS_LANGID_IRISH_IRELAND 0x083C #define TT_MS_LANGID_MALAY_MALAYSIA 0x043E #define TT_MS_LANGID_MALAY_BRUNEI_DARUSSALAM 0x083E -#define TT_MS_LANGID_KAZAK_KAZAKSTAN 0x043F -#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN /* Cyrillic*/ 0x0440 - /* alias declared in Windows 2000 */ -#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ - TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN - -#define TT_MS_LANGID_SWAHILI_KENYA 0x0441 +#define TT_MS_LANGID_KAZAKH_KAZAKHSTAN 0x043F +#define TT_MS_LANGID_KYRGYZ_KYRGYZSTAN /* Cyrillic*/ 0x0440 +#define TT_MS_LANGID_KISWAHILI_KENYA 0x0441 #define TT_MS_LANGID_TURKMEN_TURKMENISTAN 0x0442 #define TT_MS_LANGID_UZBEK_UZBEKISTAN_LATIN 0x0443 #define TT_MS_LANGID_UZBEK_UZBEKISTAN_CYRILLIC 0x0843 -#define TT_MS_LANGID_TATAR_TATARSTAN 0x0444 +#define TT_MS_LANGID_TATAR_RUSSIA 0x0444 #define TT_MS_LANGID_BENGALI_INDIA 0x0445 #define TT_MS_LANGID_BENGALI_BANGLADESH 0x0845 #define TT_MS_LANGID_PUNJABI_INDIA 0x0446 -#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846 #define TT_MS_LANGID_GUJARATI_INDIA 0x0447 -#define TT_MS_LANGID_ORIYA_INDIA 0x0448 +#define TT_MS_LANGID_ODIA_INDIA 0x0448 #define TT_MS_LANGID_TAMIL_INDIA 0x0449 #define TT_MS_LANGID_TELUGU_INDIA 0x044A #define TT_MS_LANGID_KANNADA_INDIA 0x044B @@ -700,142 +611,241 @@ FT_BEGIN_HEADER #define TT_MS_LANGID_MARATHI_INDIA 0x044E #define TT_MS_LANGID_SANSKRIT_INDIA 0x044F #define TT_MS_LANGID_MONGOLIAN_MONGOLIA /* Cyrillic */ 0x0450 -#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN 0x0850 -#define TT_MS_LANGID_TIBETAN_CHINA 0x0451 - /* Don't use the next constant! It has */ - /* (1) the wrong spelling (Dzonghka) */ - /* (2) Microsoft doesn't officially define it -- */ - /* at least it is not in the List of Local */ - /* ID Values. */ - /* (3) Dzongkha is not the same language as */ - /* Tibetan, so merging it is wrong anyway. */ - /* */ - /* TT_MS_LANGID_TIBETAN_BHUTAN is correct, BTW. */ -#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851 - -#if 0 - /* the following used to be defined */ -#define TT_MS_LANGID_TIBETAN_BHUTAN 0x0451 - /* ... but it was changed; */ -#else - /* So we will continue to #define it, but with the correct value */ -#define TT_MS_LANGID_TIBETAN_BHUTAN TT_MS_LANGID_DZONGHKA_BHUTAN -#endif - -#define TT_MS_LANGID_WELSH_WALES 0x0452 +#define TT_MS_LANGID_MONGOLIAN_PRC 0x0850 +#define TT_MS_LANGID_TIBETAN_PRC 0x0451 +#define TT_MS_LANGID_WELSH_UNITED_KINGDOM 0x0452 #define TT_MS_LANGID_KHMER_CAMBODIA 0x0453 #define TT_MS_LANGID_LAO_LAOS 0x0454 -#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455 -#define TT_MS_LANGID_GALICIAN_SPAIN 0x0456 +#define TT_MS_LANGID_GALICIAN_GALICIAN 0x0456 #define TT_MS_LANGID_KONKANI_INDIA 0x0457 -#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458 -#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 -#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 - /* Missing a LCID for Sindhi in Devanagari script */ #define TT_MS_LANGID_SYRIAC_SYRIA 0x045A -#define TT_MS_LANGID_SINHALESE_SRI_LANKA 0x045B -#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C +#define TT_MS_LANGID_SINHALA_SRI_LANKA 0x045B #define TT_MS_LANGID_INUKTITUT_CANADA 0x045D +#define TT_MS_LANGID_INUKTITUT_CANADA_LATIN 0x085D #define TT_MS_LANGID_AMHARIC_ETHIOPIA 0x045E -#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F -#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN 0x085F - /* Missing a LCID for Tifinagh script */ -#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 - /* Spelled this way by XPsp2 Platform SDK (2004-07-26) */ - /* script is yet unclear... might be Arabic, Nagari or Sharada */ -#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860 - /* ... and aliased (by MS) for compatibility reasons. */ -#define TT_MS_LANGID_KASHMIRI_INDIA TT_MS_LANGID_KASHMIRI_SASIA +#define TT_MS_LANGID_TAMAZIGHT_ALGERIA 0x085F #define TT_MS_LANGID_NEPALI_NEPAL 0x0461 -#define TT_MS_LANGID_NEPALI_INDIA 0x0861 #define TT_MS_LANGID_FRISIAN_NETHERLANDS 0x0462 #define TT_MS_LANGID_PASHTO_AFGHANISTAN 0x0463 #define TT_MS_LANGID_FILIPINO_PHILIPPINES 0x0464 #define TT_MS_LANGID_DHIVEHI_MALDIVES 0x0465 - /* alias declared in Windows 2000 */ -#define TT_MS_LANGID_DIVEHI_MALDIVES TT_MS_LANGID_DHIVEHI_MALDIVES -#define TT_MS_LANGID_EDO_NIGERIA 0x0466 -#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 #define TT_MS_LANGID_HAUSA_NIGERIA 0x0468 -#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 #define TT_MS_LANGID_YORUBA_NIGERIA 0x046A #define TT_MS_LANGID_QUECHUA_BOLIVIA 0x046B #define TT_MS_LANGID_QUECHUA_ECUADOR 0x086B #define TT_MS_LANGID_QUECHUA_PERU 0x0C6B -#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA 0x046C - /* Also spelled by XPsp2 Platform SDK (2004-07-26) */ -#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \ - TT_MS_LANGID_SEPEDI_SOUTH_AFRICA - /* language codes 0x046D, 0x046E and 0x046F are (still) unknown. */ +#define TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA 0x046C +#define TT_MS_LANGID_BASHKIR_RUSSIA 0x046D +#define TT_MS_LANGID_LUXEMBOURGISH_LUXEMBOURG 0x046E +#define TT_MS_LANGID_GREENLANDIC_GREENLAND 0x046F #define TT_MS_LANGID_IGBO_NIGERIA 0x0470 +#define TT_MS_LANGID_YI_PRC 0x0478 +#define TT_MS_LANGID_MAPUDUNGUN_CHILE 0x047A +#define TT_MS_LANGID_MOHAWK_MOHAWK 0x047C +#define TT_MS_LANGID_BRETON_FRANCE 0x047E +#define TT_MS_LANGID_UIGHUR_PRC 0x0480 +#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 +#define TT_MS_LANGID_OCCITAN_FRANCE 0x0482 +#define TT_MS_LANGID_CORSICAN_FRANCE 0x0483 +#define TT_MS_LANGID_ALSATIAN_FRANCE 0x0484 +#define TT_MS_LANGID_YAKUT_RUSSIA 0x0485 +#define TT_MS_LANGID_KICHE_GUATEMALA 0x0486 +#define TT_MS_LANGID_KINYARWANDA_RWANDA 0x0487 +#define TT_MS_LANGID_WOLOF_SENEGAL 0x0488 +#define TT_MS_LANGID_DARI_AFGHANISTAN 0x048C + + /* */ + + + /* legacy macro definitions not present in OpenType 1.8.1 */ +#define TT_MS_LANGID_ARABIC_GENERAL 0x0001 +#define TT_MS_LANGID_CATALAN_SPAIN \ + TT_MS_LANGID_CATALAN_CATALAN +#define TT_MS_LANGID_CHINESE_GENERAL 0x0004 +#define TT_MS_LANGID_CHINESE_MACAU \ + TT_MS_LANGID_CHINESE_MACAO +#define TT_MS_LANGID_GERMAN_LIECHTENSTEI \ + TT_MS_LANGID_GERMAN_LIECHTENSTEIN +#define TT_MS_LANGID_ENGLISH_GENERAL 0x0009 +#define TT_MS_LANGID_ENGLISH_INDONESIA 0x3809 +#define TT_MS_LANGID_ENGLISH_HONG_KONG 0x3C09 +#define TT_MS_LANGID_SPANISH_SPAIN_INTERNATIONAL_SORT \ + TT_MS_LANGID_SPANISH_SPAIN_MODERN_SORT +#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40AU +#define TT_MS_LANGID_FRENCH_WEST_INDIES 0x1C0C +#define TT_MS_LANGID_FRENCH_REUNION 0x200C +#define TT_MS_LANGID_FRENCH_CONGO 0x240C + /* which was formerly: */ +#define TT_MS_LANGID_FRENCH_ZAIRE \ + TT_MS_LANGID_FRENCH_CONGO +#define TT_MS_LANGID_FRENCH_SENEGAL 0x280C +#define TT_MS_LANGID_FRENCH_CAMEROON 0x2C0C +#define TT_MS_LANGID_FRENCH_COTE_D_IVOIRE 0x300C +#define TT_MS_LANGID_FRENCH_MALI 0x340C +#define TT_MS_LANGID_FRENCH_MOROCCO 0x380C +#define TT_MS_LANGID_FRENCH_HAITI 0x3C0C +#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40CU +#define TT_MS_LANGID_KOREAN_EXTENDED_WANSUNG_KOREA \ + TT_MS_LANGID_KOREAN_KOREA +#define TT_MS_LANGID_KOREAN_JOHAB_KOREA 0x0812 +#define TT_MS_LANGID_RHAETO_ROMANIC_SWITZERLAND \ + TT_MS_LANGID_ROMANSH_SWITZERLAND +#define TT_MS_LANGID_MOLDAVIAN_MOLDAVIA 0x0818 +#define TT_MS_LANGID_RUSSIAN_MOLDAVIA 0x0819 +#define TT_MS_LANGID_URDU_INDIA 0x0820 +#define TT_MS_LANGID_CLASSIC_LITHUANIAN_LITHUANIA 0x0827 +#define TT_MS_LANGID_SLOVENE_SLOVENIA \ + TT_MS_LANGID_SLOVENIAN_SLOVENIA +#define TT_MS_LANGID_FARSI_IRAN 0x0429 +#define TT_MS_LANGID_BASQUE_SPAIN \ + TT_MS_LANGID_BASQUE_BASQUE +#define TT_MS_LANGID_SORBIAN_GERMANY \ + TT_MS_LANGID_UPPER_SORBIAN_GERMANY +#define TT_MS_LANGID_SUTU_SOUTH_AFRICA 0x0430 +#define TT_MS_LANGID_TSONGA_SOUTH_AFRICA 0x0431 +#define TT_MS_LANGID_TSWANA_SOUTH_AFRICA \ + TT_MS_LANGID_SETSWANA_SOUTH_AFRICA +#define TT_MS_LANGID_VENDA_SOUTH_AFRICA 0x0433 +#define TT_MS_LANGID_XHOSA_SOUTH_AFRICA \ + TT_MS_LANGID_ISIXHOSA_SOUTH_AFRICA +#define TT_MS_LANGID_ZULU_SOUTH_AFRICA \ + TT_MS_LANGID_ISIZULU_SOUTH_AFRICA +#define TT_MS_LANGID_SAAMI_LAPONIA 0x043B + /* the next two values are incorrectly inverted */ +#define TT_MS_LANGID_IRISH_GAELIC_IRELAND 0x043C +#define TT_MS_LANGID_SCOTTISH_GAELIC_UNITED_KINGDOM 0x083C +#define TT_MS_LANGID_YIDDISH_GERMANY 0x043D +#define TT_MS_LANGID_KAZAK_KAZAKSTAN \ + TT_MS_LANGID_KAZAKH_KAZAKHSTAN +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZ_REPUBLIC \ + TT_MS_LANGID_KYRGYZ_KYRGYZSTAN +#define TT_MS_LANGID_KIRGHIZ_KIRGHIZSTAN \ + TT_MS_LANGID_KYRGYZ_KYRGYZSTAN +#define TT_MS_LANGID_SWAHILI_KENYA \ + TT_MS_LANGID_KISWAHILI_KENYA +#define TT_MS_LANGID_TATAR_TATARSTAN \ + TT_MS_LANGID_TATAR_RUSSIA +#define TT_MS_LANGID_PUNJABI_ARABIC_PAKISTAN 0x0846 +#define TT_MS_LANGID_ORIYA_INDIA \ + TT_MS_LANGID_ODIA_INDIA +#define TT_MS_LANGID_MONGOLIAN_MONGOLIA_MONGOLIAN \ + TT_MS_LANGID_MONGOLIAN_PRC +#define TT_MS_LANGID_TIBETAN_CHINA \ + TT_MS_LANGID_TIBETAN_PRC +#define TT_MS_LANGID_DZONGHKA_BHUTAN 0x0851 +#define TT_MS_LANGID_TIBETAN_BHUTAN \ + TT_MS_LANGID_DZONGHKA_BHUTAN +#define TT_MS_LANGID_WELSH_WALES \ + TT_MS_LANGID_WELSH_UNITED_KINGDOM +#define TT_MS_LANGID_BURMESE_MYANMAR 0x0455 +#define TT_MS_LANGID_GALICIAN_SPAIN \ + TT_MS_LANGID_GALICIAN_GALICIAN +#define TT_MS_LANGID_MANIPURI_INDIA /* Bengali */ 0x0458 +#define TT_MS_LANGID_SINDHI_INDIA /* Arabic */ 0x0459 +#define TT_MS_LANGID_SINDHI_PAKISTAN 0x0859 +#define TT_MS_LANGID_SINHALESE_SRI_LANKA \ + TT_MS_LANGID_SINHALA_SRI_LANKA +#define TT_MS_LANGID_CHEROKEE_UNITED_STATES 0x045C +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO /* Arabic */ 0x045F +#define TT_MS_LANGID_TAMAZIGHT_MOROCCO_LATIN \ + TT_MS_LANGID_TAMAZIGHT_ALGERIA +#define TT_MS_LANGID_KASHMIRI_PAKISTAN /* Arabic */ 0x0460 +#define TT_MS_LANGID_KASHMIRI_SASIA 0x0860 +#define TT_MS_LANGID_KASHMIRI_INDIA \ + TT_MS_LANGID_KASHMIRI_SASIA +#define TT_MS_LANGID_NEPALI_INDIA 0x0861 +#define TT_MS_LANGID_DIVEHI_MALDIVES \ + TT_MS_LANGID_DHIVEHI_MALDIVES +#define TT_MS_LANGID_EDO_NIGERIA 0x0466 +#define TT_MS_LANGID_FULFULDE_NIGERIA 0x0467 +#define TT_MS_LANGID_IBIBIO_NIGERIA 0x0469 +#define TT_MS_LANGID_SEPEDI_SOUTH_AFRICA \ + TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA +#define TT_MS_LANGID_SOTHO_SOUTHERN_SOUTH_AFRICA \ + TT_MS_LANGID_SESOTHO_SA_LEBOA_SOUTH_AFRICA #define TT_MS_LANGID_KANURI_NIGERIA 0x0471 #define TT_MS_LANGID_OROMO_ETHIOPIA 0x0472 #define TT_MS_LANGID_TIGRIGNA_ETHIOPIA 0x0473 #define TT_MS_LANGID_TIGRIGNA_ERYTHREA 0x0873 - /* also spelled in the `Passport SDK' list as: */ -#define TT_MS_LANGID_TIGRIGNA_ERYTREA TT_MS_LANGID_TIGRIGNA_ERYTHREA +#define TT_MS_LANGID_TIGRIGNA_ERYTREA \ + TT_MS_LANGID_TIGRIGNA_ERYTHREA #define TT_MS_LANGID_GUARANI_PARAGUAY 0x0474 #define TT_MS_LANGID_HAWAIIAN_UNITED_STATES 0x0475 #define TT_MS_LANGID_LATIN 0x0476 #define TT_MS_LANGID_SOMALI_SOMALIA 0x0477 - /* Note: Yi does not have a (proper) ISO 639-2 code, since it is mostly */ - /* not written (but OTOH the peculiar writing system is worth */ - /* studying). */ -#define TT_MS_LANGID_YI_CHINA 0x0478 +#define TT_MS_LANGID_YI_CHINA \ + TT_MS_LANGID_YI_PRC #define TT_MS_LANGID_PAPIAMENTU_NETHERLANDS_ANTILLES 0x0479 - /* language codes from 0x047A to 0x047F are (still) unknown. */ -#define TT_MS_LANGID_UIGHUR_CHINA 0x0480 -#define TT_MS_LANGID_MAORI_NEW_ZEALAND 0x0481 +#define TT_MS_LANGID_UIGHUR_CHINA \ + TT_MS_LANGID_UIGHUR_PRC -#if 0 /* not deemed useful for fonts */ -#define TT_MS_LANGID_HUMAN_INTERFACE_DEVICE 0x04FF -#endif + /*********************************************************************** + * + * @enum: + * TT_NAME_ID_XXX + * + * @description: + * Possible values of the `name' identifier field in the name records of + * an SFNT `name' table. These values are platform independent. + */ - /*************************************************************************/ - /* */ - /* Possible values of the `name' identifier field in the name records of */ - /* the TTF `name' table. These values are platform independent. */ - /* */ -#define TT_NAME_ID_COPYRIGHT 0 -#define TT_NAME_ID_FONT_FAMILY 1 -#define TT_NAME_ID_FONT_SUBFAMILY 2 -#define TT_NAME_ID_UNIQUE_ID 3 -#define TT_NAME_ID_FULL_NAME 4 -#define TT_NAME_ID_VERSION_STRING 5 -#define TT_NAME_ID_PS_NAME 6 -#define TT_NAME_ID_TRADEMARK 7 +#define TT_NAME_ID_COPYRIGHT 0 +#define TT_NAME_ID_FONT_FAMILY 1 +#define TT_NAME_ID_FONT_SUBFAMILY 2 +#define TT_NAME_ID_UNIQUE_ID 3 +#define TT_NAME_ID_FULL_NAME 4 +#define TT_NAME_ID_VERSION_STRING 5 +#define TT_NAME_ID_PS_NAME 6 +#define TT_NAME_ID_TRADEMARK 7 /* the following values are from the OpenType spec */ -#define TT_NAME_ID_MANUFACTURER 8 -#define TT_NAME_ID_DESIGNER 9 -#define TT_NAME_ID_DESCRIPTION 10 -#define TT_NAME_ID_VENDOR_URL 11 -#define TT_NAME_ID_DESIGNER_URL 12 -#define TT_NAME_ID_LICENSE 13 -#define TT_NAME_ID_LICENSE_URL 14 +#define TT_NAME_ID_MANUFACTURER 8 +#define TT_NAME_ID_DESIGNER 9 +#define TT_NAME_ID_DESCRIPTION 10 +#define TT_NAME_ID_VENDOR_URL 11 +#define TT_NAME_ID_DESIGNER_URL 12 +#define TT_NAME_ID_LICENSE 13 +#define TT_NAME_ID_LICENSE_URL 14 /* number 15 is reserved */ -#define TT_NAME_ID_PREFERRED_FAMILY 16 -#define TT_NAME_ID_PREFERRED_SUBFAMILY 17 -#define TT_NAME_ID_MAC_FULL_NAME 18 +#define TT_NAME_ID_TYPOGRAPHIC_FAMILY 16 +#define TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY 17 +#define TT_NAME_ID_MAC_FULL_NAME 18 /* The following code is new as of 2000-01-21 */ -#define TT_NAME_ID_SAMPLE_TEXT 19 +#define TT_NAME_ID_SAMPLE_TEXT 19 /* This is new in OpenType 1.3 */ -#define TT_NAME_ID_CID_FINDFONT_NAME 20 +#define TT_NAME_ID_CID_FINDFONT_NAME 20 /* This is new in OpenType 1.5 */ -#define TT_NAME_ID_WWS_FAMILY 21 -#define TT_NAME_ID_WWS_SUBFAMILY 22 +#define TT_NAME_ID_WWS_FAMILY 21 +#define TT_NAME_ID_WWS_SUBFAMILY 22 + /* This is new in OpenType 1.7 */ +#define TT_NAME_ID_LIGHT_BACKGROUND 23 +#define TT_NAME_ID_DARK_BACKGROUND 24 - /*************************************************************************/ - /* */ - /* Bit mask values for the Unicode Ranges from the TTF `OS2 ' table. */ - /* */ - /* Updated 08-Nov-2008. */ - /* */ + /* This is new in OpenType 1.8 */ +#define TT_NAME_ID_VARIATIONS_PREFIX 25 + + /* these two values are deprecated */ +#define TT_NAME_ID_PREFERRED_FAMILY TT_NAME_ID_TYPOGRAPHIC_FAMILY +#define TT_NAME_ID_PREFERRED_SUBFAMILY TT_NAME_ID_TYPOGRAPHIC_SUBFAMILY + + + /*********************************************************************** + * + * @enum: + * TT_UCR_XXX + * + * @description: + * Possible bit mask values for the `ulUnicodeRangeX' fields in an SFNT + * `OS/2' table. + */ + + /* ulUnicodeRange1 */ + /* --------------- */ /* Bit 0 Basic Latin */ #define TT_UCR_BASIC_LATIN (1L << 0) /* U+0020-U+007E */ @@ -857,7 +867,7 @@ FT_BEGIN_HEADER /* U+A700-U+A71F */ /* Bit 6 Combining Diacritical Marks */ /* Combining Diacritical Marks Supplement */ -#define TT_UCR_COMBINING_DIACRITICS (1L << 6) /* U+0300-U+036F */ +#define TT_UCR_COMBINING_DIACRITICAL_MARKS (1L << 6) /* U+0300-U+036F */ /* U+1DC0-U+1DFF */ /* Bit 7 Greek and Coptic */ #define TT_UCR_GREEK (1L << 7) /* U+0370-U+03FF */ @@ -925,12 +935,17 @@ FT_BEGIN_HEADER /* Supplemental Punctuation */ #define TT_UCR_GENERAL_PUNCTUATION (1L << 31) /* U+2000-U+206F */ /* U+2E00-U+2E7F */ + + /* ulUnicodeRange2 */ + /* --------------- */ + /* Bit 32 Superscripts And Subscripts */ #define TT_UCR_SUPERSCRIPTS_SUBSCRIPTS (1L << 0) /* U+2070-U+209F */ /* Bit 33 Currency Symbols */ #define TT_UCR_CURRENCY_SYMBOLS (1L << 1) /* U+20A0-U+20CF */ /* Bit 34 Combining Diacritical Marks For Symbols */ -#define TT_UCR_COMBINING_DIACRITICS_SYMB (1L << 2) /* U+20D0-U+20FF */ +#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ + (1L << 2) /* U+20D0-U+20FF */ /* Bit 35 Letterlike Symbols */ #define TT_UCR_LETTERLIKE_SYMBOLS (1L << 3) /* U+2100-U+214F */ /* Bit 36 Number Forms */ @@ -996,13 +1011,13 @@ FT_BEGIN_HEADER /* Bit 57 High Surrogates */ /* High Private Use Surrogates */ /* Low Surrogates */ - /* */ + /* According to OpenType specs v.1.3+, */ /* setting bit 57 implies that there is */ /* at least one codepoint beyond the */ /* Basic Multilingual Plane that is */ /* supported by this font. So it really */ - /* means >= U+10000 */ + /* means >= U+10000. */ #define TT_UCR_SURROGATES (1L << 25) /* U+D800-U+DB7F */ /* U+DB80-U+DBFF */ /* U+DC00-U+DFFF */ @@ -1034,7 +1049,11 @@ FT_BEGIN_HEADER /* Bit 62 Alphabetic Presentation Forms */ #define TT_UCR_ALPHABETIC_PRESENTATION_FORMS (1L << 30) /* U+FB00-U+FB4F */ /* Bit 63 Arabic Presentation Forms-A */ -#define TT_UCR_ARABIC_PRESENTATIONS_A (1L << 31) /* U+FB50-U+FDFF */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_A (1L << 31) /* U+FB50-U+FDFF */ + + /* ulUnicodeRange3 */ + /* --------------- */ + /* Bit 64 Combining Half Marks */ #define TT_UCR_COMBINING_HALF_MARKS (1L << 0) /* U+FE20-U+FE2F */ /* Bit 65 Vertical forms */ @@ -1044,7 +1063,7 @@ FT_BEGIN_HEADER /* Bit 66 Small Form Variants */ #define TT_UCR_SMALL_FORM_VARIANTS (1L << 2) /* U+FE50-U+FE6F */ /* Bit 67 Arabic Presentation Forms-B */ -#define TT_UCR_ARABIC_PRESENTATIONS_B (1L << 3) /* U+FE70-U+FEFE */ +#define TT_UCR_ARABIC_PRESENTATION_FORMS_B (1L << 3) /* U+FE70-U+FEFE */ /* Bit 68 Halfwidth and Fullwidth Forms */ #define TT_UCR_HALFWIDTH_FULLWIDTH_FORMS (1L << 4) /* U+FF00-U+FFEF */ /* Bit 69 Specials */ @@ -1123,6 +1142,10 @@ FT_BEGIN_HEADER #define TT_UCR_TAI_LE (1L << 30) /* U+1950-U+197F */ /* Bit 95 New Tai Lue */ #define TT_UCR_NEW_TAI_LUE (1L << 31) /* U+1980-U+19DF */ + + /* ulUnicodeRange4 */ + /* --------------- */ + /* Bit 96 Buginese */ #define TT_UCR_BUGINESE (1L << 0) /* U+1A00-U+1A1F */ /* Bit 97 Glagolitic */ @@ -1191,42 +1214,18 @@ FT_BEGIN_HEADER /*U+1F000-U+1F02F*/ /* Bit 123-127 Reserved for process-internal usage */ + /* */ - /*************************************************************************/ - /* */ - /* Some compilers have a very limited length of identifiers. */ - /* */ -#if defined( __TURBOC__ ) && __TURBOC__ < 0x0410 || defined( __PACIFIC__ ) -#define HAVE_LIMIT_ON_IDENTS -#endif - - -#ifndef HAVE_LIMIT_ON_IDENTS - - - /*************************************************************************/ - /* */ - /* Here some alias #defines in order to be clearer. */ - /* */ - /* These are not always #defined to stay within the 31~character limit, */ - /* which some compilers have. */ - /* */ - /* Credits go to Dave Hoo <dhoo@flash.net> for pointing out that modern */ - /* Borland compilers (read: from BC++ 3.1 on) can increase this limit. */ - /* If you get a warning with such a compiler, use the -i40 switch. */ - /* */ -#define TT_UCR_ARABIC_PRESENTATION_FORMS_A \ - TT_UCR_ARABIC_PRESENTATIONS_A -#define TT_UCR_ARABIC_PRESENTATION_FORMS_B \ - TT_UCR_ARABIC_PRESENTATIONS_B - -#define TT_UCR_COMBINING_DIACRITICAL_MARKS \ - TT_UCR_COMBINING_DIACRITICS -#define TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB \ - TT_UCR_COMBINING_DIACRITICS_SYMB - + /* for backward compatibility with older FreeType versions */ +#define TT_UCR_ARABIC_PRESENTATION_A \ + TT_UCR_ARABIC_PRESENTATION_FORMS_A +#define TT_UCR_ARABIC_PRESENTATION_B \ + TT_UCR_ARABIC_PRESENTATION_FORMS_B -#endif /* !HAVE_LIMIT_ON_IDENTS */ +#define TT_UCR_COMBINING_DIACRITICS \ + TT_UCR_COMBINING_DIACRITICAL_MARKS +#define TT_UCR_COMBINING_DIACRITICS_SYMB \ + TT_UCR_COMBINING_DIACRITICAL_MARKS_SYMB FT_END_HEADER diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/tttables.h b/Build/source/libs/freetype2/freetype-src/include/freetype/tttables.h index 1c075dcf66a..58312044cad 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/tttables.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/tttables.h @@ -5,7 +5,7 @@ /* Basic SFNT/TrueType tables definitions and interface */ /* (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -45,8 +45,9 @@ FT_BEGIN_HEADER /* TrueType specific table types and functions. */ /* */ /* <Description> */ - /* This section contains the definition of TrueType-specific tables */ - /* as well as some routines used to access and process them. */ + /* This section contains definitions of some basic tables specific to */ + /* TrueType and OpenType as well as some routines used to access and */ + /* process them. */ /* */ /* <Order> */ /* TT_Header */ @@ -76,8 +77,8 @@ FT_BEGIN_HEADER /* TT_Header */ /* */ /* <Description> */ - /* A structure used to model a TrueType font header table. All */ - /* fields follow the TrueType specification. */ + /* A structure to model a TrueType font header table. All fields */ + /* follow the OpenType specification. */ /* */ typedef struct TT_Header_ { @@ -114,9 +115,9 @@ FT_BEGIN_HEADER /* TT_HoriHeader */ /* */ /* <Description> */ - /* A structure used to model a TrueType horizontal header, the `hhea' */ + /* A structure to model a TrueType horizontal header, the `hhea' */ /* table, as well as the corresponding horizontal metrics table, */ - /* i.e., the `hmtx' table. */ + /* `hmtx'. */ /* */ /* <Fields> */ /* Version :: The table version. */ @@ -131,7 +132,7 @@ FT_BEGIN_HEADER /* glyphs found in the font (maybe ASCII). */ /* */ /* You should use the `sTypoAscender' field */ - /* of the OS/2 table instead if you want */ + /* of the `OS/2' table instead if you want */ /* the correct one. */ /* */ /* Descender :: The font's descender, i.e., the distance */ @@ -145,7 +146,7 @@ FT_BEGIN_HEADER /* glyphs found in the font (maybe ASCII). */ /* */ /* You should use the `sTypoDescender' */ - /* field of the OS/2 table instead if you */ + /* field of the `OS/2' table instead if you */ /* want the correct one. */ /* */ /* Line_Gap :: The font's line gap, i.e., the distance */ @@ -175,6 +176,8 @@ FT_BEGIN_HEADER /* caret_Slope_Run :: The run coefficient of the cursor's */ /* slope. */ /* */ + /* caret_Offset :: The cursor's offset for slanted fonts. */ + /* */ /* Reserved :: 8~reserved bytes. */ /* */ /* metric_Data_Format :: Always~0. */ @@ -188,13 +191,10 @@ FT_BEGIN_HEADER /* short_metrics :: A pointer into the `hmtx' table. */ /* */ /* <Note> */ - /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ - /* be identical except for the names of their fields, */ - /* which are different. */ - /* */ - /* This ensures that a single function in the `ttload' */ - /* module is able to read both the horizontal and vertical */ - /* headers. */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `caret_Slope_Rise', */ + /* `caret_Slope_Run', and `caret_Offset'. */ /* */ typedef struct TT_HoriHeader_ { @@ -217,9 +217,9 @@ FT_BEGIN_HEADER FT_Short metric_Data_Format; FT_UShort number_Of_HMetrics; - /* The following fields are not defined by the TrueType specification */ + /* The following fields are not defined by the OpenType specification */ /* but they are used to connect the metrics header to the relevant */ - /* `HMTX' table. */ + /* `hmtx' table. */ void* long_metrics; void* short_metrics; @@ -234,8 +234,8 @@ FT_BEGIN_HEADER /* */ /* <Description> */ /* A structure used to model a TrueType vertical header, the `vhea' */ - /* table, as well as the corresponding vertical metrics table, i.e., */ - /* the `vmtx' table. */ + /* table, as well as the corresponding vertical metrics table, */ + /* `vmtx'. */ /* */ /* <Fields> */ /* Version :: The table version. */ @@ -251,8 +251,8 @@ FT_BEGIN_HEADER /* ASCII). */ /* */ /* You should use the `sTypoAscender' */ - /* field of the OS/2 table instead if you */ - /* want the correct one. */ + /* field of the `OS/2' table instead if */ + /* you want the correct one. */ /* */ /* Descender :: The font's descender, i.e., the */ /* distance from the baseline to the */ @@ -266,8 +266,8 @@ FT_BEGIN_HEADER /* ASCII). */ /* */ /* You should use the `sTypoDescender' */ - /* field of the OS/2 table instead if you */ - /* want the correct one. */ + /* field of the `OS/2' table instead if */ + /* you want the correct one. */ /* */ /* Line_Gap :: The font's line gap, i.e., the distance */ /* to add to the ascender and descender to */ @@ -297,30 +297,26 @@ FT_BEGIN_HEADER /* slope. */ /* */ /* caret_Offset :: The cursor's offset for slanted fonts. */ - /* This value is `reserved' in vmtx */ - /* version 1.0. */ /* */ /* Reserved :: 8~reserved bytes. */ /* */ /* metric_Data_Format :: Always~0. */ /* */ - /* number_Of_HMetrics :: Number of VMetrics entries in the */ + /* number_Of_VMetrics :: Number of VMetrics entries in the */ /* `vmtx' table -- this value can be */ /* smaller than the total number of glyphs */ /* in the font. */ /* */ - /* long_metrics :: A pointer into the `vmtx' table. */ + /* long_metrics :: A pointer into the `vmtx' table. */ /* */ - /* short_metrics :: A pointer into the `vmtx' table. */ + /* short_metrics :: A pointer into the `vmtx' table. */ /* */ /* <Note> */ - /* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */ - /* be identical except for the names of their fields, */ - /* which are different. */ - /* */ - /* This ensures that a single function in the `ttload' */ - /* module is able to read both the horizontal and vertical */ - /* headers. */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `Ascender', */ + /* `Descender', `Line_Gap', `caret_Slope_Rise', `caret_Slope_Run', */ + /* and `caret_Offset'. */ /* */ typedef struct TT_VertHeader_ { @@ -331,9 +327,9 @@ FT_BEGIN_HEADER FT_UShort advance_Height_Max; /* advance height maximum */ - FT_Short min_Top_Side_Bearing; /* minimum left-sb or top-sb */ - FT_Short min_Bottom_Side_Bearing; /* minimum right-sb or bottom-sb */ - FT_Short yMax_Extent; /* xmax or ymax extents */ + FT_Short min_Top_Side_Bearing; /* minimum top-sb */ + FT_Short min_Bottom_Side_Bearing; /* minimum bottom-sb */ + FT_Short yMax_Extent; /* ymax extents */ FT_Short caret_Slope_Rise; FT_Short caret_Slope_Run; FT_Short caret_Offset; @@ -343,9 +339,9 @@ FT_BEGIN_HEADER FT_Short metric_Data_Format; FT_UShort number_Of_VMetrics; - /* The following fields are not defined by the TrueType specification */ - /* but they're used to connect the metrics header to the relevant */ - /* `HMTX' or `VMTX' table. */ + /* The following fields are not defined by the OpenType specification */ + /* but they are used to connect the metrics header to the relevant */ + /* `vmtx' table. */ void* long_metrics; void* short_metrics; @@ -359,12 +355,28 @@ FT_BEGIN_HEADER /* TT_OS2 */ /* */ /* <Description> */ - /* A structure used to model a TrueType OS/2 table. All fields */ - /* comply to the OpenType specification. */ + /* A structure to model a TrueType `OS/2' table. All fields comply */ + /* to the OpenType specification. */ + /* */ + /* Note that we now support old Mac fonts that do not include an */ + /* `OS/2' table. In this case, the `version' field is always set to */ + /* 0xFFFF. */ /* */ - /* Note that we now support old Mac fonts that do not include an OS/2 */ - /* table. In this case, the `version' field is always set to 0xFFFF. */ + /* <Note> */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `sCapHeight', */ + /* `sTypoAscender', `sTypoDescender', `sTypoLineGap', `sxHeight', */ + /* `usWinAscent', `usWinDescent', `yStrikeoutPosition', */ + /* `yStrikeoutSize', `ySubscriptXOffset', `ySubScriptXSize', */ + /* `ySubscriptYOffset', `ySubscriptYSize', `ySuperscriptXOffset', */ + /* `ySuperscriptXSize', `ySuperscriptYOffset', and */ + /* `ySuperscriptYSize'. */ + /* */ + /* Possible values for bits in the `ulUnicodeRangeX' fields are given */ + /* by the @TT_UCR_XXX macros. */ /* */ + typedef struct TT_OS2_ { FT_UShort version; /* 0x0001 - more or 0xFFFF */ @@ -429,10 +441,16 @@ FT_BEGIN_HEADER /* TT_Postscript */ /* */ /* <Description> */ - /* A structure used to model a TrueType PostScript table. All fields */ - /* comply to the TrueType specification. This structure does not */ - /* reference the PostScript glyph names, which can be nevertheless */ - /* accessed with the `ttpost' module. */ + /* A structure to model a TrueType `post' table. All fields comply */ + /* to the OpenType specification. This structure does not reference */ + /* a font's PostScript glyph names; use @FT_Get_Glyph_Name to */ + /* retrieve them. */ + /* */ + /* <Note> */ + /* For an OpenType variation font, the values of the following fields */ + /* can change after a call to @FT_Set_Var_Design_Coordinates (and */ + /* friends) if the font contains an `MVAR' table: `underlinePosition' */ + /* and `underlineThickness'. */ /* */ typedef struct TT_Postscript_ { @@ -446,8 +464,8 @@ FT_BEGIN_HEADER FT_ULong minMemType1; FT_ULong maxMemType1; - /* Glyph names follow in the file, but we don't */ - /* load them by default. See the ttpost.c file. */ + /* Glyph names follow in the `post' table, but we don't */ + /* load them by default. */ } TT_Postscript; @@ -458,8 +476,8 @@ FT_BEGIN_HEADER /* TT_PCLT */ /* */ /* <Description> */ - /* A structure used to model a TrueType PCLT table. All fields */ - /* comply to the TrueType specification. */ + /* A structure to model a TrueType `PCLT' table. All fields comply */ + /* to the OpenType specification. */ /* */ typedef struct TT_PCLT_ { @@ -488,9 +506,9 @@ FT_BEGIN_HEADER /* TT_MaxProfile */ /* */ /* <Description> */ - /* The maximum profile is a table containing many max values, which */ - /* can be used to pre-allocate arrays. This ensures that no memory */ - /* allocation occurs during a glyph load. */ + /* The maximum profile (`maxp') table contains many max values, which */ + /* can be used to pre-allocate arrays for speeding up glyph loading */ + /* and hinting. */ /* */ /* <Fields> */ /* version :: The version number. */ @@ -500,21 +518,19 @@ FT_BEGIN_HEADER /* */ /* maxPoints :: The maximum number of points in a */ /* non-composite TrueType glyph. See also */ - /* the structure element */ /* `maxCompositePoints'. */ /* */ /* maxContours :: The maximum number of contours in a */ /* non-composite TrueType glyph. See also */ - /* the structure element */ /* `maxCompositeContours'. */ /* */ /* maxCompositePoints :: The maximum number of points in a */ - /* composite TrueType glyph. See also the */ - /* structure element `maxPoints'. */ + /* composite TrueType glyph. See also */ + /* `maxPoints'. */ /* */ /* maxCompositeContours :: The maximum number of contours in a */ - /* composite TrueType glyph. See also the */ - /* structure element `maxContours'. */ + /* composite TrueType glyph. See also */ + /* `maxContours'. */ /* */ /* maxZones :: The maximum number of zones used for */ /* glyph hinting. */ @@ -575,8 +591,9 @@ FT_BEGIN_HEADER /* FT_Sfnt_Tag */ /* */ /* <Description> */ - /* An enumeration used to specify the index of an SFNT table. */ - /* Used in the @FT_Get_Sfnt_Table API function. */ + /* An enumeration to specify indices of SFNT tables loaded and parsed */ + /* by FreeType during initialization of an SFNT font. Used in the */ + /* @FT_Get_Sfnt_Table API function. */ /* */ /* <Values> */ /* FT_SFNT_HEAD :: To access the font's @TT_Header structure. */ @@ -624,7 +641,7 @@ FT_BEGIN_HEADER /* FT_Get_Sfnt_Table */ /* */ /* <Description> */ - /* Return a pointer to a given SFNT table within a face. */ + /* Return a pointer to a given SFNT table stored within a face. */ /* */ /* <Input> */ /* face :: A handle to the source. */ @@ -632,7 +649,7 @@ FT_BEGIN_HEADER /* tag :: The index of the SFNT table. */ /* */ /* <Return> */ - /* A type-less pointer to the table. This will be~0 in case of */ + /* A type-less pointer to the table. This will be NULL in case of */ /* error, or if the corresponding table was not found *OR* loaded */ /* from the file. */ /* */ @@ -661,70 +678,70 @@ FT_BEGIN_HEADER FT_Sfnt_Tag tag ); - /************************************************************************** - * - * @function: - * FT_Load_Sfnt_Table - * - * @description: - * Load any font table into client memory. - * - * @input: - * face :: - * A handle to the source face. - * - * tag :: - * The four-byte tag of the table to load. Use the value~0 if you want - * to access the whole font file. Otherwise, you can use one of the - * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new - * one with @FT_MAKE_TAG. - * - * offset :: - * The starting offset in the table (or file if tag == 0). - * - * @output: - * buffer :: - * The target buffer address. The client must ensure that the memory - * array is big enough to hold the data. - * - * @inout: - * length :: - * If the `length' parameter is NULL, then try to load the whole table. - * Return an error code if it fails. - * - * Else, if `*length' is~0, exit immediately while returning the - * table's (or file) full size in it. - * - * Else the number of bytes to read from the table or file, from the - * starting offset. - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * If you need to determine the table's length you should first call this - * function with `*length' set to~0, as in the following example: - * - * { - * FT_ULong length = 0; - * - * - * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); - * if ( error ) { ... table does not exist ... } - * - * buffer = malloc( length ); - * if ( buffer == NULL ) { ... not enough memory ... } - * - * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); - * if ( error ) { ... could not load table ... } - * } - * - * Note that structures like @TT_Header or @TT_OS2 can't be used with - * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that - * those structures depend on the processor architecture, with varying - * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian). - * - */ + /************************************************************************** + * + * @function: + * FT_Load_Sfnt_Table + * + * @description: + * Load any SFNT font table into client memory. + * + * @input: + * face :: + * A handle to the source face. + * + * tag :: + * The four-byte tag of the table to load. Use value~0 if you want + * to access the whole font file. Otherwise, you can use one of the + * definitions found in the @FT_TRUETYPE_TAGS_H file, or forge a new + * one with @FT_MAKE_TAG. + * + * offset :: + * The starting offset in the table (or file if tag~==~0). + * + * @output: + * buffer :: + * The target buffer address. The client must ensure that the memory + * array is big enough to hold the data. + * + * @inout: + * length :: + * If the `length' parameter is NULL, try to load the whole table. + * Return an error code if it fails. + * + * Else, if `*length' is~0, exit immediately while returning the + * table's (or file) full size in it. + * + * Else the number of bytes to read from the table or file, from the + * starting offset. + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * If you need to determine the table's length you should first call this + * function with `*length' set to~0, as in the following example: + * + * { + * FT_ULong length = 0; + * + * + * error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length ); + * if ( error ) { ... table does not exist ... } + * + * buffer = malloc( length ); + * if ( buffer == NULL ) { ... not enough memory ... } + * + * error = FT_Load_Sfnt_Table( face, tag, 0, buffer, &length ); + * if ( error ) { ... could not load table ... } + * } + * + * Note that structures like @TT_Header or @TT_OS2 can't be used with + * this function; they are limited to @FT_Get_Sfnt_Table. Reason is that + * those structures depend on the processor architecture, with varying + * size (e.g. 32bit vs. 64bit) or order (big endian vs. little endian). + * + */ FT_EXPORT( FT_Error ) FT_Load_Sfnt_Table( FT_Face face, FT_ULong tag, @@ -733,41 +750,41 @@ FT_BEGIN_HEADER FT_ULong* length ); - /************************************************************************** - * - * @function: - * FT_Sfnt_Table_Info - * - * @description: - * Return information on an SFNT table. - * - * @input: - * face :: - * A handle to the source face. - * - * table_index :: - * The index of an SFNT table. The function returns - * FT_Err_Table_Missing for an invalid value. - * - * @inout: - * tag :: - * The name tag of the SFNT table. If the value is NULL, `table_index' - * is ignored, and `length' returns the number of SFNT tables in the - * font. - * - * @output: - * length :: - * The length of the SFNT table (or the number of SFNT tables, depending - * on `tag'). - * - * @return: - * FreeType error code. 0~means success. - * - * @note: - * While parsing fonts, FreeType handles SFNT tables with length zero as - * missing. - * - */ + /************************************************************************** + * + * @function: + * FT_Sfnt_Table_Info + * + * @description: + * Return information on an SFNT table. + * + * @input: + * face :: + * A handle to the source face. + * + * table_index :: + * The index of an SFNT table. The function returns + * FT_Err_Table_Missing for an invalid value. + * + * @inout: + * tag :: + * The name tag of the SFNT table. If the value is NULL, `table_index' + * is ignored, and `length' returns the number of SFNT tables in the + * font. + * + * @output: + * length :: + * The length of the SFNT table (or the number of SFNT tables, depending + * on `tag'). + * + * @return: + * FreeType error code. 0~means success. + * + * @note: + * While parsing fonts, FreeType handles SFNT tables with length zero as + * missing. + * + */ FT_EXPORT( FT_Error ) FT_Sfnt_Table_Info( FT_Face face, FT_UInt table_index, @@ -781,16 +798,16 @@ FT_BEGIN_HEADER /* FT_Get_CMap_Language_ID */ /* */ /* <Description> */ - /* Return TrueType/sfnt specific cmap language ID. Definitions of */ - /* language ID values are in `ttnameid.h'. */ + /* Return cmap language ID as specified in the OpenType standard. */ + /* Definitions of language ID values are in file @FT_TRUETYPE_IDS_H. */ /* */ /* <Input> */ /* charmap :: */ /* The target charmap. */ /* */ /* <Return> */ - /* The language ID of `charmap'. If `charmap' doesn't belong to a */ - /* TrueType/sfnt face, just return~0 as the default value. */ + /* The language ID of `charmap'. If `charmap' doesn't belong to an */ + /* SFNT face, just return~0 as the default value. */ /* */ /* For a format~14 cmap (to access Unicode IVS), the return value is */ /* 0xFFFFFFFF. */ @@ -805,15 +822,15 @@ FT_BEGIN_HEADER /* FT_Get_CMap_Format */ /* */ /* <Description> */ - /* Return TrueType/sfnt specific cmap format. */ + /* Return the format of an SFNT `cmap' table. */ /* */ /* <Input> */ /* charmap :: */ /* The target charmap. */ /* */ /* <Return> */ - /* The format of `charmap'. If `charmap' doesn't belong to a */ - /* TrueType/sfnt face, return -1. */ + /* The format of `charmap'. If `charmap' doesn't belong to an SFNT */ + /* face, return -1. */ /* */ FT_EXPORT( FT_Long ) FT_Get_CMap_Format( FT_CharMap charmap ); diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/tttags.h b/Build/source/libs/freetype2/freetype-src/include/freetype/tttags.h index 63f6258e8ad..32eb2fdc268 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/tttags.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/tttags.h @@ -4,7 +4,7 @@ /* */ /* Tags for TrueType and OpenType tables (specification only). */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/Build/source/libs/freetype2/freetype-src/include/freetype/ttunpat.h b/Build/source/libs/freetype2/freetype-src/include/freetype/ttunpat.h index ca4676baf87..f5e417089e7 100644 --- a/Build/source/libs/freetype2/freetype-src/include/freetype/ttunpat.h +++ b/Build/source/libs/freetype2/freetype-src/include/freetype/ttunpat.h @@ -3,9 +3,9 @@ /* ttunpat.h */ /* */ /* Definitions for the unpatented TrueType hinting system. */ -/* Obsolete, retained for backwards compatibility. */ +/* Obsolete, retained for backward compatibility. */ /* */ -/* Copyright 2003-2016 by */ +/* Copyright 2003-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* Written by Graham Asher <graham.asher@btinternet.com> */ diff --git a/Build/source/libs/freetype2/freetype-src/include/ft2build.h b/Build/source/libs/freetype2/freetype-src/include/ft2build.h index c89cb469e97..e7d808f3f4b 100644 --- a/Build/source/libs/freetype2/freetype-src/include/ft2build.h +++ b/Build/source/libs/freetype2/freetype-src/include/ft2build.h @@ -4,7 +4,7 @@ /* */ /* FreeType 2 build and setup macros. */ /* */ -/* Copyright 1996-2016 by */ +/* Copyright 1996-2017 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ -- cgit v1.2.3