docs: Clarify variation apis (#3363)

Make it explicit that the variations setters
replace all existing variations, even if
not all axes are included in the provided
values.

Co-authored-by: Matthias Clasen <mclasen@redhat.com>
This commit is contained in:
Matthias Clasen 2022-01-12 13:08:02 -05:00 committed by GitHub
parent befe3b5d5a
commit 72f0b24ee3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -2092,6 +2092,10 @@ hb_font_get_synthetic_slant (hb_font_t *font)
* *
* Applies a list of font-variation settings to a font. * Applies a list of font-variation settings to a font.
* *
* Note that this overrides all existing variations set on @font.
* Axes not included in @variations will be effectively set to their
* default values.
*
* Since: 1.4.2 * Since: 1.4.2
*/ */
void void
@ -2147,6 +2151,10 @@ hb_font_set_variations (hb_font_t *font,
* Applies a list of variation coordinates (in design-space units) * Applies a list of variation coordinates (in design-space units)
* to a font. * to a font.
* *
* Note that this overrides all existing variations set on @font.
* Axes not included in @coords will be effectively set to their
* default values.
*
* Since: 1.4.2 * Since: 1.4.2
*/ */
void void
@ -2210,6 +2218,10 @@ hb_font_set_var_named_instance (hb_font_t *font,
* Applies a list of variation coordinates (in normalized units) * Applies a list of variation coordinates (in normalized units)
* to a font. * to a font.
* *
* Note that this overrides all existing variations set on @font.
* Axes not included in @coords will be effectively set to their
* default values.
*
* <note>Note: Coordinates should be normalized to 2.14.</note> * <note>Note: Coordinates should be normalized to 2.14.</note>
* *
* Since: 1.4.2 * Since: 1.4.2