Info

Must Override

May Override

BaseInfo._getAttr(attr: str) Any[source]

Get the value of the specified native font info attribute.

This is the environment implementation of BaseInfo.__getattribute__.

Parameters:

attr – The name of the attribute to retrieve. The value will be validated by fonttools.ufolib.validateFontInfoVersion3ValueForAttribute

Returns:

The value of the specified attribute.

Raises:

Note

Subclasses may override this method.

If a subclass does not override this method, it must implement _get_<attr> methods for all BaseInfo methods.

BaseInfo._init(*args: Any, **kwargs: Any) None

Initialize the native object.

This is the environment implementation of BaseObject.__init__.

Parameters:
  • *args – Any positional arguments.

  • **kwargs – Any keyword arguments.

Note

Subclasses may override this method.

BaseInfo._interpolate(factor: list[int | float] | tuple[float, float], minInfo: BaseInfo, maxInfo: BaseInfo, round: bool = True, suppressError: bool = True) None[source]

“Interpolate all possible data in the current native info object.

This is the environment implementation of BaseInfo.interpolate.

Subclasses may override this method.

BaseInfo._round(**kwargs: Any) None[source]

Round selected native attributes to the nearest integer.

This is the environment implementation of BaseInfo.round.

Parameters:

**kwargs – Additional keyword arguments.

Note

Subclasses may override this method.

BaseInfo._setAttr(attr: str, value: Any) None[source]

Set the value of the specified native font info attribute.

This is the environment implementation of BaseInfo.__setattr__.

Parameters:
  • attr – The name of the attribute to set. The value will have been validated by fonttools.ufolib.validateFontInfoVersion3ValueForAttribute

  • value – The value to set for attr.

Raises:

Note

Subclasses may override this method.

If a subclass does not override this method, it must implement _set_<attr> methods for all BaseInfo methods.

BaseInfo.copyData(source: BaseObjectType) None

Copy data from source into the current object.

Note

Subclasses may override this method. If so, they should call the super.