Skip to content

fontlabapp.fontui.teaching_text.console

console

Query current-font name, Unicode and modification data with trusted Python.

What: Evaluate short expressions or statements on detached glyph records. How: Capture once on the UI thread with a glyph-count-scaled deadline and a Scanning label (at most 120 seconds). Build the namespace once. No worker or conversion timer is used. Why: Test report expressions without giving the query namespace native handles. Usage: Capture, enter Python, then Run or press Return. For example, [g['name'] for g in glyphs if not g['unicode']]. The unicode field is a string such as "U+0041 U+00C1"; modified is "yyyy-MM-dd HH:mm:ss", or empty if unset. Select output and copy to a script or report. Capture resets local variables. Choose the query deadline: 5 seconds by default, at most 60 seconds. A Python trace guard stops Python loops and restores the earlier host trace. A loop in native code without Python line events cannot be stopped by this guard. Code that catches every exception can outlive the time limit. Benefit: Experiment with real glyph data and keep complete query results. This runs trusted code in the host process, not a security sandbox. User code can change detached data. The panel itself calls no font writer. Setup: FontLab 9, Python 3.11, Fly and App glyph_catalog/draft_signals/scripting. Independent rewrite of timer-batch and owned-repl. Based on the author's own FontLab sample, Apache-2.0. No original source body is redistributed.

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
BUILTINS attribute
FIELDS attribute
HELP attribute
TITLE attribute
build function (parent: Any=None) -> Any Build the original controls as a hidden child for an owned lab tab.
capture_current function (status_line: Any) -> Any Scale the scan budget up to 120 seconds; never reject a font by size.
evaluate function (source: str, namespace: dict[str, Any], seconds: float=5.0) -> str Bound trusted Python execution; chain global/local traces and restore both.
main function () -> None Resolve the running FontLab window lazily; never create an application.
show function (qt: Any, parent: Any, *, embedded: bool=False) -> Any Open an owned tool window; use App to fence and disconnect callbacks.
snapshot_namespace function (rows: tuple[tuple[str, str, str], ...]) -> dict[str, Any] Build one detached namespace; reuse the single built-in dictionary.