diff options
author | Werner Lemberg <wl@gnu.org> | 2017-08-05 18:22:17 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2017-08-05 18:22:17 +0200 |
commit | f43b3094ef9eec177caafdbc4e73a14be000d127 (patch) | |
tree | ca6bb49be97ff57345f6e07b1a692c051fc1ba19 /include | |
parent | 24e256ab005c68a3894845ef3b7764338f9442a4 (diff) | |
download | freetype2-f43b3094ef9eec177caafdbc4e73a14be000d127.tar.gz |
[base, truetype] New function `FT_Get_Var_Axis_Flags'.
The reserved `flags' field got a value in OpenType version 1.8.2;
unfortunately, the public `FT_Var_Axis' structure misses the
corresponding element. Since we can't add a new field, we add an
access function.
* src/base/ftmm.c (FT_Get_Var_Axis_Flags): New function.
* include/freetype/ftmm.h (FT_VAR_AXIS_FLAG_HIDDEN): New macro.
Updated.
* src/truetype/ttgxvar.c (TT_Get_MM_Var): Increase allocated memory
of `mmvar' to hold axis flags.
Fill the axis flags array.
* docs/CHANGES: Updated.
Diffstat (limited to 'include')
-rw-r--r-- | include/freetype/ftmm.h | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/include/freetype/ftmm.h b/include/freetype/ftmm.h index b1bc1ed82..b4c594189 100644 --- a/include/freetype/ftmm.h +++ b/include/freetype/ftmm.h @@ -196,7 +196,7 @@ FT_BEGIN_HEADER /* FT_MM_Var */ /* */ /* <Description> */ - /* A structure to model the axes and space of a Adobe MM, TrueType */ + /* A structure to model the axes and space of an Adobe MM, TrueType */ /* GX, or OpenType variation font. */ /* */ /* Some fields are specific to one format and not to the others. */ @@ -480,6 +480,50 @@ FT_BEGIN_HEADER FT_UInt num_coords, FT_Fixed* coords ); + + /*************************************************************************/ + /* */ + /* <Enum> */ + /* FT_VAR_AXIS_FLAG_XXX */ + /* */ + /* <Description> */ + /* A list of bit flags used in the return value of */ + /* @FT_Get_Var_Axis_Flags. */ + /* */ + /* <Values> */ + /* FT_VAR_AXIS_FLAG_HIDDEN :: */ + /* The variation axis should not be exposed to user interfaces. */ + /* */ +#define FT_VAR_AXIS_FLAG_HIDDEN 1 + + + /*************************************************************************/ + /* */ + /* <Function> */ + /* FT_Get_Var_Axis_Flags */ + /* */ + /* <Description> */ + /* Get the `flags' field of an OpenType Variation Axis Record. */ + /* */ + /* Not meaningful for Adobe MM fonts (`*flags' is always zero). */ + /* */ + /* <Input> */ + /* master :: The variation descriptor. */ + /* */ + /* axis_index :: The index of the requested variation axis. */ + /* */ + /* <Output> */ + /* flags :: The `flags' field. See @FT_VAR_AXIS_FLAG_XXX for */ + /* possible values. */ + /* */ + /* <Return> */ + /* FreeType error code. 0~means success. */ + /* */ + FT_EXPORT( FT_Error ) + FT_Get_Var_Axis_Flags( FT_MM_Var* master, + FT_UInt axis_index, + FT_UInt* flags ); + /* */ |