Skip to content

fontlabapp.studios.anchor_transfer.transfer

transfer

Anchor Transfer plans, dry-run snapshots and the write paths. Qt-free.

What: the planners of Copy Anchors From Glyph (anchors.copy.model.plan), Mirror Across Masters, Derive Anchors From Components and Add Anchors From File (their pure functions copied unchanged from Scriptmix), the plan of anchors.writer.collect and apply: it re-plans from the live font, refuses with "press Refresh" when the plan or a target layer differs from the dry run, and writes exactly the shown edits through one AppShell.history call labelled "Anchor Transfer: <action> <subject>" (Issue 235 §1.3/§1.4). Coordinates are written as each original computed them; nothing is rounded again. Copy Anchors Between Fonts writes another font: fonts_preview plans it with anchors.crossfont.model.copy_layer and fonts_apply hands the same options to the crossfont backend, one Undo step in the destination font with this app's label. Used by the tabs of fontlabapp.studios.anchor_transfer.

Classes

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
ALLOW_AUTO_LABEL attribute (shared captured text)
ALL_MASTERS attribute
APP attribute (shared captured text)
CSV_FILTER attribute
CSV_INFO attribute
CSV_TITLE attribute
MODES attribute
Matrix attribute
NO_TARGETS attribute
ONE_MASTER attribute
ONLY_MISSING attribute
ROUNDING_NOTE attribute (shared captured text)
SAME_FONT attribute
SCALE_LABEL attribute
STALE attribute
anchor_writer attribute
apply function (tool: Any, action: str, dry: Dry, replan: Callable[[], Dry | None], *, allow_bases: bool=False) -> bool Write exactly the edits of <code>dry</code> as one named Undo step.
attachment_in_base function (point: tuple[float, float], mark_matrix: Matrix, base_matrix: Matrix) -> tuple[float, float] Transform a mark point into the base's own coordinates, with a checked inverse.
auto_facts function (package: Any) -> Any A fresh whole-font <code>core.history.glyphs.AutoFacts</code> scan.
catalog_names function () -> list[str] Every glyph of the current font, as Derive Anchors From Components read it.
coefficients function (shape: Any) -> Matrix Read Qt's six affine coefficients; refuse perspective transforms.
copy_changes function (source: Any, target: Any, scale: bool, replace: bool) -> list[Any] Copy Anchors From Glyph rows for one layer: <code>anchors.copy.model.plan</code>, changes only.
copy_planner function (source: Any, scale: bool, replace: bool) -> Callable[..., list[Any]] Planner for <code>collect</code>: the source glyph is skipped, missing source layers too.
crossfont attribute
csv_glyphs function (package: Any, records: dict) -> list[Any] The glyphs of a loaded CSV; refuse "Missing glyphs: ..." as the original did.
csv_planner function (records: dict, glyphs: list[Any], master: str) -> Callable[..., list[Any]] Add Anchors From File planner on the current master; refuse as the original did.
derive_planner function (package: Any, names: list[str], masters: list[str]) -> Callable[..., list[Any]] Derive Anchors From Components planner over the whole font and every master.
derived_points function (package: Any, names: list[str], masters: list[str], notes: dict | None=None) -> dict Keep clean evidence across all layers; doubtful evidence becomes note rows.
dry_run function (glyphs: list[Any], masters: list[str], planner: Callable[..., list[Any]], facts: Any) -> Dry Plan once with <code>anchors.writer.collect</code> and decide whether Apply may run.
file_table function (path: str) -> dict[str, dict[str, tuple[int, int]]] Read the rounded table for callers that do not need its conversion report.
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. (shared captured text)
fingerprint function (work: list) -> tuple (glyph, layer, edits, target anchors, advance) of every planned layer.
font_label function (row: Any) -> str The original font-list text: <code>&quot;Name.vfc &#91;#12&#93;&quot;</code>.
font_options function (*, relative: bool=False, italic: bool=False, angle: int=10, rename: bool=True, rename_destination: bool=True… <code>anchors.crossfont.model.Options</code> with the original defaults.
font_rows function () -> tuple The open fonts as <code>anchors.crossfont.capture.Font</code> rows.
fonts_apply function (tool: Any, plan: FontsPlan, source_label: str) -> bool Copy exactly the previewed edits as one Undo step in the destination font.
fonts_preview function (source: int, destination: int, source_layer: str, destination_layer: str, only_selected: bool, options: Any)… Capture both fonts and list every edit <code>copy&#95;layer</code> plans (no native name normalisation).
history attribute
import_changes function (layer: Any, values: dict[str, tuple[float, float]]) -> list[anchor_writer.Change] Keep equal points untouched; refuse repeated target names through the writer.
layer_evidence function (package: Any, composite: Any, master: str, masters: list[str], deadline: float) -> tuple[tuple[str, str] | N… Resolve one composite completely; the first mark per label supplies evidence.
load_table function (path: str) -> tuple[dict, str] Decode UTF-8 once, normalize newlines, and report only actual conversions.
mirror_changes function (source: Any, target: Any, scale: bool, only_missing: bool) -> list[anchor_writer.Change] Rows to bring target in line with source.
mirror_planner function (source_master: str, scale: bool, only_missing: bool) -> Callable[..., list[Any]] Mirror Across Masters planner: copy <code>source&#95;master</code> into each target master.
mirror_targets function (masters: list[str], ticked: Iterable[str], source_master: str) -> list[str] The ticked target masters without the source; refuse as the original did.
parse_table function (text: str) -> dict[str, dict[str, tuple[float, float]]] Parse the entire CSV before planning any writes.
point_text function (point: tuple[float, float] | None) -> str <code>&quot;x, y&quot;</code> of a point, or "–" for none.
rebuild_note function (facts: Any, names: Iterable[str]) -> str The metrics panel's rebuild warning for the auto glyphs built on <code>names</code>.
subject function (names: Iterable[str]) -> str Undo-label subject: the glyph name, or <code>&quot;N glyphs&quot;</code> for several. (shared captured text)