Skip to content

fontlabapp.glyphs.identity_tools.glyph_identity.batch_rename · declarations 001

Back to fontlabapp.glyphs.identity_tools.glyph_identity.batch_rename

KEY module-attribute

KEY

OPERATION module-attribute

OPERATION

RESERVED module-attribute

RESERVED

TITLE module-attribute

TITLE

VALID_NAME module-attribute

VALID_NAME

apply_renames

apply_renames(native: Any, qtcore: Any, package_id: int, pairs: list[tuple[str, str]], *, disclosure: dict[str, Any] | None = None) -> list[tuple[str, str]]

Rename every pair that passes the checks. One Undo step. Return [(old, new)].

Rescan first, so a stale preview cannot rename the wrong glyph. Raise ValueError for a switched font (queued updates are disclosed).

main

main() -> Any

Open or replace the Batch Rename panel.

plan_renames

plan_renames(facts: Facts, pairs: list[tuple[str, str]]) -> list[tuple[str, str, str]]

Return (old, new, status) for each pair whose name changes.

Status is "ok" or the first reason the rename is refused, checked in this order: reserved glyph (.notdef, space), invalid name, auto-layer link, name exists, duplicate target.

replaced

replaced(name: str, find: str, replace: str, regex: bool) -> str

Return NAME after one find and replace. Raise re.error for a bad pattern.