Skip to content

fontlabapp.vfjo._data · declarations 001

Back to fontlabapp.vfjo._data

fontlabapp.vfjo.KNOWN_KEYS module-attribute

KNOWN_KEYS: dict[str, frozenset[str]]

Keys a known level accepts as new keys; other new keys need add_key.

fontlabapp.vfjo.add_key

add_key(box: Box, key: str, value: Any) -> Box

Add key to box even when its level does not know it; return box.

fontlabapp.vfjo.from_clipboard

from_clipboard() -> Objects | None

Return the object JSON on the clipboard, or None when there is none.

fontlabapp.vfjo.from_glyphs

from_glyphs(glyphs: Any = None, font: Any = None) -> Objects

Export glyphs (names or flGlyph) of font as Objects.

Defaults: the current font, and its selected glyphs or else the current glyph. Raises RuntimeError with no font and KeyError for a name the font does not have.

fontlabapp.vfjo.load

load(path: str | Path) -> Objects

Read object JSON from a file.

fontlabapp.vfjo.loads

loads(data: Any) -> Objects

Return Objects from object JSON bytes, text, a mapping or Objects.

Raises ValueError when the data is not FontLab object JSON.