fontlabapp.fontui.tglyph_model · declarations 001
Back to fontlabapp.fontui.tglyph_model
FIT_MARGIN
module-attribute
FIT_MARGIN
HIT_TOLERANCE
module-attribute
HIT_TOLERANCE
IDENTITY
module-attribute
IDENTITY
MAX_SCALE
module-attribute
MAX_SCALE
MIN_SCALE
module-attribute
MIN_SCALE
ZOOM_STEP
module-attribute
ZOOM_STEP
bounds
bounds(data: GlyphData | None) -> tuple[float, float, float, float] | None
(xMin, yMin, xMax, yMax) of every contour and component point, or None.
default_layer
default_layer(font: Any) -> str
The font's default layer name (public.default when it names none).
fingerprint
Digest every value TGlyph shows; equal digests mean nothing visible changed.
hit_point
hit_point(data: GlyphData | None, view: View, sx: float, sy: float, tolerance: float = HIT_TOLERANCE) -> tuple[int, int] | None
(contour, point) index of the nearest own point within tolerance pixels.
layer_names
layer_names(font: Any) -> list[str]
The font's layer (master) names in order; the default layer alone when unknown.
neighbour
neighbour(order: list[str], name: str, step: int) -> str | None
The glyph step places from name in order, wrapping; None when empty.
own_glyph
own_glyph(font: Any, name: str, layer: str, reason: str) -> GlyphData | None
Read name's own contours when its components cannot load, or None.
Fontport's layer[name] loads the whole component graph first and
raises UnsupportedCapability for a cyclic or missing base. Its public
edit_glyph stages a copy straight from the backend without resolving
components; aborting the block inside skips the write. Components are kept
with their own decomposition error (reason when the layer cannot be
read at all) and no decomposed contours when that fails.
read_glyph
read_glyph(font: Any, name: str, layer: str) -> GlyphData
Read name on layer of font into plain values.
Raises KeyError when the layer or the glyph does not exist; every other backend error propagates for the caller's status line.
signature
signature(data: GlyphData | None) -> tuple
Point structure without coordinates: equal while points only move.