fontlabapp.studios.derived_glyphs.placeholders
placeholders
Placeholders tab: Scripts/Contours/Placeholder Glyphs.py in host mode.
Type glyph names or characters (separated by spaces, commas or new lines).
A single non-ASCII character becomes uniXXXX/uXXXXX with that code
point; a uni-form name gets its code point unless another glyph has it;
other ASCII tokens are names (& or 1 are invalid). The live list
shows each name, its code point and the action; existing, repeated and
invalid entries are skipped. NUL, no-break space and the line/paragraph
separators are refused. Create re-checks the font and creates each empty
glyph (Advance width 600 by default, 0-4000) on every master with FontLab's
Add Glyph, each its own Undo step, then reads it back. A code-point write
needs an active Font window and no open Glyph window. Rows that may rebuild
auto glyphs are skipped unless the consent is ticked; a text change clears
the tick. The functions below are the original's, verbatim (only their
local fly imports are module names here). Adapted from
generate_placeholder_glyphs.py.
Classes
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
NAME |
attribute | (shared captured text) | |
TITLE |
attribute | ||
UNI |
attribute | (shared captured text) | |
UNSAFE |
attribute | (shared captured text) | |
ap |
attribute | ||
char_name |
function | (char: str) -> str |
Return uniXXXX for a BMP character, uXXXXX above it. |
check_text |
function | (text: str) -> None |
Raise ValueError when <code>text</code> holds a character that FontLab can change. |
code_of |
function | (name: str) -> int | None |
Return the code point that a uniXXXX / uXXXXX name stands for, else None. |
create |
function | (package: Any, rows: Sequence[Row], advance: int, facts: Any, allow_rebuild: bool=False) -> dict[str, Any] |
Create every ready row as an empty glyph on all masters with FontLab's Add Glyph command. |
font_codes |
function | () -> dict[int, str] |
Return {code point: glyph name} from the font-owned glyph records. |
gate |
function | (package: Any, rows: Sequence[Row], facts: Any, allow_rebuild: bool) -> list[Row] |
Mark each ready row that can make FontLab rebuild automatic glyphs. |
glyph_copies |
attribute | (shared captured text) | |
glyph_creation |
attribute | (shared captured text) | |
parse |
function | (text: str) -> list[Entry] |
Return one Entry per token. |
plan |
function | (entries: Sequence[Entry], exists: Callable[[str], bool], codes: dict[int, str]) -> list[Row] |
Return one Row per entry: skip problems and existing glyphs, never reuse a code point. |