Skip to content
7 changes: 7 additions & 0 deletions Lib/glyphsLib/builder/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
INSERT_FEATURE_MARKER_COMMENT,
)
from .tokens import TokenExpander, PassThruExpander
from .multi_language import expand_multi_language_statements
from .variable_features import VariableFeatureConverter

if TYPE_CHECKING:
Expand Down Expand Up @@ -198,6 +199,12 @@ def _to_ufo_features( # noqa: C901
if master is not None:
full_text = VariableFeatureConverter(font).convert(full_text)

# Expand Glyphs' multiple languages syntax (`language AZE CRT;`) into the
# one-tag-per-statement form the FEA spec allows. After the conversion
# above, so that `#ifndef VARIABLE` blocks are already resolved and no rule
# is ever replayed out of one.
full_text = expand_multi_language_statements(full_text)

if not full_text or not expand_includes:
return full_text

Expand Down
Loading
Loading