fontlabapp.features.identity_tools.feature_authoring.suffix_substitution
suffix_substitution
Preview a font-wide suffix substitution. Append to source only; compile and test in the Features panel.
What it does: Run with a font active. All original controls use the shared fly panel lifecycle. Feature data is font-wide; reopen after switching fonts or changing source.
How it works: Build safe base/alternate pairs from a suffix and append statements through Fontport's exact-source writer. Refuse stale references or ambiguous existing code.
Why this design: Keeping the original prefix and unrelated feature blocks prevents a small substitution edit from replacing other stored source.
How to use: Run Features > Build Suffix Substitution. Set suffix and tag, inspect the full proposed source, then Apply or Copy preview. Compile and test manually in FontLab's Features panel.
Benefit: Prepare a consistent substitution block while retaining source outside the requested feature edit.
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 |
|---|---|---|---|
ACTION |
attribute | ||
FeaturesDialog |
attribute | (shared captured text) | |
KEY |
attribute | ||
QtCore |
attribute | (shared captured text) | |
QtGui |
attribute | (shared captured text) | |
SUBTITLE |
attribute | ||
TITLE |
attribute | ||
append_code |
function | (old: str, tag: str, pairs: list[tuple[str, str]]) -> str |
Insert before a complete feature's closing tag, preserving existing source. |
fontlab |
attribute | (shared captured text) | |
main |
function | () -> Any |
Replace this tool through the shared owned-window registry. (shared captured text) |
qt |
attribute | (shared captured text) | |
run |
function | (package: Any, layout: Any, tag: str, old: str, new: str, *, expected_blocks: dict, references: list[str]) ->… |
Append via the shared exact-source writer; retain the original run arguments. |