FL.objects.Feature.Feature

class FL.objects.Feature.Feature(feature_or_tag: Feature | str | None = None, value: str | None = None)

Bases: Copyable

OpenType feature-definition record

__init__(feature_or_tag: Feature | str | None = None, value: str | None = None) None
Feature()

generic constructor, creates an empty Feature record

Feature(Feature)

copy constructor

Feature(string tag)

creates feature, assigns ‘tag’ and empty value

Feature(string tag, string value)

creates feature and assigns values to both attributes

Parameters:
  • feature_or_tag (Feature | str | None, optional) – _description_. Defaults to None.

  • value (str | None, optional) – _description_. Defaults to None.

Methods

__init__([feature_or_tag, value])

Feature()

Attributes

parent

Returns: Font | None: The parent Font object, or None.

tag

Returns: str: The four-character feature tag.

value

Returns: str | None: The feature code in AFDKO syntax.

property parent: Font | None

Returns: Font | None: The parent Font object, or None.

property tag: str

Returns: str: The four-character feature tag.

property value: str | None

Returns: str | None: The feature code in AFDKO syntax.