From 52ed58ef740fd785d4e5356282a8f697c2adfb68 Mon Sep 17 00:00:00 2001 From: Benno L Date: Sat, 11 Jan 2025 13:36:10 +0100 Subject: [PATCH] Documentation of text option 'features' missed passing an object to deactivate default font features (#1581) * fixed text features documentation, added note about deactivating default features * made documentation more precise --- docs/text.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/text.md b/docs/text.md index f349c86a..bbfdaad5 100644 --- a/docs/text.md +++ b/docs/text.md @@ -106,7 +106,7 @@ below. * `oblique` - whether to slant the text (angle in degrees or `true`) * `baseline` - the vertical alignment of the text with respect to its insertion point (values as [canvas textBaseline](https://www.w3schools.com/tags/canvas_textbaseline.asp)) * `continued` - whether the text segment will be followed immediately by another segment. Useful for changing styling in the middle of a paragraph. -* `features` - an array of [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) to apply. If not provided, a set of defaults is used. +* `features` - an array of [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) to apply. Can also be provided as an object with features as keys and boolean values. If not provided, a set of defaults is used. To deactivate default font features, you have to explicitly set them to false (`{ liga: false }`). When providing an empty array the default font features will still be used. Additionally, the fill and stroke color and opacity methods described in the [vector graphics section](vector.html) are applied to text content as well.