Skip to content

fontlab_glyport.model.fontlab_backend.FontLabBackend · declarations 002

Back to fontlab_glyport.model.fontlab_backend.FontLabBackend

glyphs

glyphs(font_id: str) -> tuple[GlyphInfo, ...]

guide_selected

guide_selected(guide_id)

hints

hints(layer_id: str) -> tuple[HintInfo, ...]

insert_path

insert_path(layer_id: str, index: int, path: PathInfo) -> str

A new one-contour shape before the shape that holds the entry at index of the layer's shape order (path and component ids); a negative or past-the-end index appends.

insert_path_node

insert_path_node(path_id: str, index: int, node: NodeInfo, *, on_attach: Callable[[str], None] | None = None) -> str

Insert one native node without retiring retained handles.

Register and attach before fallible cache updates: a failed publication still leaves the caller bound to the node that really entered the path. Closed append inserts after the old native start, then moves that same start object to the end. Unlike setStartPoint, this admits controls as temporary first nodes, without smoothing or replacing any old node.

instances

instances(font_id: str) -> tuple[InstanceInfo, ...]

is_valid

is_valid(id: str) -> bool

kerning

kerning(font_id: str, master_id: str) -> tuple[KerningPair, ...]

kerning_classes

kerning_classes(font_id: str, master_id: str | None = None) -> tuple[KerningClassInfo, ...]

kerning_revision

kerning_revision(font_id)

Observe native kerning Undo without invalidating geometry snapshots.

MCP kerning commands attach history to the current kerning container, independently of package history. Its identity also tracks master changes. Never request this native container from an unregistered owned package.

kerning_write_revision

kerning_write_revision(font_id, master_ids, containers=None)

Validate every master in a writer snapshot using retained live handles.

Native PackageImpl retains each container by master name until package release. Capture handles with bounded master scopes once; warm checks do not switch masters or enumerate classes. Check the live current identity too, so a replaced container cannot authorize the previous snapshot.

layer

layer(glyph_id: str, master_id: str) -> LayerInfo

layer_bounds

layer_bounds(layer_id: str)

layer_location

layer_location(layer_id)

layer_metrics_key

layer_metrics_key(layer_id, side)

layer_vertical_width

layer_vertical_width(layer_id: str) -> float | None

lib

lib(id: str) -> dict

list_fonts

list_fonts() -> tuple[str, ...]

make_node_first

make_node_first(node_id: str) -> None

Glyphs' makeNodeFirst: the node becomes the contour's start node.

mark

mark(id: str) -> int

master_guides

master_guides(master_id)

master_metrics

master_metrics(master_id: str) -> MasterMetrics

fontlab.FontMetrics(package, master) gives the vertical metrics of any master. FontLab has no per-master italic angle accessor: the current master's italicAngle_value is read, another master made current for the read and then restored (no undo step: native check in glyport-matrix legacy-syntax).

master_zones

master_zones(master_id)

node_name

node_name(node_id)

node_selected

node_selected(node_id)

open_edit_view

open_edit_view(font_id: str) -> None

Open a literal empty tab, as Glyphs' addTabWithDisplayString_("") does.

outline_layer

outline_layer(layer_id: str) -> LayerInfo

Snapshot a master, auxiliary or background layer using existing readers.

path_attributes

path_attributes(path_id)

path_grouping

path_grouping(layer_id)

Remember contour counts, without retaining history-owned shapes.

prepare_collection

prepare_collection(layer_id, field, *, state=None)

Stage detached geometry, checkpoint originals, then attach clones.

proxy_parent

proxy_parent(token)

Current logical parent, already reconciled by proxy validation.

redraw_edit_view

redraw_edit_view(font_id)

remove_anchor

remove_anchor(layer_id: str, anchor_id: str) -> None

remove_axis

remove_axis(font_id: str, index: int) -> None

Native fact (probe-axes-instances-run1): flPackage has no removeAxis; assigning the axes list without the axis removes it.

remove_component

remove_component(layer_id, component_id)

remove_glyph

remove_glyph(font_id, glyph_id)

remove_guide

remove_guide(layer_id, guide_id)

remove_hint

remove_hint(layer_id: str, index: int) -> None

remove_instance

remove_instance(font_id: str, index: int) -> None

remove_path

remove_path(layer_id: str, path_id: str) -> None