fontlabapp.studios.advance_widths.widths
widths
Advance Widths plans, dry-run snapshots and the one write path. Qt-free.
What: the Scriptmix constants and planners of Round Advances, Scale
Advances, Tabular Width and Zero-Width Marks (copied unchanged), the layer
survey of fontlabapp.metrics.panel.model and apply: it writes exactly
the entries a tab showed, refuses with "press Refresh" when a planned layer
changed after the dry run, and commits every layer through one
AppShell.history call labelled "Advance Widths: <action> <subject>"
(Issue 235 §1.3/§1.4). shift_and_set moves the outline and sets the
advance of each explicit layer, as the originals did.
Used by the tabs of fontlabapp.studios.advance_widths.
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 |
|---|---|---|---|
APP |
attribute | (shared captured text) | |
CURRENCY |
attribute | ||
DIRECTIONS |
attribute | ||
FIGURES |
attribute | ||
FIXED_DEFAULT |
attribute | ||
MARK_CATEGORIES |
attribute | ||
MAX_CODE_POINT |
attribute | ||
PERCENT_DEFAULT |
attribute | ||
PLACEMENTS |
attribute | ||
ROUNDING_NOTE |
attribute | ||
SETS |
attribute | ||
SOURCES |
attribute | ||
STALE |
attribute | ||
STEP_DEFAULT |
attribute | ||
STEP_MAX |
attribute | ||
STEP_MIN |
attribute | ||
WIDTH_MODES |
attribute | ||
apply |
function | (tool: Any, action: str, work: list[Any], shown: tuple, *, allow_bases: bool=False) -> bool |
Write exactly <code>work</code> (the shown pending entries) as one named Undo step. |
auto_facts |
function | (package: Any) -> Any |
Whole-font auto-layer facts (<code>core.history.glyphs.scan_auto_facts</code>). |
check_tabular |
function | () -> Any |
Check Tabular Widths: <code>metrics.tabular_width.model.capture()</code> (reads only). |
find_glyphs |
function | (package: Any, names: Iterable[str]) -> list[Any] |
The existing glyphs of <code>names</code><code> in </code><code>package</code>, in order. |
fingerprint |
function | (entries: list[Any]) -> tuple |
The dry-run snapshot of <code>entries</code>: (glyph, master, advance, ink edges). |
glyph_unicodes |
function | (package: Any, glyph: Any) -> Any |
Return the glyph's code points from FontGate. |
is_mark |
function | (glyph: Any, unicodes: Any=()) -> bool |
True for a name that ends in "comb" or any code point of category Mn or Me. |
live_fingerprint |
function | (package: Any, entries: list[Any]) -> tuple | None |
The same snapshot re-read from <code>package</code> by name; None when a glyph or layer is gone. |
master_order |
function | (package: Any) -> list[str] |
Width Chart masters: <code>masters.inspect.model.master_order</code> (first-axis order). |
master_widths |
function | (glyph: Any, masters: list[str]) -> list[tuple[str, float | None]] |
Width Chart points: <code>masters.inspect.model.widths</code>. |
metrics_panel |
attribute | ||
pending |
function | (entries: list[Any]) -> list[Any] |
The entries whose plan changes the layer. |
plural |
function | (count: int, word: str) -> str |
<code>"1 layer"</code><code> or </code><code>"2 layers"</code>. |
rebuild_note |
function | (facts: Any, names: Iterable[str]) -> str |
FontLab's auto-glyph rebuild warning for <code>names</code><code>, or </code><code>""</code>. |
round_planner |
function | (step: int, direction: str) -> metrics_panel.Planner |
Return the planner. |
rounded |
function | (width: float, step: int, direction: str) -> int |
Return width as a multiple of step. |
scale_planner |
function | (percent: float) -> metrics_panel.Planner |
Return the planner for one percentage. |
scaled |
function | (width: float, percent: float) -> tuple[int, int] |
Return the new width and the outline shift for a scale in percent. |
state |
function | (layer: Any) -> tuple |
What a planned layer looked like: its advance and ink edges. |
subject |
function | (names: Iterable[str]) -> str |
Undo-label subject: the glyph name, or <code>"N glyphs"</code> for several. |
survey |
function | (glyphs: list[Any], masters: list[str], planner: Any, facts: Any) -> list[Any] |
<code>metrics.panel.model.survey</code><code>: one </code><code>Entry</code> per glyph and master, with skip notes. |
tabular_planner |
function | (widths: dict[str, int]) -> metrics_panel.Planner |
Return the planner. widths maps master name to the shared width. |
target_widths |
function | (glyphs: list[Any], masters: list[str], mode: str, fixed: int) -> dict[str, int] |
Map master to the shared width: the widest advance of the group, or the fixed value. |
width_report |
function | (glyphs: list[Any], masters: list[str]) -> list[tuple] |
Width Table rows: <code>proof.inspectors.model.report</code> (name, widths, progression). |
zero_planner |
function | (placement: str) -> metrics_panel.Planner |
Return the planner. |