Skip to content

fontlabapp.fontui.lifecycle · declarations 001

Back to fontlabapp.fontui.lifecycle

CHANGE_DELAY_MS module-attribute

CHANGE_DELAY_MS

CHANGE_SIGNALS module-attribute

CHANGE_SIGNALS

GLYPH_SIGNALS module-attribute

GLYPH_SIGNALS

HISTORY_ACTIONS module-attribute

HISTORY_ACTIONS

UNFINISHED_EDITS module-attribute

UNFINISHED_EDITS

follow_changes

follow_changes(owner, callback, fonts, delay_ms=CHANGE_DELAY_MS)

Call callback after FontLab reports changes; return signals connected.

Connected whenever FontLab is present (nothing outside it); fonts() is read at each signal, so an owner whose fonts appear later starts following then. Signals count only while fonts() holds a FontLab-backed font, and glyph(s)Updated only for those documents. The first signal arms a single-shot timer that later signals never restart, so callback runs at most delay_ms after the first change even under a steady stream. Signals emitted while any follower's callback runs (refresh reads or writes, also from other open controls) are ignored, no callback is re-entered, and a timer that fires during another follower's callback runs after it. Before it, each FontLab-backed (Fontport) font is refreshed, which drops its loaded glyph and layer handles. owner.close() disconnects everything; a pending timer then fires into nothing.

follow_history

follow_history(owner, callback)

Call callback after FontLab's Undo/Redo actions; return connections made.

FontLab connects its own handlers first, so ours run after the history step. Outside FontLab (no fontlab module) nothing is connected. owner.close() disconnects these like every other owned connection.

native_ids

native_ids(fonts)

FontLab package ids of Fontport-backed fonts among fonts.