Skip to content

fontlab_echopy.api91

api91

Python API changes in FontLab 9.1 (build 9812), recorded from the C++ source.

The shipped stubs now come from a FontLab 9.1.9813 capture and declare these members (fgBrush.size is gone). This module records each new or removed name, its signature and its source location, and gives hasattr-based feature detection for hosts that may still run 9.0. It also gives two guarded helpers for the clipboard JSON calls.

Status: member presence and the QByteArray route are verified live on FontLab 9.1.9812 (2026-11-16): every NEW_IN_9_1 member exists by hasattr (flPackage.info members checked on a real font's info) and fgBrush.size is absent; QtCore.QByteArray(raw) round-trips through getObjectsFromJsonData. Passing a Python bytes object to getObjectsFromJsonData crashes FontLab (SIGBUS in the native QByteArray converter). Behavior (penParameters writes, expandStroke, makeStroke, presentation overrides, refresh calls) is read from the source and not live-verified.

Classes

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
CAP_PARAMS_DEFAULTS attribute
CAP_TYPES attribute
FGBRUSH_DEFAULTS attribute
FONTLAB_BUILD attribute
FONTLAB_VERSION attribute
JOIN_TYPES attribute
NEW_IN_9_1 attribute dict[str, Change]
REMOVED_IN_9_1 attribute dict[str, Change]
WARNINGS attribute
detect function (font: Any=None) -> dict[str, bool | None] Report which 9.1 members the running host exposes; False outside FontLab; Font Info entries are None unless a font is passed.
has_member function (owner: Any, member: str) -> bool Detect a feature by attribute presence; never compare build numbers.
objects_from_json function (data: Any, producer: Any=None, qbytearray: Any=None) -> list | None Call getObjectsFromJsonData safely: bytes and str are wrapped before the native call.
qbytearray_bytes function (data: Any) -> bytes Read a QByteArray as bytes with data(); bytes(qbytearray) fails in PythonQt.
to_qbytearray function (data: Any, qbytearray: Any=None) -> Any Wrap bytes, bytearray or str in a QByteArray; pass a QByteArray through.