fontlabapp.studios.vertical_metrics.table
table
Metrics table tab: Master Metrics Table (Font Info).
One editable row per master: ascender, descender, x-height and cap height,
read as the writer reads them back (master_values). An edited cell is
validated with the original rule (validate_metrics: finite 16-bit values,
descender ≤ 0 ≤ x-height ≤ cap height ≤ ascender) and listed in the dry run
("Master · field", "Current", "New"). "Set metrics" writes exactly that list
through the original route-A writer, metrics.master_writer.write_master_metrics,
as one Vertical Metrics: set metrics of <masters> Undo step; it first
refuses without the Font window (require_font_window) and refuses a value
that changed since the preview. Selecting a row shows that master in the
TMetrics preview and draws its edited metrics as five labelled guides with
a shaded x-height band. The Diagram tab draws every master.
The writer changes master metadata only; it never moves glyphs, so a selected composite and its base cannot be shifted twice (Scriptmix TODO:74 is disclosed, and the capHeight write is measured natively in T29).
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 |
|---|---|---|---|
COLUMNS |
attribute | ||
FIELD_LABELS |
attribute | ||
MASTER_FIELDS |
attribute | ||
master_values |
function | (package: Any) -> list[tuple[str, list[float]]] |
Read all master metrics, as the writer reads them back; restore the master (original). |
number |
function | (value: float) -> str |
|
plan |
function | (old: list[tuple[str, list[float]]], rows: list[tuple[str, list[float]]]) -> list[tuple] |
Validate every proposed row (as <code>run</code><code> did) and return the changed </code><code>(master, field, previous, value)</code>. |
validate_metrics |
function | (values: list[float]) -> list[float] |
Require four finite ordered metrics within signed 16-bit limits. |
write_changes |
function | (package: Any, changes: list[tuple], title: str) -> dict[str, Any] |
Write the changed values of a validated plan as one Undo step named <code>title</code> (original). |