Skip to content

fontlabapp.masters.text.settings · declarations 001

Back to fontlabapp.masters.text.settings

FALLBACKS module-attribute

FALLBACKS

PRESET_FILE module-attribute

PRESET_FILE

load

load(settings: Any, *, check: Callable = lambda: None) -> tuple[str, int, Any]

Read only tool-owned controls/geometry, with exact original defaults.

load_presets

load_presets(directory: Path, *, check: Callable = lambda: None) -> Presets

Seek the preset file in directory, then use four defaults; name the path.

presets_directory

presets_directory(directory: Path | None = None) -> Path

Explicit directory, else the FontLab user folder's Scripts, else the cwd.

read_presets

read_presets(path: Path | str, *, check: Callable = lambda: None) -> tuple[str, ...]

Read BOM/CRLF/CR normalized UTF8 without stripping mapped whitespace.

Split only physical LF newlines; Unicode line/paragraph separators remain source characters. Read in bounded chunks with cooperative checkpoints. Blocking filesystem primitives cannot be preempted; check on return.

save

save(settings: Any, custom: str | None = None, layout: int | None = None, *, geometry: Any = None, preserve_custom: bool = False, check: Callable = lambda: None) -> None

Save source controls after proof, or geometry on Close.

A successful immediate preset may hold unrelated custom representation; preserve_custom skips that key entirely, retaining its last exact value.