From 72f0b24ee3b138bc955430c5a7d71de669b219f0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 12 Jan 2022 13:08:02 -0500 Subject: [PATCH] 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 --- src/hb-font.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/hb-font.cc b/src/hb-font.cc index 74402db6b..bde83b3ae 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -2092,6 +2092,10 @@ hb_font_get_synthetic_slant (hb_font_t *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 */ void @@ -2147,6 +2151,10 @@ hb_font_set_variations (hb_font_t *font, * Applies a list of variation coordinates (in design-space units) * 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 */ void @@ -2210,6 +2218,10 @@ hb_font_set_var_named_instance (hb_font_t *font, * Applies a list of variation coordinates (in normalized units) * 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: Coordinates should be normalized to 2.14. * * Since: 1.4.2