fontlabapp.core.history.masters · declarations 001
Back to fontlabapp.core.history.masters
RESTORED_TEXT
module-attribute
RESTORED_TEXT
THREAD_TEXT
module-attribute
THREAD_TEXT
UNRESTORED_HINT
module-attribute
UNRESTORED_HINT
WINDOW_TEXT
module-attribute
WINDOW_TEXT
commit_masters
commit_masters(package: Any, title: str, edits: Mapping[str, MasterEdit], *, native: Any = None, restored_text: str = RESTORED_TEXT) -> MastersCommitted
Write edits as ONE native Undo step. See the module text for the order.
package: the flPackage. title: the Undo name. edits:
master name -> MasterEdit. native: the fontlab module
(default: the native one). restored_text: the end of the
RolledBackError text, for a caller whose restore re-creates native
objects (zones). Raise ValueError before any history call
for a refusal, RolledBackError after a restored failure and
UnrestoredError when a restore or the notification failed.
After Undo/Redo of the step, FontLab 9.0.9790 shows 3 of 9 font-metric (fl#8574)
guidelines until updateFontMetrics() or a reopen (host defect; the
saved file is correct).
require_font_window
require_font_window(package: Any, native: Any = None) -> None
Refuse unless this runs on the GUI thread with the Font window active.
Raise ValueError(THREAD_TEXT) on another thread. Then raise
ValueError(WINDOW_TEXT) when edit_guards.require_selection_window
refuses (no Font window of this font is active; its own selection text
stays for selection writers), when a Glyph window is the active canvas,
or when the canvas cannot be read. Call it before any master switch.