Skip to content

fontlabapp.fontui.teaching_painter.sketch

sketch

What: Sketch construction ideas over a detached current-glyph outline. How: Capture the current glyph in the current master. Fit its complete Qt path into an owned canvas. Use its Base and Text palette roles for painting. Store pen strokes in font units with y increasing upward. SVG keeps a fixed stroke. Why: A detached sketch protects the glyph while keeping meaningful coordinates. Usage: Open a glyph, then Capture. Drag to draw. Undo Stroke removes one stroke; Clear removes the local sketch. SVG Text produces strokes for an external vector editor, without the reference outline. Copy SVG Text before closing to retain it. Capture refuses to replace a nonempty sketch. Close drops scratch strokes and always permits application quit. No font or filesystem writes occur. Benefit: Explore construction changes beside FontLab and keep reusable SVG lines.

Setup: FontLab 9, Python 3.11, Fly and fontlabapp. Modeless panel. App owns signals and completion. Independent rewrite of the Qt Scribble example idea (Riverbank Computing, Nokia). Based on the author's own FontLab sample, Apache-2.0. Idea only; no upstream code or assets included.

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
Box attribute
MAX_POINTS attribute
Point attribute (shared captured text)
canvas_type function (qt: Any, status: Any, changed: Any) -> type Create a bounded local canvas.
capture_outline function () -> tuple[str, Any, Box] Capture once under a deadline.
main function () -> Any Compatibility entrypoint for the retained standalone lesson.
panel_type function (qt: Any) -> type Open the modeless App shell with a detached vector sketch surface.
sketch_svg function (label: str, strokes: list[list[Point]], box: Box) -> str Return only pen strokes as SVG.