Skip to content

Commit

Permalink
Documentation of text option 'features' missed passing an object to d…
Browse files Browse the repository at this point in the history
…eactivate default font features (#1581)

* fixed text features documentation, added note about deactivating default features

* made documentation more precise
  • Loading branch information
bennol authored Jan 11, 2025
1 parent 40a0f38 commit 52ed58e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 52ed58e

Please sign in to comment.