Skip to content

fontlabapp.glyphs.copies · declarations 001

Back to fontlabapp.glyphs.copies

Job module-attribute

Job

Naming module-attribute

Naming

create

create(package: Any, jobs: Sequence[Job], title: str, facts: AutoFacts, *, allow_rebuild: bool = False) -> dict[str, Any]

Create every planned glyph, then add all contours as ONE Undo step.

Return {"glyphs", "layers", "mismatches"}. Nothing to do returns zeros and makes no native call. A target that exists now, an unconsented rebuild candidate raises ValueError before any change; a failure after the first glyph exists raises history.PartialWriteError. See glyph_creation.create_glyphs.

half_up

half_up(value: float) -> int

Round half up (250.5 -> 251), as the other metrics scripts do.

panel_type

panel_type() -> type

Return the CopiesPanel base class (a PythonQt QDialog).

Call it inside FontLab only. Subclass it, set TITLE, KEY and NOUN ("capitals", "figures"), and fill in build_controls, survey(package, facts, allow_rebuild) and jobs(rows). See fontlabapp.contours.selection.panel.ui.CopiesPanel.

source_problem

source_problem(layer: Any) -> str

Return why a source master layer cannot be copied, or "".

survey_with

survey_with(package: Any, names: Sequence[str], naming: Naming, facts: AutoFacts, allow_rebuild: bool = False) -> list[Row]

Plan one new glyph per selected name. Change nothing.

A target that can make FontLab rebuild automatic glyphs gets rebuild; without allow_rebuild its note is glyph_creation.rebuild_note(...) and the row is skipped.