Skip to main content

openTypeFeatures

OpenType features that have been explicitly enabled or disabled.

Signature

openTypeFeatures: { readonly [feature in OpenTypeFeature]: boolean} | figma.mixed [readonly]

Remarks

The Details tab in the Type settings panel shows all the OpenType features that are available for the current font.

This property gives you a map of four-character OpenType features to booleans indicating whether the features are explicitly enabled or disabled. For example, if the map contains { CALT: false }, then the "Contextual alternates" feature is disabled.

info

This map only contains features that diverge from their default values. Some OpenType features are enabled by default and some are disabled by default. For example CLIG and LIGA are on by default, whereas LNUM and TNUM are disabled by default.

Here are some useful resources for learning about OpenType features:

Getting OpenType features from the currently-selected text node
// For a node that uses the Inter font with
// "Contextual alternates" disabled (shows -> instead of ➔):
// { CALT: false }
console.log(figma.currentPage.selection[0].openTypeFeatures)