FL.fake.Font.FakeFont

class FL.fake.Font.FakeFont

Bases: Copyable, GuideMixin, GuidePropertiesMixin

__init__() None

Methods

__init__()

fake_binary_from_path(fontType, file_path)

Assign a binary file from a path.

fake_binary_get(fontType)

fake_deselect_all()

Deselect all glyphs.

fake_deserialize_axis(data)

fake_deserialize_features(features)

fake_deserialize_global_mask(data)

fake_deserialize_guide_properties(data)

fake_deserialize_guides(data)

fake_deserialize_master_ps_infos()

fake_generate_primary_instances()

fake_map_axis_location([axis_index, user_value])

fake_master_map()

fake_select(gid[, value])

Change selection status for glyph_index.

fake_serialize_axis()

fake_serialize_features()

fake_serialize_global_mask()

fake_serialize_guide_properties()

fake_serialize_guides()

fake_serialize_master_ps_infos()

fake_set_class_flags(flags)

Set the kerning class flags from a list of str ("L", "R", "LR", ...)

fake_set_family_blues(values[, master_index])

Set the family blues values for a master.

fake_set_family_other_blues(values[, ...])

Set the family other blue values for a master.

fake_set_master_blue_values(values[, ...])

Set the blue values for a master.

fake_set_master_other_blues(values[, ...])

Set the other blues values for a master.

fake_update()

Is called from FontLab.UpdateFont()

Attributes

fake_sparse_json

fake_vfb_object

fake_kerning

Returns the FL.fake.FakeKerning object, which can be used to manipulate the font's kerning data.

fake_binary_from_path(fontType: int, file_path: str) None

Assign a binary file from a path. This will be used to fake the FakeLab.GenerateFont() method.

fake_deselect_all() None

Deselect all glyphs. Is called from FontLab.Unselect().

property fake_kerning: FakeKerning

Returns the FL.fake.FakeKerning object, which can be used to manipulate the font’s kerning data.

fake_select(gid: str | Uni | int, value: bool | None = None) None

Change selection status for glyph_index. >>> f = Font() >>> f.fake_select(1, False) >>> print(f._selection) set() >>> f.fake_select(1, True) >>> print(f._selection) {1} >>> f.fake_select(3, True) >>> print(f._selection) {1, 3} >>> f.fake_select(2, False) >>> print(f._selection) {1, 3} >>> f.fake_select(1, False) >>> print(f._selection) {3}

fake_set_class_flags(flags: list[str]) None

Set the kerning class flags from a list of str (“L”, “R”, “LR”, …)

fake_set_family_blues(values: list[int], master_index: int = 0) None

Set the family blues values for a master.

Parameters:
  • values (list[int]) – The values.

  • master_index (int, optional) – The master index. Defaults to 0.

fake_set_family_other_blues(values: list[int], master_index: int = 0) None

Set the family other blue values for a master.

Parameters:
  • values (list[int]) – The values.

  • master_index (int, optional) – The master index. Defaults to 0.

fake_set_master_blue_values(values: list[int], master_index: int = 0) None

Set the blue values for a master.

Parameters:
  • values (list[int]) – The values.

  • master_index (int, optional) – The master index. Defaults to 0.

fake_set_master_other_blues(values: list[int], master_index: int = 0) None

Set the other blues values for a master.

Parameters:
  • values (list[int]) – The values.

  • master_index (int, optional) – The master index. Defaults to 0.

fake_update() None

Is called from FontLab.UpdateFont()