Expand description
OpenType features a piece of text asks its font for, such as tabular figures.
A feature does not change which font the text is set in. It picks one of the forms the font already has: digits of one width, a ligature left apart, a stylistic set. That is why text with a type role may take features too, where it may not name a font.
The list travels in the FontFeatureSettings property as fixed 8-byte records, the
four tag bytes and then the value as a little-endian u32. The Renderer turns it into
Compose’s fontFeatureSettings string once, when the property changes.
Structs§
- Font
Feature - One OpenType feature and its value. Compose’s
TextStyle.fontFeatureSettingsentry, CSS’sfont-feature-settingsentry.
Constants§
- FONT_
FEATURE_ LEN - Bytes of one feature record: the tag, then the value.
- FONT_
FEATURE_ TAG_ AT - Where each part of a record starts.
- FONT_
FEATURE_ VALUE_ AT - MAX_
FONT_ FEATURES - The most features one node may carry. The Renderer reports a longer list as a protocol error and draws the text without any of them.
Functions§
- font_
feature_ bytes - The records of
features, in order, as theFontFeatureSettingsproperty carries them.