Skip to content

fontlabapp.studios.anchor_transfer.transfer · declarations 001

Back to fontlabapp.studios.anchor_transfer.transfer

ALL_MASTERS module-attribute

ALL_MASTERS

CSV_FILTER module-attribute

CSV_FILTER

CSV_INFO module-attribute

CSV_INFO

CSV_TITLE module-attribute

CSV_TITLE

MODES module-attribute

MODES

Matrix module-attribute

Matrix

NO_TARGETS module-attribute

NO_TARGETS

ONE_MASTER module-attribute

ONE_MASTER

ONLY_MISSING module-attribute

ONLY_MISSING

SAME_FONT module-attribute

SAME_FONT

SCALE_LABEL module-attribute

SCALE_LABEL

STALE module-attribute

STALE

anchor_writer module-attribute

anchor_writer

apply

apply(tool: Any, action: str, dry: Dry, replan: Callable[[], Dry | None], *, allow_bases: bool = False) -> bool

Write exactly the edits of dry as one named Undo step.

replan builds the same plan from the live font; when it differs from dry (another edit, another source or file) Apply raises ValueError(STALE) before any write. Return True when FontLab committed; a refusal leaves the shell's status text and returns False.

attachment_in_base

attachment_in_base(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

auto_facts(package: Any) -> Any

A fresh whole-font core.history.glyphs.AutoFacts scan.

catalog_names

catalog_names() -> list[str]

Every glyph of the current font, as Derive Anchors From Components read it.

coefficients

coefficients(shape: Any) -> Matrix

Read Qt's six affine coefficients; refuse perspective transforms.

copy_changes

copy_changes(source: Any, target: Any, scale: bool, replace: bool) -> list[Any]

Copy Anchors From Glyph rows for one layer: anchors.copy.model.plan, changes only.

Both coordinates are rounded when read (anchors.inspect.model), then x becomes round(x * ratio), exactly as the original; a removal (Replace mode) is a "remove" edit.

copy_planner

copy_planner(source: Any, scale: bool, replace: bool) -> Callable[..., list[Any]]

Planner for collect: the source glyph is skipped, missing source layers too.

crossfont module-attribute

crossfont

csv_glyphs

csv_glyphs(package: Any, records: dict) -> list[Any]

The glyphs of a loaded CSV; refuse "Missing glyphs: ..." as the original did.

csv_planner

csv_planner(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

derive_planner(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

derived_points(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

dry_run(glyphs: list[Any], masters: list[str], planner: Callable[..., list[Any]], facts: Any) -> Dry

Plan once with anchors.writer.collect and decide whether Apply may run.

Auto layers are listed as skipped; a glyph that owns auto layers is refused; a base of auto glyphs needs the "Edit bases" tick (bases); an existing anchor moved to 0, 0 and repeated anchor names are refused by anchors.writer.require_safe (without its auto policy, which is above).

file_table

file_table(path: str) -> dict[str, dict[str, tuple[int, int]]]

Read the rounded table for callers that do not need its conversion report.

fingerprint

fingerprint(work: list) -> tuple

(glyph, layer, edits, target anchors, advance) of every planned layer.

font_label

font_label(row: Any) -> str

The original font-list text: "Name.vfc [#12]".

font_options

font_options(*, relative: bool = False, italic: bool = False, angle: int = 10, rename: bool = True, rename_destination: bool = True, suffix: str = '.bak', specific: str | None = None) -> Any

anchors.crossfont.model.Options with the original defaults.

font_rows

font_rows() -> tuple

The open fonts as anchors.crossfont.capture.Font rows.

fonts_apply

fonts_apply(tool: Any, plan: FontsPlan, source_label: str) -> bool

Copy exactly the previewed edits as one Undo step in the destination font.

The fonts are captured again first; any difference from the dry run raises ValueError(STALE). A failure after the write started is "Partly applied: ...".

fonts_preview

fonts_preview(source: int, destination: int, source_layer: str, destination_layer: str, only_selected: bool, options: Any) -> FontsPlan

Capture both fonts and list every edit copy_layer plans (no native name normalisation).

history module-attribute

history

import_changes

import_changes(layer: Any, values: dict[str, tuple[float, float]]) -> list[Change]

Keep equal points untouched; refuse repeated target names through the writer.

layer_evidence

layer_evidence(package: Any, composite: Any, master: str, masters: list[str], deadline: float) -> tuple[tuple[str, str] | None, dict, list[str]]

Resolve one composite completely; the first mark per label supplies evidence.

load_table

load_table(path: str) -> tuple[dict, str]

Decode UTF-8 once, normalize newlines, and report only actual conversions.

mirror_changes

mirror_changes(source: Any, target: Any, scale: bool, only_missing: bool) -> list[Change]

Rows to bring target in line with source. Positions round half up.

mirror_planner

mirror_planner(source_master: str, scale: bool, only_missing: bool) -> Callable[..., list[Any]]

Mirror Across Masters planner: copy source_master into each target master.

mirror_targets

mirror_targets(masters: list[str], ticked: Iterable[str], source_master: str) -> list[str]

The ticked target masters without the source; refuse as the original did.