FL.objects.TTGasp.TTGasp

class FL.objects.TTGasp.TTGasp(ttgasp_or_ppm: TTGasp | int | None = None, behavior: int = 0)

Bases: Copyable

This class is completely undocumented

__init__(ttgasp_or_ppm: TTGasp | int | None = None, behavior: int = 0)

A gasp table record.

Parameters:
  • ttgasp_or_ppm (TTGasp | int | None, optional) – Copy attributes from TTGasp, set the ppm, or create a default gasp table record. Defaults to None.

  • behavior (int, optional) – The behavior flags for the ppm range. Must be used together with the ppm integer in the first argument. Defaults to 0.

Raises:

RuntimeError – When the arguments don’t match the expectations.

Methods

__init__([ttgasp_or_ppm, behavior])

A gasp table record.

fake_deserialize(data)

fake_serialize()

Attributes

behavior

Flags describing desired rasterizer behavior.

ppm

Upper limit of range, in PPEM

property behavior: int

Flags describing desired rasterizer behavior.

Returns:

The flags.

Return type:

int

0x0001 - Use gridfittig 0x0002 - Use grayscale rendering

Those additional flags are defined in version 1 of the gasp table specification, but they can not be accessed from the FontLab 5 UI:

0x0004 - Use gridfitting with ClearType symmetric smoothing 0x0008 - Use smoothing along multiple axes with ClearType®

property ppm: int

Upper limit of range, in PPEM

Returns:

The maximum ppm for the gasp record

Return type:

int