Access font features via fontParts.base.Features
mainIn fontParts, features are represented as text following the Adobe Font Development Kit for OpenType .fea syntax. You can access the features of a font instance through the .features attribute of a Font object.
Important Considerations:
- Syntax Validation:
fontPartsdoes not validate the syntax of the features text. You must ensure the.feasyntax is correct according to Adobe's specifications. - Self-containment: Features must be self-contained; any glyph or mark classes used must be defined within the features file itself.
- Data Synchronization: The features text may contain data that duplicates or conflicts with data in
BaseKerning,BaseGroups, orBaseInfo. Users and application developers are responsible for synchronizing this data.
font = CurrentFont()
print(font.features)