Skip to content

fontlabapp.components.decompose · declarations 001

Back to fontlabapp.components.decompose

MAX_DEPTH module-attribute

MAX_DEPTH

Row module-attribute

Row

owner_master

owner_master(package: Any, layer: Any, items: Callable[[Callable[[], Any]], list[Any]]) -> str

The master that owns the shown layer: its name when it is a master.

Else package.master, so a shown mask or brace layer uses the current master (b: Glyport native_reference). Plugmix metrics, kerning groups and requested glyphs use the same rule. The current master's own layer skips the masters read, which every Plugmix paint would otherwise pay.

read

read(package: Any, name: str, layer: Any, contours: Callable[[Any], tuple[Any, ...]], *, items: Callable[[Callable[[], Any]], list[Any]], revision: Callable[[Any], Any], report: Callable[[Exception], object]) -> tuple[tuple[Row, ...], tuple[tuple[str, Any], ...]]

Return (rows, stamps) for glyph name's displayed layer.

Each row is (base, transform, contours) for one top-level component; its contours include nested components and are in layer units. contours(layer) reads a layer's own outlines. stamps holds (base name, revision or None) for every base looked up, so a cache can notice base edits, which do not move the composite's stamp (c). An empty componentLayer names the owner master: layer.name when it is in package.masters, else package.master (so a shown mask or brace layer uses the current master). A non-empty name applies only to its own reference. A cycle (by glyph name, so a reference to another layer of the same glyph is refused too), a nesting deeper than MAX_DEPTH, a non-affine transform or a missing base or layer skips that component; each base is reported once.