fontlabapp.fontui.tmetrics.TMetrics
TMetrics
Owned TMetrics window over font; on_open_glyph(name) on double-click.
Source bases
Inherited member index
Source-proven inherited members; local declarations override these entries.
connect— defined byfontlabapp.fontui.lifecycle.Owned.connect
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 |
|---|---|---|---|
__init__ |
function | (self, font: Any, parent: Any=None, on_open_glyph: Any=None, text: str | None=None, *, controls: bool=True, l… |
<code>controls=False</code> hides the input rows (an app shell drives the text). |
choose_layer |
function | (self) -> None |
Select the explicit layer for outlines and metrics; guard current-master kerning. |
close |
function | (self) -> None |
Drop the callback and the font, then disconnect everything owned. |
commit |
function | (self, target: str, text: str) -> bool |
Write <code>text</code><code> to </code><code>target</code><code> (</code><code>lsb</code><code>/</code><code>rsb</code><code>/</code><code>width</code><code>/</code><code>kerning</code>) of the selection. |
commit_text |
function | (self) -> bool |
Return sends literal text to the bound FontLab glyph window when available. |
fail |
function | (self, error: Exception) -> None |
Show <code>error</code> in the status line; the window stays usable. (shared captured text) |
follow |
function | (self) -> None |
Follow callback: refresh unless the font still shows our own last write. |
follow_text |
function | (self) -> None |
Glyph-window text poll: adopt new text; the font itself did not change. |
highlight_cell |
function | (self, index: int) -> bool |
Select the glyph cell at <code>index</code> in the shaped line; True when it exists. |
highlight_pair |
function | (self, left: str, right: str) -> bool |
Select the first <code>left</code><code> glyph followed by </code><code>right</code>; True when found. |
hint_state |
function | (self, name: str | None=None) -> Any |
The hint state of <code>name</code> (default: the selected glyph) on the target layer. |
key_press |
function | (self, key: Any, modifiers: Any=0) -> bool |
Canvas keys: Alt(+Ctrl)(+Shift)+Left/Right nudge, else selection; never raise. |
nudge |
function | (self, target: str, step: float) -> bool |
Add <code>step</code><code> to the selected glyph's RSB (</code><code>rsb</code><code>) or the pair kerning (</code><code>kerning</code>). |
open_at |
function | (self, x: float, y: float) -> None |
Call <code>on_open_glyph(name)</code><code> for the glyph under </code><code>(x, y)</code>; errors go to the status. |
reflow |
function | (self) -> None |
Re-break rows for the current viewport width (after a resize). |
refresh |
function | (self) -> None |
Re-read the font and re-shape, keeping text, selection and scroll. |
select_at |
function | (self, x: float, y: float) -> None |
Select the glyph under canvas pixel <code>(x, y)</code>; a miss keeps the selection. |
select_key |
function | (self, key: Any) -> bool |
Move the selection for Left/Right/Home/End; return True when handled. |
set_layer |
function | (self, layer: str | None) -> None |
Make <code>layer</code> the explicit target of later writes and recheck the hint guard. |
set_text |
function | (self, text: str) -> None |
Show <code>text</code><code> (characters or /names) and reshape, as </code><code>TMetrics(text=...)</code> does. |
set_view |
function | (self, size: float | None=None, kerning: bool | None=None) -> float |
Set the drawing size (px/em, clamped to 8..512) and the kerning toggle; reshape once. |