Skip to content

fontlabapp.studios.hint_tools.removal · declarations 001

Back to fontlabapp.studios.hint_tools.removal

KEY module-attribute

KEY

TITLE module-attribute

TITLE

chosen

chosen(counts: tuple[int, int], horizontal: bool, vertical: bool) -> int

Return how many of counts lie in the chosen directions.

direction_word

direction_word(horizontal: bool, vertical: bool) -> str

Return "horizontal ", "vertical " or "" for the chosen directions.

layer_note

layer_note(layer: Any, reason: str, horizontal: bool, vertical: bool) -> str

Return why layer keeps its hints, or "" when hints will be removed.

remove_hints

remove_hints(rows: Sequence[Row], horizontal: bool, vertical: bool, facts: Any, allow_bases: bool) -> dict[str, Any]

Remove the chosen hints from every planned layer as ONE Undo step.

Return {"layers", "glyphs", "removed", "mismatches"}. Nothing to do returns zeros and makes no history call. A refusal raises ValueError; a failure after history started raises RuntimeError with the Undo hint.

survey

survey(package: Any, names: Sequence[str], masters: Sequence[str], facts: Any, allow_bases: bool, horizontal: bool = True, vertical: bool = True) -> list[Row]

Plan every glyph/master. Change nothing. No direction raises ValueError.