fontlab_fontport.host.NativeFontBackend
NativeFontBackend
Attach to a registered document by id.
Borrowed handles close only their binding. Set owns_document=True only for an explicitly owned document: close then discards its unsaved changes. Glyph metadata is global; widths/outlines/anchors belong to the named layer. New glyphs are created in all master layers. Whole glyph deletion is refused; remove_glyph removes only a non-master layer without deleting other layers.
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
__init__ |
function | (self, font_id: int, *, owns_document: bool=False) -> None |
|
capabilities |
function | (self) -> dict |
Static capability metadata; valid after the document has closed. |
check_glyph |
function | (self, name: str, layer: str) -> None |
|
check_open |
function | (self) -> None |
|
close |
function | (self) -> None |
|
default_layer |
function | (self) -> str |
|
get_feature_blocks |
function | (self) -> dict |
|
get_features |
function | (self) -> str |
|
get_groups |
function | (self) -> dict[str, tuple[str, ...]] |
|
get_info |
function | (self, attr: str) -> Any |
|
get_kerning |
function | (self) -> dict[tuple[str, str], int | float] |
|
get_lib |
function | (self) -> dict[str, Any] |
|
get_master_kerning |
function | (self, name: str) |
Kerning of master <code>name</code> via flPackage.kerning(name); None if not a master. |
glyph_global_fields |
attribute | ||
glyph_names |
function | (self, layer: str) -> tuple[str, ...] |
|
glyph_summaries |
function | (self, layer: str) -> tuple[tuple[str, tuple[int, ...], float], ...] |
<code>(name, unicodes, advance width)</code><code> of every glyph on </code><code>layer</code>, in one pass. |
has_glyph |
function | (self, name: str, layer: str) -> bool |
Return whether <code>name</code><code> exists on </code><code>layer</code>, without listing the font. |
has_layer |
function | (self, name: str) -> bool |
|
layer_names |
function | (self) -> tuple[str, ...] |
|
new_glyph |
function | (self, name: str, layer: str) -> None |
|
new_layer |
function | (self, name: str, color=None) -> None |
|
path |
function | (self) -> str | None |
|
read_glyph |
function | (self, name: str, layer: str) -> Glyph |
|
remove_glyph |
function | (self, name: str, layer: str) -> None |
|
remove_layer |
function | (self, name: str) -> None |
|
rename_glyph |
function | (self, old: str, new: str, layer: str) -> None |
|
rename_layer |
function | (self, old: str, new: str) -> None |
|
requires_complete_contours |
attribute | ||
save |
function | (self, path: str | None=None, *, require_persistence: bool=False) -> None |
|
set_feature_blocks |
function | (self, values: Mapping, *, undo_name: str='FontParts features') -> None |
|
set_features |
function | (self, text: str | None, *, undo_name: str='FontParts features') -> None |
|
set_groups |
function | (self, values: Mapping[str, Any], *, undo_name: str='FontParts groups', require_persistence: bool=False) -> N… |
|
set_info |
function | (self, attr: str, value: Any, *, require_single_undo: bool=False) -> None |
|
set_info_many |
function | (self, values: Mapping[str, Any], *, undo_name: str='FontParts font info', require_single_undo: bool=False) -… |
Apply validated fields as a named batch with native Undo checkpoints. |
set_kerning |
function | (self, values: Mapping[tuple[str, str], int | float], *, undo_name: str='FontParts kerning') -> None |
|
set_lib |
function | (self, values: Mapping[str, Any], *, undo_name: str='FontParts lib') -> None |
Preserve untouched entries and use info's package/master checkpoints. |
write_glyph |
function | (self, name: str, layer: str, source: Any) -> None |
|
write_glyph_named |
function | (self, name: str, layer: str, source: Any, *, undo_name: str='FontParts glyph edit') -> None |