Skip to content

fontlabapp.fontui.teaching_painter.outline_svg · declarations 001

Back to fontlabapp.fontui.teaching_painter.outline_svg

HELP module-attribute

HELP

KEY module-attribute

KEY

TITLE module-attribute

TITLE

capture_outline

capture_outline() -> tuple[str, Any, tuple[float, float, float]]

Double-check the current context and geometry around a detached Qt path.

Read only the current-master layer. App resolves transformed components. Compare raw geometry, layer and glyph ids, package ids and master before returning. Never read the native fgGlyph cache or notify font history.

font_frame

font_frame(path: Any, metrics: tuple[float, float, float]) -> tuple[int, int, int, int]

Unite ink with origin and metrics; round outward to whole font units.

Equal integer viewport and viewBox dimensions keep user units at 1:1. Outward rounding retains fractional overhangs without translating artwork.

main

main() -> Any

Use FontLab's existing application and App's retained panel registry.

panel_type

panel_type(qt: Any) -> type

Bind a modeless snapshot panel to FontLab's Qt and owned signal scope.

save_svg

save_svg(filename: str, text: str) -> None

Save an explicit absolute SVG path once; refuse overwrites and empty output.

suggested_svg_path

suggested_svg_path(label: str) -> str

Suggest an absolute Desktop filename; never create a directory or file.

svg_text

svg_text(qt: Any, path: Any, label: str, frame: tuple[int, int, int, int]) -> str

Let Qt serialize the complete painted path; preserve curves and fill rule.

SVG is visual artwork, not a source-font backup: anchors, metrics, hints, names and raw node flags are not exported. Invert y once for SVG coordinates. Always end the owned painter, including errors, before releasing its buffer.