fontlabapp.masters.inspect.model
model
Shared read-only native master reads and original twelve-step area calculations.
Imports remain host-free. Native access is lazy; no glyph FontGate getter, font/history notification or stored-data write is used by these reports.
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 |
|---|---|---|---|
METRICS |
attribute | ||
STAMP_FORMAT |
attribute | ||
STEPS |
attribute | ||
all_names |
function | () -> list[str] |
Read font order from the already available FontGate font, never flGlyph.fgGlyph. |
associated_master |
function | (name: str, masters: Sequence[str]) -> str | None |
Return the master that a layer name belongs to, or None. |
backup_layer_name |
function | (base: str, taken: Iterable[str], suffix: str, masters: Sequence[str]) -> str |
Return a unique <code><base> backup <suffix></code> name, or raise ValueError. |
backup_master |
function | (name: str, masters: Sequence[str]) -> str | None |
Return the master of a plain or legacy backup layer, or None. |
check_glyph |
function | (glyph: Any, masters: list[str]) -> tuple[dict[str, Any], bool, list[str]] |
({master: signature or None for auto layers}, ok, [differing aspects]). |
default_suffix |
function | (now: datetime) -> str |
Format <code>now</code> for the backup suffix field, with seconds and a short date. |
ink_area |
function | (contours: list[list[tuple[float, float, bool]]]) -> float |
Filled area of contours [(x, y, on)]: + for even nesting depth, - for odd (counters). |
inside |
function | (point: tuple[float, float], poly: list[tuple[float, float]]) -> bool |
Use ray crossings to determine counter nesting independently of winding. |
is_backup_layer |
function | (name: str, master: str, masters: Sequence[str]) -> bool |
Return True if <code>backup_master(name, masters)</code><code> is exactly </code><code>master</code>. |
italic_angles |
function | (package: Any, masters: list[str]) -> dict[str, float] |
{master: italic angle}; switches the current master briefly and always restores it. |
label_tops |
function | (ys: list[float], height: float) -> list[float] |
Tops of value labels for points sorted top to bottom: above the point, or below it when the label above would collide with the previous one, pushed further down if still crowded. |
layer_contours |
function | (layer: Any) -> list[list[tuple[float, float, bool]]] |
Own and component contours, components placed by their transforms. |
location_text |
function | (package: Any, master: str) -> str |
Format axes in font order, displaying ? for unavailable location coordinates. |
master_layers |
function | (glyph: Any, masters: list[str]) -> dict[str, Any] |
{master: flLayer} for the masters present in this glyph. |
master_order |
function | (package: Any) -> list[str] |
Masters sorted by their location on the first axis (font order when there is no axis). |
muted |
function | (widget: Any, alpha: int=150) -> str |
Copy the original active theme color before changing its alpha. |
nice_ticks |
function | (low: float, high: float, count: int=5) -> list[float] |
Cover both endpoints with nice ticks, retaining a nonzero constant-range axis. |
node_points |
function | (contour: Any) -> list[tuple[float, float, bool]] |
Read contour coordinates and on/handle flags in original node order. |
overview |
function | (package: Any) -> list[tuple[str, str, float, float, float, float, float]] |
[(master, location, ascender, cap height, x-height, descender, italic angle)]. |
own_contours |
function | (layer: Any) -> list[Any] |
Contours drawn in this layer; layer.getContours() also lists the contours of components. |
polygon |
function | (points: list[tuple[float, float, bool]]) -> list[tuple[float, float]] |
Flatten [(x, y, on)] of a closed contour: cubic for two handles, polyline otherwise. |
selected_names |
attribute | ||
signature |
function | (layer: Any) -> tuple[tuple[str, ...], tuple[str, ...], tuple[str, ...]] |
Comparable structure of a layer: contour node patterns, anchor names, component bases. |
spread |
function | (ys: list[float], gap: float) -> list[float] |
Sorted label positions pushed apart so neighbours are at least gap apart. |
summary |
function | (sig: Any) -> tuple[int, int, int, int] |
Return displayed contour, node, anchor and component counts for a signature. |
widths |
function | (glyph: Any, masters: list[str]) -> list[tuple[str, float | None]] |
[(master, advance width or None)] in the given master order. |