fontlabapp.vfjo._edit · declarations 001
fontlabapp.vfjo.add_suffix
Append suffix to every glyph name and return obj.
By default the Unicode values (unicode, unicodes) are removed too,
so pasted copies do not clash with the originals; pass
drop_unicodes=False to keep them.
fontlabapp.vfjo.anchors
anchors(obj: Any) -> Iterator[_Data]
Yield the anchor boxes of all layers.
fontlabapp.vfjo.contours
contours(obj: Any) -> Iterator[_Data]
Yield the contour boxes (coordinates before element transforms).
fontlabapp.vfjo.edit_nodes
Replace each node by fn(node) (None keeps it); return obj.
Raises ValueError when a contour's point count changes.
fontlabapp.vfjo.elements
elements(obj: Any) -> Iterator[_Data]
Yield the element boxes, nested elementData.elements included.
fontlabapp.vfjo.layers
layers(obj: Any) -> Iterator[_Data]
Yield the layer boxes of all glyph items and layer items.
fontlabapp.vfjo.move
Move outlines, components, anchors, guidelines and hints by (dx, dy); return obj.
fontlabapp.vfjo.paste
paste(objs: Objects, font: Any = None, *, on_conflict: str = 'rename', **kw: Any) -> json_data.Pasted
Paste objs into font (default: the current font), with Undo.
Glyph data goes to json_data.paste_glyphs (new glyphs; on_conflict
is "rename" or "skip" and applies to glyph data only). FontLab may
order the new glyph's layers differently from the JSON. Layer, element or
contour data (one kind at a time) goes to json_data.paste_shapes on
the current glyph's active layer, which must belong to font: shape
data with a font other than the current font raises ValueError.
Glyph paste records one Undo step per new glyph plus one for the
outlines (json_data.GLYPHS_UNDO_TEXT); shape paste records one.
Empty data, glyphs mixed with shapes or more than one shape kind raise
ValueError; no font or no current glyph raises RuntimeError.
fontlabapp.vfjo.rename
Rename glyph items from a mapping (missing names stay) or a function; return obj.
Unicode values stay; paste drops values that clash in the font.
fontlabapp.vfjo.scale
scale(obj: Any, sx: Number, sy: Number | None = None, *, origin: tuple[Number, Number] = (0, 0), anchors: bool = True, widths: bool = False) -> Any
Scale by sx (and sy, default sx) around origin; widths scales advanceWidth.
Hint thickness scales except for ghost hints (thickness -20 or 21), which keep their value; a real stem hint of exactly -20 or 21 units stays too.