fontlabapp.studios.outline_doctor.model
model
Outline Doctor data types and the shared native-outline helpers.
What: Option (one control of a check), Issue (one planned or reported
row, with its native edit payload, its compatibility key, the after-geometry
for the ghost and the points to highlight), Context (what a planner may
read besides its layer) and Check (one registry entry: detect, fix and
verify). The helpers port fontlabapp.contours.writer: editable outline
shapes, plain translations, node points, area and the compatibility hold-back.
Why: the studio boundary forbids fontlabapp.contours; fixes and
reports share these, and session drives every Check the same way.
Classes
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 |
|---|---|---|---|
EPSILON |
attribute | (shared captured text) | |
MIXED |
attribute | ||
OUTSIDE |
attribute | ||
Planner |
attribute | ||
Point |
attribute | (shared captured text) | |
Verifier |
attribute | ||
Writer |
attribute | ||
after |
function | (position: int, index: int, points: Sequence[Point] | None, shape: Any) -> tuple |
One <code>Issue.after</code><code> entry: deleted (None) or replaced by </code><code>points</code>. |
contours |
function | (layer: Any) -> list[tuple[int, int, int, Any, Any]] |
(number, position, index, shape, contour) over the editable outlines; numbers count from 1. |
fmt |
function | (value: float) -> str |
|
held_back |
function | (planned: Mapping[str, list[Issue]], chosen: Sequence[str]) -> str |
The compatibility hold-back reason for one glyph, or "" when the edit may go ahead. |
moved |
function | (points: Sequence[Point], shape: Any) -> tuple[Point, ...] |
<code>points</code> in glyph coordinates (plain-translated shapes only). |
node_points |
function | (contour: Any) -> list[Point] |
(x, y, on-curve) of every node, in stored order and shape coordinates. (shared captured text) |
note_rows |
function | (notes: Sequence[str]) -> list[Issue] |
|
outline_shapes |
function | (layer: Any) -> tuple[list[tuple[int, Any]], list[str]] |
(position, shape) of the editable own outlines and notes for the rest. |
plural |
function | (count: int, word: str) -> str |
|
segments_of |
function | (points: Sequence[Point], truetype: bool) -> tuple[tuple[tuple[float, float], ...], ...] |
Closed line/cubic/quadratic segments starting at the first on-curve node. |
translation |
function | (shape: Any) -> tuple[float, float] | None |
(dx, dy) when the shape transform only moves; None for scale, slant or turn. |
unsigned_area |
function | (segments: Sequence[tuple[tuple[float, float], ...]]) -> float |
Exact area of closed line/quadratic/cubic segments (Green's theorem). |