FL.fake.Kerning.FakeKerning

class FL.fake.Kerning.FakeKerning(font: Font | None = None)

Bases: object

__init__(font: Font | None = None) None

Methods

__init__([font])

expand()

export_afm(file_path[, expand])

Export kerning data to an AFM file at file_path.

export_flc(file_path)

import_afm(file_path[, master_index])

Import kerning data from an AFM file at file_path.

import_classes_from_font(font)

Import the kerning classes from a font.

import_flc(file_path)

Import the kerning classes from a FLC file.

reset_classes()

Reset kerning classes to empty dicts.

reset_pairs()

export_afm(file_path: Path, expand: bool = True) None

Export kerning data to an AFM file at file_path.

Parameters:
  • file_path (Path) – The path to the AFM file.

  • expand (bool, optional) – Whether to expand class kerning before export. If False, only key and exception pairs will be exported. Defaults to True.

import_afm(file_path: Path, master_index: int = 0) None

Import kerning data from an AFM file at file_path.

Parameters:
  • file_path (Path) – The path to the AFM file.

  • master_index (int, optional) – _description_. Defaults to 0.

import_classes_from_font(font: Font) None

Import the kerning classes from a font.

Parameters:

font (Font) – The font to import from.

import_flc(file_path: Path) None

Import the kerning classes from a FLC file.

Parameters:

file_path (Path) – The path to the FLC file.

reset_classes() None

Reset kerning classes to empty dicts.