fontlabapp.metrics.panel.ui.MetricsPanel
MetricsPanel
Non-modal panel: masters, script controls, live preview table, Apply, Close.
What: a subclass sets TITLE, KEY, HEADERS (preview columns
after "Glyph ยท master") and ACCENT (column numbers shown bold in the
link colour), and fills in build, subtitle_hint and planner.
Optional hooks: target_glyphs, empty_message, sync_controls.
How: every control change recomputes the preview from the live font.
Component facts are shared by transitive skips and rebuild warnings;
construction, Undo/Redo, Refresh, Use selection and Apply refresh them.
Apply plans again with fresh facts and writes through
metrics_panel.commit (one Undo step, geometry policy). The panel binds
to the font that was current when it opened; a switched font is refused.
A base of auto composites needs the ALLOW_AUTO_LABEL tick, and the
tick belongs to exactly the glyphs that change now.
Why: the preview can never be stale at Apply, and slot errors stay in the
status line instead of reaching FontLab. Show it with
scripting.show_script_dialog(Subclass, Subclass.KEY).
Source bases
QtGui.QDialog(not resolved from selected source)
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 |
|---|---|---|---|
ACCENT |
attribute | tuple[int, ...] |
|
HEADERS |
attribute | tuple[str, ...] |
(shared captured text) |
KEY |
attribute | (shared captured text) | |
MIN_WIDTH |
attribute | ||
TITLE |
attribute | (shared captured text) | |
__init__ |
function | (self, parent: Any=None) -> None |
Build all widgets first. |
apply |
function | (self) -> None |
Plan and scan again from the live font, then write. |
build |
function | (self) -> None |
Create the controls. |
chosen_masters |
function | (self, package: Any) -> list[str] |
Return the captured master, or all masters requested by the control. |
closeEvent |
function | (self, event: Any) -> None |
Disconnect owned signals. |
empty_message |
function | (self) -> str |
Return the reason shown when no glyph qualifies. |
fill_table |
function | (self) -> None |
Show the plan. |
font_package |
function | (self) -> Any |
Return the bound font. |
make_entries |
function | (self) -> list[Entry] |
Plan all target layers from the live font. |
overridden |
function | (self, entries: list[Entry]) -> bool |
Return True when the tick belongs to exactly these changed glyphs. |
override_toggled |
function | (self) -> None |
Bind a tick to the glyphs that change now. |
planner |
function | (self, package: Any, glyphs: list[Any]) -> Planner |
Return the function that plans one layer for the current settings. |
rebuild_note_for |
function | (self, todo: list[Entry]) -> str |
Return the rebuild warning for <code>todo</code>. |
refresh |
function | (self) -> None |
Recompute the preview. |
refresh_target |
function | (self) -> None |
Reload dependency facts and the plan without replacing captured targets or settings. |
refusal |
function | (self, note: str) -> str |
Return the text that says why a base of auto glyphs is not edited. |
reselect |
function | (self) -> None |
Take the glyph selection from the Font window again. |
rows |
function | (self) -> list[Entry] |
Return the entries that get a table row: edits and explained skips, not no-ops. |
spin |
function | (self, low: int, high: int, value: int, suffix: str='') -> Any |
Return a right-aligned integer spin box that refreshes the preview. |
subtitle_hint |
function | (self) -> str |
Return one sentence that says what the current settings will do. |
sync_controls |
function | (self) -> None |
Enable or disable controls to match the other controls. |
target_glyphs |
function | (self, package: Any) -> list[Any] |
Return the glyphs to edit. |
watch |
function | (self, signal: Any) -> None |
Refresh the preview whenever <code>signal</code> fires (guarded slot). |