Skip to content

fontlabapp.studios.vertical_metrics.diagram

diagram

Diagram tab (read only): Vertical Metrics Diagram (Metrics) and Nodes Near Zones (Reports).

Diagram: one column per master draws the outlines of H, x, b and p against that master's baseline, ascender, cap height, x-height and descender (FontMetrics(package, master); the current master is never switched). One scale fits every master. A sample glyph that is missing, or has no layer in a master, is listed below and left out. Drawing errors stay in the panel.

Nodes Near Zones: on-curve nodes that sit within the tolerance (1–30 units, default 4) of a master's baseline, x-height, cap height, ascender or descender but not on it, in the selected glyphs or all glyphs (the default when nothing is selected). Selecting a row shows that glyph and master in the TMetrics preview; "Select glyphs" selects the listed (or the chosen) glyphs in the Font window of the font that was scanned.

The tab never writes the font and never opens a history step.

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
BOTTOM_MARGIN attribute
FIELDS attribute
FILL attribute
FOOT attribute
HEAD attribute
LABEL_GAP attribute
LABEL_WIDTH attribute
RIGHT_PAD attribute
SAMPLE attribute
TOLERANCE attribute
TOP_MARGIN attribute
collect function (package: Any, masters: list[str]) -> tuple[dict[str, list[tuple[str, Any, float]]], float, list[str]] Read the sample glyphs: ({master: [(name, path, advance)]}, widest line, notes).
frame function (width: float, height: float, metrics: list[dict[str, float]], sample_width: float) -> Frame Fit all masters' metrics and the widest sample line into the widget.
line_start function (area: Frame, line_width: float) -> float Unit offset that centres a sample line of <code>line&#95;width</code> units in a column.
master_metrics function (package: Any, master: Any) -> Any [(label, y)] vertical metrics of one master.
metrics_panel attribute
near_misses function (points: Any, metrics: Any, tolerance: Any) -> Any [(label, metric y, node x, node y)] for points with 0 < |y - metric| <= tolerance.
on_curve_points function (layer: Any) -> Any [(x, y)] of the layer's own on-curve nodes with each shape's transform applied.
outline function (layer: Any) -> Any The layer outline as one QPainterPath in font units; read in place.
read_metrics function (package: Any, masters: list[str]) -> dict[str, dict[str, float]] {master: {attribute: value}} from FontMetrics; never switches the master.
scan function (package: Any, names: Any, tolerance: Any) -> Any [(glyph, master, metric label, metric y, node x, node y)].