Skip to content

fontlabapp.studios.vertical_metrics.zones

zones

Zones tab: Alignment Zones (Metrics) and Suggest Zones From Overshoots (Guides).

Refresh captures every master's zones (metrics.zones.native.capture) into one metrics.zones.model.Editor. The zone table shows the staged zones of the chosen master (Kind, Position, Width, Name; double-click to edit); "Add top zone", "Add bottom zone", "Remove selected" and "Suggest from o / O" stage edits as in Alignment Zones, and edits of other masters are kept when you switch. "Suggest from overshoots" measures H, O, x and o (outline geometry, never the cached box, fl#8575) in the current or every master and stages the original suggestions (suggestions/merge: replace the zone of the same kind at the same position, else the one of the same name, else add; a replaced zone keeps its name, tags and lock), listed with the zone each one replaces. The pending list names every master with a change.

"Set zones" writes the staged plan of every changed master through the original route-A writer (metrics.zones.native, commit_masters) as ONE Vertical Metrics: set zones of <masters> Undo step. It refuses first when H, O, x or o changed since the overshoot preview, then the writer refuses row errors (RowRefusal), a call off the GUI thread or without the Font window, and a font that changed since Refresh. Those refusals leave the font and the stages as they were. Any other failure can leave masters partly written: the tab locks until the app is reopened, as the originals did. The serializer route (zone_capture/zone_prepare/zone_write_plan) stays held (fl#8554) and is not used.

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
CHANGED attribute
GLYPHS attribute
LOCKED attribute
RULES attribute
measure function (package: Any, master: str, unreadable: dict[str, str] | None=None) -> dict[str, alignment_zones.Extent] Return the vertical extent of each of <code>GLYPHS</code><code> in </code><code>master</code>; reads only.
merge function (zones: Zones, proposed: Sequence[Suggestion]) -> tuple[Zones, list[Zone | None]] Return <code>zones</code><code> with </code><code>proposed</code> merged in, and the zone each one replaced.
missing function (extents: Mapping[str, alignment_zones.Extent]) -> list[str] Return the rule names that <code>suggestions</code><code> skips for </code><code>extents</code>.
outline_extent attribute
overshoot_zone function (flat: float, curved: float, top: bool) -> tuple[int, int] Return <code>(position, width)</code>: the flat edge and the overshoot beyond it.
preview_row function (master: str, item: Suggestion, old: Zone | None) -> list Return one table row: master, zone, position, signed width and the replaced zone.
stage function (editor: Any, master: str, zones: Zones) -> Any Return <code>editor</code><code> with </code><code>zones</code><code> staged for </code><code>master</code>.
suggestions function (extents: Mapping[str, alignment_zones.Extent]) -> list[Suggestion] Return the zones that the extents of H, O, x and o support, in rule order.
unchanged function (error: ValueError, found: Any) -> bool True for an Apply refusal that left the font as it was (<code>metrics.zones.ui.&#95;unchanged</code>).
zone_rows attribute