Skip to content

fontlabapp.fontui.tglyph_model.TGlyphModel

TGlyphModel dataclass

The shown glyph, its layer, metrics, view and point selection.

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
__post_init__ function (self) -> None
box function (self) -> tuple[float, float, float, float] The advance box (0..width, descender..ascender) united with the outline bounds.
data attribute GlyphData | None
fingerprint function (self) -> str Digest of the font as this window shows it, read fresh (for <code>Echo</code>).
fit function (self, width: float, height: float) -> None
font attribute Any (shared captured text)
glyph_order function (self) -> list[str] Glyph names in the font's glyph order, falling back to its keys.
layer attribute str | None
layers function (self) -> list[str]
load function (self, name: str | None, layer: str | None=None) -> None Show <code>name</code><code> (and </code><code>layer</code> when given): clear the selection and re-read.
metrics attribute Metrics
name attribute str | None (shared captured text)
read function (self) -> None Re-read metrics and the glyph; failures become <code>status</code> and no data.
refresh function (self) -> bool Re-read the same glyph; keep the selection while the point structure holds.
select_at function (self, sx: float, sy: float, extend: bool=False) -> tuple[int, int] | None Select the point under <code>(sx, sy)</code><code>; </code><code>extend</code> toggles it.
selection attribute set[tuple[int, int]]
status attribute str
view attribute View