Document MVAR handling.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
diff --git a/include/freetype/ftgasp.h b/include/freetype/ftgasp.h
index d956bee..1269728 100644
--- a/include/freetype/ftgasp.h
+++ b/include/freetype/ftgasp.h
@@ -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/include/freetype/tttables.h b/include/freetype/tttables.h
index c02157d..7a278e2 100644
--- a/include/freetype/tttables.h
+++ b/include/freetype/tttables.h
@@ -175,6 +175,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,6 +190,11 @@ FT_BEGIN_HEADER
/* short_metrics :: A pointer into the `hmtx' table. */
/* */
/* <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: `caret_Slope_Rise', */
+ /* `caret_Slope_Run', and `caret_Offset'. */
+ /* */
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
/* be identical except for the names of their fields, */
/* which are different. */
@@ -219,7 +226,7 @@ FT_BEGIN_HEADER
/* The following fields are not defined by the TrueType specification */
/* but they are used to connect the metrics header to the relevant */
- /* `HMTX' table. */
+ /* `hmtx' table. */
void* long_metrics;
void* short_metrics;
@@ -297,8 +304,6 @@ 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. */
/* */
@@ -309,11 +314,17 @@ FT_BEGIN_HEADER
/* 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> */
+ /* 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'. */
+ /* */
/* IMPORTANT: The TT_HoriHeader and TT_VertHeader structures should */
/* be identical except for the names of their fields, */
/* which are different. */
@@ -344,8 +355,8 @@ FT_BEGIN_HEADER
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. */
+ /* but they are used to connect the metrics header to the relevant */
+ /* `hmtx' or `vmtx' table. */
void* long_metrics;
void* short_metrics;
@@ -359,12 +370,22 @@ FT_BEGIN_HEADER
/* TT_OS2 */
/* */
/* <Description> */
- /* A structure used to model a TrueType OS/2 table. All fields */
+ /* A structure used 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. */
/* */
+ /* 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'. */
+
typedef struct TT_OS2_
{
FT_UShort version; /* 0x0001 - more or 0xFFFF */
@@ -429,11 +450,17 @@ FT_BEGIN_HEADER
/* TT_Postscript */
/* */
/* <Description> */
- /* A structure used to model a TrueType PostScript table. All fields */
+ /* A structure used to model a TrueType `post' 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. */
/* */
+ /* <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_
{
FT_Fixed FormatType;
@@ -447,7 +474,7 @@ FT_BEGIN_HEADER
FT_ULong maxMemType1;
/* Glyph names follow in the file, but we don't */
- /* load them by default. See the ttpost.c file. */
+ /* load them by default. See file `ttpost.c'. */
} TT_Postscript;
@@ -458,7 +485,7 @@ FT_BEGIN_HEADER
/* TT_PCLT */
/* */
/* <Description> */
- /* A structure used to model a TrueType PCLT table. All fields */
+ /* A structure used to model a TrueType `PCLT' table. All fields */
/* comply to the TrueType specification. */
/* */
typedef struct TT_PCLT_
@@ -488,7 +515,7 @@ FT_BEGIN_HEADER
/* TT_MaxProfile */
/* */
/* <Description> */
- /* The maximum profile is a table containing many max values, which */
+ /* The maximum profile (`maxp') table contains many max values, which */
/* can be used to pre-allocate arrays. This ensures that no memory */
/* allocation occurs during a glyph load. */
/* */