fontlabapp.studios.derived_glyphs.small_caps
small_caps
Small caps tab: Scripts/Contours/Small Caps From Capitals.py in host mode.
One .sc glyph per selected capital (H -> h.sc, H.ss01 -> h.sc.ss01),
contours scaled about the origin by Horizontal 75 % / Vertical 70 %
(10-200 %), advance scaled and rounded half up. Names that are not capitals,
repeated, missing, existing targets and auto/composite/empty sources are
listed and skipped. Rows that may rebuild auto glyphs are skipped unless
"Create even if FontLab may rebuild these auto glyphs" is ticked; Use
selection clears that tick. The pure functions below are the original's,
verbatim (only their local fly imports are module names here).
Adapted from the author's own FontLab sample, Apache-2.0
(generate_small_caps.py, "Small Caps from Capitals").
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 |
|---|---|---|---|
SUFFIX |
attribute | (shared captured text) | |
contour_copy |
attribute | ||
glyph_copies |
attribute | (shared captured text) | |
is_capital |
function | (name: str) -> bool |
True when the base name (before the first dot) starts with a capital letter. |
naming |
function | (name: str) -> tuple[str, str] |
Return (new name, problem) for a selected glyph name. |
prepare |
function | (rows: Sequence[Any], x_scale: int, y_scale: int) -> list[Any] |
Return the jobs: copies scaled by the percentages about the origin. |
qt |
attribute | ||
survey |
function | (package: Any, names: Sequence[str], facts: Any, allow_rebuild: bool=False) -> list[Any] |
Plan one small cap per selected capital. |
target_name |
function | (name: str) -> str |
Return the small-cap name: H -> h.sc, H.ss01 -> h.sc.ss01. |