FL.objects.Hint.Hint

class FL.objects.Hint.Hint(hint_or_position: Hint | int | None = None, width: int | None = None)

Bases: Copyable

Hint - class to represent hint

This class is Multiple Master - compatible

__init__(hint_or_position: Hint | int | None = None, width: int | None = None) None
Hint()

generic constructor, creates a Hint with zero coordinates

Hint(Hint)

copy constructor

Hint(position, width)

creates a Hint and assigns position and width values

Parameters:
  • hint_or_position (Hint | int | None) – _description_

  • width (int | None, optional) – _description_. Defaults to None.

Methods

ToLink()

Transforms hint to Link (and returns it as a result) using parent as a source of node coordinates.

Transform(m)

Apply Matrix transformation to the Hint (see Matrix().__doc__)

TransformLayer(m, layernum)

Apply Matrix transformation to the selected layer of the Hint

__init__([hint_or_position, width])

Hint()

fake_deserialize(data)

fake_serialize()

Attributes

parent

Hint's parent object, Glyph

position

Position of the hint

positions

List of positions for each master

width

Width of the hint

widths

List of widths for each master

Transforms hint to Link (and returns it as a result) using parent as a source of node coordinates. Parent must exist

Returns:

The Link.

Return type:

Link

Transform(m: Matrix) None

Apply Matrix transformation to the Hint (see Matrix().__doc__)

Parameters:

m (Matrix) – _description_

TransformLayer(m: Matrix, layernum: int) None

Apply Matrix transformation to the selected layer of the Hint

Parameters:
  • m (Matrix) – _description_

  • layernum (int) – _description_

property parent: Glyph | None

Hint’s parent object, Glyph

Returns:

_description_

Return type:

Glyph | None

property position: int

Position of the hint

Returns:

The position of the hint in the first master

Return type:

int

property positions: list[int]

List of positions for each master

Returns:

_description_

Return type:

list[int]

property width: int

Width of the hint

Returns:

The width of the hint in the first master

Return type:

int

property widths: list[int]

List of widths for each master

Returns:

_description_

Return type:

list[int]