mirror of
git://git.sv.nongnu.org/freetype/freetype2.git
synced 2026-01-19 04:52:09 +00:00
[doc] Use 'Adobe MM', 'TrueType GX', and 'OpenType Font Variations'.
This commit is contained in:
@@ -1068,12 +1068,12 @@ FT_BEGIN_HEADER
|
||||
* the face in the font file (starting with value~0). They are set
|
||||
* to~0 if there is only one face in the font file.
|
||||
*
|
||||
* [Since 2.6.1] 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.
|
||||
* [Since 2.6.1] Bits 16-30 are relevant to TrueType GX and OpenType
|
||||
* Font Variations 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 (that is, `face_index` is always a positive
|
||||
* value).
|
||||
@@ -1092,10 +1092,10 @@ FT_BEGIN_HEADER
|
||||
* the face; see @FT_STYLE_FLAG_XXX for the details.
|
||||
*
|
||||
* [Since 2.6.1] Bits 16-30 hold the number of named instances
|
||||
* available for the current face if we have a GX or OpenType variation
|
||||
* (sub)font. Bit 31 is always zero (that is, `style_flags` is always
|
||||
* a positive value). Note that a variation font has always at least
|
||||
* one named instance, namely the default instance.
|
||||
* available for the current face if we have a TrueType GX or OpenType
|
||||
* Font Variation. Bit 31 is always zero (that 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
|
||||
@@ -1159,7 +1159,7 @@ FT_BEGIN_HEADER
|
||||
* Note that the bounding box might be off by (at least) one pixel for
|
||||
* hinted fonts. See @FT_Size_Metrics for further discussion.
|
||||
*
|
||||
* Note that the bounding box does not vary in OpenType variation fonts
|
||||
* Note that the bounding box does not vary in OpenType Font Variations
|
||||
* and should only be used in relation to the default instance.
|
||||
*
|
||||
* units_per_EM ::
|
||||
@@ -1218,7 +1218,7 @@ 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
|
||||
* For OpenType Font Variations, 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`.
|
||||
@@ -1336,7 +1336,7 @@ FT_BEGIN_HEADER
|
||||
* FT_FACE_FLAG_MULTIPLE_MASTERS ::
|
||||
* The face contains multiple masters and is capable of interpolating
|
||||
* between them. Supported formats are Adobe MM, TrueType GX, and
|
||||
* OpenType variation fonts.
|
||||
* OpenType Font Variations.
|
||||
*
|
||||
* See section @multiple_masters for API details.
|
||||
*
|
||||
@@ -1609,7 +1609,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* A macro that returns true whenever a face object is a named instance
|
||||
* of a GX or OpenType variation font.
|
||||
* of a TrueType GX or OpenType Font Variations.
|
||||
*
|
||||
* [Since 2.9] Changing the design coordinates with
|
||||
* @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does
|
||||
@@ -2147,7 +2147,7 @@ FT_BEGIN_HEADER
|
||||
* freed.
|
||||
*
|
||||
* [Since 2.10.1] If @FT_LOAD_NO_SCALE is set, outline coordinates of
|
||||
* OpenType variation fonts for a selected instance are internally
|
||||
* OpenType Font Variations for a selected instance are internally
|
||||
* handled as 26.6 fractional font units but returned as (rounded)
|
||||
* integers, as expected. To get unrounded font units, don't use
|
||||
* @FT_LOAD_NO_SCALE but load the glyph with @FT_LOAD_NO_HINTING and
|
||||
@@ -2640,14 +2640,14 @@ FT_BEGIN_HEADER
|
||||
* the face in the font file (starting with value~0). Set it to~0 if
|
||||
* there is only one face in the font file.
|
||||
*
|
||||
* [Since 2.6.1] 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.
|
||||
* [Since 2.6.1] Bits 16-30 are relevant to TrueType GX and OpenType
|
||||
* Font Variations 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.
|
||||
@@ -2914,11 +2914,11 @@ FT_BEGIN_HEADER
|
||||
* of the available glyphs at a given ppem value is available. FreeType
|
||||
* silently uses outlines if there is no bitmap for a given glyph index.
|
||||
*
|
||||
* For GX and OpenType variation fonts, a bitmap strike makes sense only
|
||||
* if the default instance is active (that 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 TrueType GX and OpenType Font Variations, a bitmap strike makes
|
||||
* sense only if the default instance is active (that 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.
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* ftmm.h
|
||||
*
|
||||
* FreeType Multiple Master font interface (specification).
|
||||
* FreeType variation font interface (specification).
|
||||
*
|
||||
* Copyright (C) 1996-2024 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
@@ -48,12 +48,12 @@ FT_BEGIN_HEADER
|
||||
* design axis coordinates.
|
||||
*
|
||||
* Besides Adobe MM fonts, the interface supports Apple's TrueType GX and
|
||||
* OpenType variation fonts. Some of the routines only work with Adobe
|
||||
* OpenType Font Variations. 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.
|
||||
*
|
||||
* For Adobe MM fonts, macro @FT_IS_SFNT returns false. For GX and
|
||||
* OpenType variation fonts, it returns true.
|
||||
* For Adobe MM fonts, macro @FT_IS_SFNT returns false. For TrueType GX
|
||||
* and OpenType Font Variations, it returns true.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -64,14 +64,14 @@ FT_BEGIN_HEADER
|
||||
* T1_MAX_MM_XXX
|
||||
*
|
||||
* @description:
|
||||
* Multiple Masters limits as defined in their specifications.
|
||||
* Adobe MM font limits as defined in their specifications.
|
||||
*
|
||||
* @values:
|
||||
* T1_MAX_MM_AXIS ::
|
||||
* The maximum number of Multiple Masters axes.
|
||||
* The maximum number of Adobe MM font axes.
|
||||
*
|
||||
* T1_MAX_MM_DESIGNS ::
|
||||
* The maximum number of Multiple Masters designs.
|
||||
* The maximum number of Adobe MM font designs.
|
||||
*
|
||||
* T1_MAX_MM_MAP_POINTS ::
|
||||
* The maximum number of elements in a design map.
|
||||
@@ -88,11 +88,10 @@ FT_BEGIN_HEADER
|
||||
* FT_MM_Axis
|
||||
*
|
||||
* @description:
|
||||
* A structure to model a given axis in design space for Multiple Masters
|
||||
* fonts.
|
||||
* A structure to model a given axis in design space for Adobe MM fonts.
|
||||
*
|
||||
* This structure can't be used for TrueType GX or OpenType variation
|
||||
* fonts.
|
||||
* This structure can't be used for TrueType GX or OpenType Font
|
||||
* Variations.
|
||||
*
|
||||
* @fields:
|
||||
* name ::
|
||||
@@ -119,10 +118,10 @@ FT_BEGIN_HEADER
|
||||
* FT_Multi_Master
|
||||
*
|
||||
* @description:
|
||||
* A structure to model the axes and space of a Multiple Masters font.
|
||||
* A structure to model the axes and space of an Adobe MM font.
|
||||
*
|
||||
* This structure can't be used for TrueType GX or OpenType variation
|
||||
* fonts.
|
||||
* This structure can't be used for TrueType GX or OpenType Font
|
||||
* Variations.
|
||||
*
|
||||
* @fields:
|
||||
* num_axis ::
|
||||
@@ -151,13 +150,13 @@ FT_BEGIN_HEADER
|
||||
* FT_Var_Axis
|
||||
*
|
||||
* @description:
|
||||
* A structure to model a given axis in design space for Multiple
|
||||
* Masters, TrueType GX, and OpenType variation fonts.
|
||||
* A structure to model a given axis in design space for Adobe MM fonts,
|
||||
* TrueType GX, and OpenType Font Variations.
|
||||
*
|
||||
* @fields:
|
||||
* name ::
|
||||
* The axis's name. Not always meaningful for TrueType GX or OpenType
|
||||
* variation fonts.
|
||||
* Font Variations.
|
||||
*
|
||||
* minimum ::
|
||||
* The axis's minimum design coordinate.
|
||||
@@ -171,17 +170,17 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* tag ::
|
||||
* The axis's tag (the equivalent to 'name' for TrueType GX and
|
||||
* OpenType variation fonts). FreeType provides default values for
|
||||
* OpenType Font Variations). FreeType provides default values for
|
||||
* Adobe MM fonts if possible.
|
||||
*
|
||||
* 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.
|
||||
* OpenType Font Variations. 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
|
||||
* for TrueType GX and OpenType Font Variations. For Adobe MM fonts, the
|
||||
* values are whole numbers (i.e., the fractional part is zero).
|
||||
*/
|
||||
typedef struct FT_Var_Axis_
|
||||
@@ -205,7 +204,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* A structure to model a named instance in a TrueType GX or OpenType
|
||||
* variation font.
|
||||
* Font Variations.
|
||||
*
|
||||
* This structure can't be used for Adobe MM fonts.
|
||||
*
|
||||
@@ -237,18 +236,18 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @description:
|
||||
* A structure to model the axes and space of an Adobe MM, TrueType GX,
|
||||
* or OpenType variation font.
|
||||
* or OpenType Font Variations.
|
||||
*
|
||||
* 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 Adobe MM fonts; no
|
||||
* limit in TrueType GX or OpenType variation fonts.
|
||||
* limit in TrueType GX or OpenType Font Variations.
|
||||
*
|
||||
* num_designs ::
|
||||
* The number of designs; should be normally 2^num_axis for Adobe MM
|
||||
* fonts. Not meaningful for TrueType GX or OpenType variation fonts
|
||||
* fonts. Not meaningful for TrueType GX or OpenType Font Variations
|
||||
* (where every glyph could have a different number of designs).
|
||||
*
|
||||
* num_namedstyles ::
|
||||
@@ -258,17 +257,17 @@ FT_BEGIN_HEADER
|
||||
* [Weight=1.5,Width=1.1] is 'Bold'. Another name for 'named style' is
|
||||
* 'named instance'.
|
||||
*
|
||||
* For Adobe Multiple Masters fonts, this value is always zero because
|
||||
* the format does not support named styles.
|
||||
* For Adobe MM fonts, this value is always zero because the format
|
||||
* does not support named styles.
|
||||
*
|
||||
* axis ::
|
||||
* An axis descriptor table. TrueType GX and OpenType variation fonts
|
||||
* An axis descriptor table. TrueType GX and OpenType Font Variations
|
||||
* contain slightly more data than Adobe MM fonts. 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
|
||||
* OpenType Font Variations. Memory management of this pointer is done
|
||||
* internally by FreeType.
|
||||
*/
|
||||
typedef struct FT_MM_Var_
|
||||
@@ -290,8 +289,8 @@ FT_BEGIN_HEADER
|
||||
* @description:
|
||||
* Retrieve a variation descriptor of a given Adobe MM font.
|
||||
*
|
||||
* This function can't be used with TrueType GX or OpenType variation
|
||||
* fonts.
|
||||
* This function can't be used with TrueType GX or OpenType Font
|
||||
* Variations.
|
||||
*
|
||||
* @input:
|
||||
* face ::
|
||||
@@ -299,7 +298,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @output:
|
||||
* amaster ::
|
||||
* The Multiple Masters descriptor.
|
||||
* The Adobe MM font's variation descriptor.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
@@ -366,8 +365,8 @@ FT_BEGIN_HEADER
|
||||
* For Adobe MM fonts, choose an interpolated font design through design
|
||||
* coordinates.
|
||||
*
|
||||
* This function can't be used with TrueType GX or OpenType variation
|
||||
* fonts.
|
||||
* This function can't be used with TrueType GX or OpenType Font
|
||||
* Variations.
|
||||
*
|
||||
* @inout:
|
||||
* face ::
|
||||
@@ -428,7 +427,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @note:
|
||||
* The design coordinates are 16.16 fractional values for TrueType GX and
|
||||
* OpenType variation fonts. For Adobe MM fonts, the values are supposed
|
||||
* OpenType Font Variations. For Adobe MM fonts, the values are supposed
|
||||
* to be whole numbers (i.e., the fractional part is zero).
|
||||
*
|
||||
* [Since 2.8.1] To reset all axes to the default values, call the
|
||||
@@ -481,7 +480,7 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* @note:
|
||||
* The design coordinates are 16.16 fractional values for TrueType GX and
|
||||
* OpenType variation fonts. For Adobe MM fonts, the values are whole
|
||||
* OpenType Font Variations. For Adobe MM fonts, the values are whole
|
||||
* numbers (i.e., the fractional part is zero).
|
||||
*
|
||||
* @since:
|
||||
@@ -517,7 +516,7 @@ FT_BEGIN_HEADER
|
||||
* coords ::
|
||||
* The design coordinates array. Each element is a 16.16 fractional
|
||||
* value and must be between 0 and 1.0 for Adobe MM fonts, and between
|
||||
* -1.0 and 1.0 for TrueType GX and OpenType variation fonts.
|
||||
* -1.0 and 1.0 for TrueType GX and OpenType Font Variations.
|
||||
*
|
||||
* @return:
|
||||
* FreeType error code. 0~means success.
|
||||
@@ -563,8 +562,8 @@ FT_BEGIN_HEADER
|
||||
* 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
|
||||
* Adobe MM fonts, and to~0 for TrueType GX and OpenType variation
|
||||
* fonts.
|
||||
* Adobe MM fonts, and to~0 for TrueType GX and OpenType Font
|
||||
* Variations.
|
||||
*
|
||||
* @output:
|
||||
* coords ::
|
||||
@@ -622,8 +621,8 @@ FT_BEGIN_HEADER
|
||||
* For Adobe MM fonts, choose an interpolated font design by directly
|
||||
* setting the weight vector.
|
||||
*
|
||||
* This function can't be used with TrueType GX or OpenType variation
|
||||
* fonts.
|
||||
* This function can't be used with TrueType GX or OpenType Font
|
||||
* Variations.
|
||||
*
|
||||
* @inout:
|
||||
* face ::
|
||||
@@ -642,8 +641,8 @@ FT_BEGIN_HEADER
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* Adobe Multiple Master fonts limit the number of designs, and thus the
|
||||
* length of the weight vector to 16~elements.
|
||||
* Adobe MM fonts limit the number of designs, and thus the length of
|
||||
* the weight vector to 16~elements.
|
||||
*
|
||||
* If `len` is larger than zero, this function sets the
|
||||
* @FT_FACE_FLAG_VARIATION bit in @FT_Face's `face_flags` field (i.e.,
|
||||
@@ -671,8 +670,8 @@ FT_BEGIN_HEADER
|
||||
* @description:
|
||||
* For Adobe MM fonts, retrieve the current weight vector of the font.
|
||||
*
|
||||
* This function can't be used with TrueType GX or OpenType variation
|
||||
* fonts.
|
||||
* This function can't be used with TrueType GX or OpenType Font
|
||||
* Variations.
|
||||
*
|
||||
* @inout:
|
||||
* face ::
|
||||
@@ -695,8 +694,8 @@ FT_BEGIN_HEADER
|
||||
* FreeType error code. 0~means success.
|
||||
*
|
||||
* @note:
|
||||
* Adobe Multiple Master fonts limit the number of designs, and thus the
|
||||
* length of the WeightVector to~16.
|
||||
* Adobe MM fonts limit the number of designs, and thus the length of
|
||||
* the WeightVector to~16.
|
||||
*
|
||||
* @since:
|
||||
* 2.10
|
||||
|
||||
@@ -192,7 +192,7 @@ FT_BEGIN_HEADER
|
||||
* A pointer into the 'hmtx' table.
|
||||
*
|
||||
* @note:
|
||||
* For an OpenType variation font, the values of the following fields can
|
||||
* For OpenType Font Variations, 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`.
|
||||
@@ -310,7 +310,7 @@ FT_BEGIN_HEADER
|
||||
* A pointer into the 'vmtx' table.
|
||||
*
|
||||
* @note:
|
||||
* For an OpenType variation font, the values of the following fields can
|
||||
* For OpenType Font Variations, 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`.
|
||||
@@ -359,7 +359,7 @@ FT_BEGIN_HEADER
|
||||
* 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
|
||||
* For OpenType Font Variations, 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`,
|
||||
@@ -442,7 +442,7 @@ FT_BEGIN_HEADER
|
||||
* them.
|
||||
*
|
||||
* @note:
|
||||
* For an OpenType variation font, the values of the following fields can
|
||||
* For OpenType Font Variations, 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`.
|
||||
|
||||
Reference in New Issue
Block a user