fontlabapp.studios.vertical_metrics.zones · declarations 001
Back to fontlabapp.studios.vertical_metrics.zones
CHANGED
module-attribute
CHANGED
GLYPHS
module-attribute
GLYPHS
LOCKED
module-attribute
LOCKED
RULES
module-attribute
RULES
measure
measure(package: Any, master: str, unreadable: dict[str, str] | None = None) -> dict[str, Extent]
Return the vertical extent of each of GLYPHS in master; reads only.
The extent comes from the outline nodes, not from FontLab's cached
boundingBox, which can be stale after a node move (fl#8575). A glyph
whose outline cannot be read gets None; its reason goes into
unreadable (glyph name to message) when that dict is given.
merge
merge(zones: Zones, proposed: Sequence[Suggestion]) -> tuple[Zones, list[Zone | None]]
Return zones with proposed merged in, and the zone each one replaced.
A suggestion replaces the zone of its kind at the same position, else the one with the same name, else it is added. A replaced zone keeps its name and, so, its source identity (tags and lock). A zone is replaced once.
missing
missing(extents: Mapping[str, Extent]) -> list[str]
Return the rule names that suggestions skips for extents.
outline_extent
module-attribute
outline_extent
overshoot_zone
overshoot_zone(flat: float, curved: float, top: bool) -> tuple[int, int]
Return (position, width): the flat edge and the overshoot beyond it.
preview_row
preview_row(master: str, item: Suggestion, old: Zone | None) -> list
Return one table row: master, zone, position, signed width and the replaced zone.
stage
stage(editor: Any, master: str, zones: Zones) -> Any
Return editor with zones staged for master.
suggestions
suggestions(extents: Mapping[str, Extent]) -> list[Suggestion]
Return the zones that the extents of H, O, x and o support, in rule order.
extents maps a glyph name to its (bottom, top) or None. A rule
whose flat or round glyph is None or absent gives no zone.
unchanged
unchanged(error: ValueError, found: Any) -> bool
True for an Apply refusal that left the font as it was (metrics.zones.ui._unchanged).
zone_rows
module-attribute
zone_rows