Skip to content

fontlabapp.studios.shape_generators.sansomatic

sansomatic

Construct geometric sans capitals in empty selected master layers.

What: Build A, E, F, H, I, L, N, O, S, T, V, X, Y and Z from explicit height, width, vertical stroke, horizontal stroke and side space dimensions. How: Compose rectangles, diagonal strips, an elliptical ring or a cubic S. Union the filled pieces with Qt, then use the shared contour converter and outline writer. Existing outlines, components, locked layers and linked metrics are kept and named in the preview. No glyph or layer is created. Why: FontLab's Rectangle and Ellipse tools draw individual pieces. This panel constructs complete letter skeletons across selected glyphs and masters. Explicit dimensions replace the Glyphs Dimension palette; no host callbacks are installed. Use: Select empty capital glyphs in the Font window. Set the five dimensions, inspect the non-modal preview and choose current or all masters. Press Build. To give each master its own dimensions, untick Keep masters compatible, choose Current master, and set that master's dimensions before Build. Each changing action is recorded as one Undo step. Clear an outline with native FontLab tools before building that glyph again. Unsupported capitals are kept. Benefit: Start a consistent geometric alphabet without overwriting existing work. Diagonal ends are horizontal at the baseline and cap height. S spans both levels. The common dimensions are a construction model; per-letter source sliders and the source's continuous destructive redraw are replaced by explicit Build.

Independent behaviour rewrite after Simon Cozens, Sansomatic.py, MIT. Repository: https://github.com/simoncozens/GlyphsScripts . No source code copied.

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
KEY attribute
LETTERS attribute
TITLE attribute
build_path function (commands: list[tuple]) -> Any Union detached pieces with Qt; subtract only the O's inner ellipse.
design function (letter: str, height: float, breadth: float, vertical: float, horizontal: float, margin: float) -> tuple[list… Return detached path instructions and an advance, with finite dimensions.
editor_type function () -> type Use the shared outline transaction; prepare all contours before history.
layer_reason function (layer: Any) -> str Keep authored layers; this generator fills empty manual layers only.
main function () -> None Contain host capture and construction failures.
panel_type function () -> type Build the owned modeless outline panel with explicit dimensions.
run function () -> Any Open or replace the owned panel.