fontlab_fontport.host.NativeFontBackend · declarations 001
Back to fontlab_fontport.host.NativeFontBackend
__init__
__init__(font_id: int, *, owns_document: bool = False) -> None
capabilities
capabilities() -> dict
Static capability metadata; valid after the document has closed.
check_glyph
check_glyph(name: str, layer: str) -> None
check_open
check_open() -> None
close
close() -> None
default_layer
default_layer() -> str
get_feature_blocks
get_feature_blocks() -> dict
get_features
get_features() -> str
get_groups
get_groups() -> dict[str, tuple[str, ...]]
get_info
get_info(attr: str) -> Any
get_kerning
get_kerning() -> dict[tuple[str, str], int | float]
get_lib
get_lib() -> dict[str, Any]
get_master_kerning
get_master_kerning(name: str)
Kerning of master name via flPackage.kerning(name); None if not a master.
glyph_global_fields
class-attribute
instance-attribute
glyph_global_fields
glyph_names
glyph_names(layer: str) -> tuple[str, ...]
glyph_summaries
glyph_summaries(layer: str) -> tuple[tuple[str, tuple[int, ...], float], ...]
(name, unicodes, advance width) of every glyph on layer, in one pass.
has_glyph
has_glyph(name: str, layer: str) -> bool
Return whether name exists on layer, without listing the font.
has_layer
has_layer(name: str) -> bool
layer_names
layer_names() -> tuple[str, ...]
new_glyph
new_glyph(name: str, layer: str) -> None
new_layer
new_layer(name: str, color=None) -> None
path
path() -> str | None
read_glyph
read_glyph(name: str, layer: str) -> Glyph
remove_glyph
remove_glyph(name: str, layer: str) -> None
remove_layer
remove_layer(name: str) -> None
rename_glyph
rename_glyph(old: str, new: str, layer: str) -> None
rename_layer
rename_layer(old: str, new: str) -> None
requires_complete_contours
class-attribute
instance-attribute
requires_complete_contours
save
save(path: str | None = None, *, require_persistence: bool = False) -> None
set_feature_blocks
set_feature_blocks(values: Mapping, *, undo_name: str = 'FontParts features') -> None
set_features
set_features(text: str | None, *, undo_name: str = 'FontParts features') -> None
set_groups
set_groups(values: Mapping[str, Any], *, undo_name: str = 'FontParts groups', require_persistence: bool = False) -> None
set_info
set_info(attr: str, value: Any, *, require_single_undo: bool = False) -> None
set_info_many
set_info_many(values: Mapping[str, Any], *, undo_name: str = 'FontParts font info', require_single_undo: bool = False) -> None
Apply validated fields as a named batch with native Undo checkpoints.
package.info routes metrics to the current key master; its UPM setter changes only the stored UPM, without scaling glyphs or other metrics. A pre-edit package checkpoint makes the entire first Undo reliable. The host exposes this no-op checkpoint as an additional Undo row. Default editing preserves the v1.0.0 history contract (D18). Set require_single_undo=True to refuse the extra checkpoint. Changing postscriptStemSnapH/V is refused unless the font is the active document without unsaved history (Issue 250 N3).
set_kerning
set_kerning(values: Mapping[tuple[str, str], int | float], *, undo_name: str = 'FontParts kerning') -> None
set_lib
set_lib(values: Mapping[str, Any], *, undo_name: str = 'FontParts lib') -> None
Preserve untouched entries and use info's package/master checkpoints.
First native lib Undo/Redo remains an explicit acceptance gate.
write_glyph
write_glyph(name: str, layer: str, source: Any) -> None
write_glyph_named
write_glyph_named(name: str, layer: str, source: Any, *, undo_name: str = 'FontParts glyph edit') -> None