fontlabapp.studios.font_audit.model · declarations 001
Back to fontlabapp.studios.font_audit.model
CSV_DEFAULT
module-attribute
CSV_DEFAULT
CSV_FILTER
module-attribute
CSV_FILTER
CSV_HINT
module-attribute
CSV_HINT
CSV_TITLE
module-attribute
CSV_TITLE
HIDE_SPACES
module-attribute
HIDE_SPACES
METRIC_COLUMNS
module-attribute
METRIC_COLUMNS
OVERVIEW_STATUS
module-attribute
OVERVIEW_STATUS
SPACE_CATEGORIES
module-attribute
SPACE_CATEGORIES
SPACE_NAMES
module-attribute
SPACE_NAMES
assigned
assigned(start: int, end: int) -> int
Number of assigned characters (not Cn) in a range.
block_names
block_names(codes: dict[int, str], start: int, end: int) -> list[str]
Glyphs of the block, in the first-glyph-wins code order the original uses.
coverage
coverage(codes: Iterable[int], show_all: bool = False) -> tuple[list[tuple], list[int]]
[(start, end, block, covered, assigned)] for touched (or all) blocks, and the codes outside.
coverage_status
coverage_status(rows: Sequence, outside: Sequence) -> str
coverage_subtitle
coverage_subtitle(codes: dict, rows: Sequence[tuple]) -> str
empty_subtitle
empty_subtitle(rows: Sequence[tuple[str, list[str]]], masters: Sequence[str]) -> str
font_codes
font_codes(cat: Catalogue) -> dict[int, str]
{code point: glyph name} of the font (first glyph wins).
font_labels
font_labels(cat: Catalogue) -> list[tuple[str, int]]
[(glyph name, mark)] in font order (every glyph, as CurrentFont().glyphs).
is_whitespace
is_whitespace(name: str, codes: Iterable[int]) -> bool
Recognise intentional empty glyphs by Unicode category and conventional names.
label_subtitle
label_subtitle(labels: Sequence[tuple[str, int]], marks: Sequence, suffixes: Sequence) -> str
mark_label
mark_label(mark: int) -> str
Describe FontLab colour marks using the original hue buckets.
mark_rgb
mark_rgb(mark: int, lightness: int = 150) -> tuple[str, int, int, int] | None
The original swatch colour: ("hsl", hue, 200, lightness) or ("rgb", g, g, g).
metric_text
metric_text(value: Any) -> str
Overview metric cells: {value:g}.
overview_cards
overview_cards(cat: Catalogue) -> dict[str, int]
The eight Font Overview cards, in their original order.
percent
percent(covered: int, total: int) -> str
The original progress-bar text.
plural
plural(count: int) -> str
preview_text
preview_text(names: Iterable[str]) -> str
TMetrics text for names: /a/b; empty for none.
scan_empty
scan_empty(cat: Catalogue, skip_whitespace: bool) -> list[tuple[str, list[str]]]
[(glyph name, [master, ...] without contours)] in font order.
statistics
statistics(labels: Iterable[tuple[str, int]]) -> tuple[list, list]
([(mark, [names])], [(suffix, [names])]) sorted by count, largest first.
suffix_of
suffix_of(name: str) -> str
'.ss01.sc' for 'a.ss01.sc'; '' for 'a' and '.notdef'.
table
table(cat: Catalogue, names: Iterable[str]) -> tuple[list[str], list[list[Any]]]
Header and rows of Glyph Table CSV for names; unknown glyphs are skipped.
to_csv
to_csv(header: Sequence, rows: Iterable[Sequence]) -> str
Encode report rows with standard CSV quoting and LF line endings.
write_csv
write_csv(path: Any, header: Sequence, rows: Iterable[Sequence]) -> int
Write the CSV (UTF-8 with BOM so spreadsheets detect it); return the byte size.