fontlab.flPackage
flPackage
flPackage is your font file. Everything that makes up a font — every glyph, every master, the design-space axes, named instances, kerning tables, OpenType feature code, stems, alignment zones, guidelines, and all the metadata that ends up in the font's name tables — lives inside one flPackage object.
Inherits from flObject.
What is a Package?
When you open a .vfc, .ufo, .otf, or any other supported format in FontLab, the application creates an flPackage for it. In a script, wrap the low-level current font with fl.flPackage(fl.CurrentFont()), after checking that fl.CurrentFont() is not None.
The object hierarchy
It helps to picture the font as a set of nested containers:
flPackage (the whole font)
└── flGlyph (one character — "A", "g", "comma", …)
└── flLayer (one drawing per master — "Regular", "Bold", …)
└── flShape (a group of contours, possibly a component reference)
└── flContour (one closed or open path)
└── flNode (one on-curve or off-curve point)
Most scripting work moves through this hierarchy: you start at the font, find a glyph, pick a layer, iterate its shapes, and then walk the contours and nodes. Understanding this chain makes the API feel logical rather than arbitrary.
Masters and variable fonts
In a variable font the flPackage acts as the top-level container and each master is a child flPackage stored in font.variationPackages. The master packages share glyph names and structure but hold different coordinate values. When FontLab interpolates, it travels this list and blends the numbers.
For a single-master font variationPackages has just one entry — the font itself.
Kerning
Kerning in FontLab is stored per master. The kerning(master_name) method returns a dictionary of {(glyph1, glyph2): value} pairs for a specific master. When working with class kerning, the keys use group names prefixed with @MMK_L_ and @MMK_R_.
OpenType features
The OpenType feature code you write in the Features panel is stored in the featuresContainer inside the package. You can read and write feature code programmatically, which is useful for generating or validating feature files as part of a build pipeline.
Common Patterns
Getting the active font and listing its glyphs
import fontlab as fl
font = fl.CurrentFont()
print(f"{font.info.familyName} — {font.glyphsCount} glyphs")
for g in font.glyphs:
print(f" {g.name} u={hex(g.unicode) if g.unicode else '-'}")
Changing font metadata
font = fl.CurrentFont()
info = font.info
info.familyName = "My Serif"
info.copyright = "© 2026 My Foundry"
info.openTypeOS2WeightClass = 400
Finding a glyph and navigating to its nodes
font = fl.CurrentFont()
glyph = font.findName("g")
layer = glyph.layers[0]
for shape in layer.shapes:
for contour in shape.contours:
for node in contour.nodes:
print(node.x, node.y, node.type)
Reading and setting a kern pair
font = fl.CurrentFont()
master_name = font.masters[0] # e.g. "Regular"
# Read all kern pairs for this master:
pairs = font.kerning(master_name)
for (g1, g2), value in list(pairs.items())[:10]:
print(f" {g1} / {g2} = {value}")
# Set a specific pair:
font.setKerningPair(master_name, "A", "V", -40)
Adding an axis to make a variable font
from fontlab import flAxis
font = fl.CurrentFont()
wght = flAxis()
wght.name = "Weight"
wght.tag = "wght"
wght.minimal = 100
wght.maximum = 900
wght.default = 400
font.addAxis(wght)
Tutorial
from PythonQt.QtCore import QPointF
import fontlab as fl
from fontlab import flPackage
# ============================================================
# 1. Opening and inspecting a font
# ============================================================
# fl.CurrentFont() gives you the flPackage for the active font.
# If no font is open it returns None, so check before using it.
font = fl.CurrentFont()
if font is None:
print("No font is open!")
else:
# font.info is a structured object with all UFO-compatible metadata.
# It mirrors the keys in a UFO fontinfo.plist.
print(f"Family: {font.info.familyName}")
print(f"Style: {font.info.styleName}")
print(f"UPM: {font.upm}")
print(f"Glyphs: {font.glyphsCount}")
print(f"Masters: {font.masters}")
# ============================================================
# 2. Iterating all open fonts
# ============================================================
# fl.AllFonts() returns every font currently open in FontLab.
# This is useful for batch operations across a whole family.
for f in fl.AllFonts():
print(f" Open font: {f.info.familyName} / {f.info.styleName}")
# ============================================================
# 3. Accessing and iterating glyphs
# ============================================================
font = fl.CurrentFont()
# Direct dictionary-style access by glyph name:
glyph_A = font['A']
print(f"Found '{glyph_A.name}' — width: {glyph_A.advanceWidth}")
# Find by name (returns None if not found — safer for scripting):
glyph_g = font.findName("g")
if glyph_g:
print(f"Lowercase g: {glyph_g.advanceWidth} units wide")
# Find by unicode codepoint:
glyph_euro = font.findUnicode(0x20AC) # €
if glyph_euro:
print(f"Euro glyph: '{glyph_euro.name}'")
# Iterate every glyph:
empty_glyphs = []
for g in font.glyphs:
if not g.hasBody:
empty_glyphs.append(g.name)
print(f"Empty glyphs: {empty_glyphs}")
# ============================================================
# 4. Navigating the hierarchy: glyph → layer → shape → node
# ============================================================
# This is the most important pattern to understand.
# Everything lives inside everything else.
glyph = font['H']
layer = glyph.layers[0] # first master layer
print(f"Layer '{layer.name}' has {len(layer.shapes)} shapes")
for shape in layer.shapes:
for contour in shape.contours:
print(f" Contour: {len(contour.nodes)} nodes, "
f"{'closed' if contour.closed else 'open'}")
for node in contour.nodes:
print(f" ({node.x:.0f}, {node.y:.0f}) type={node.type}")
# ============================================================
# 5. Working with font-level guidelines
# ============================================================
from fontlab import flGuideLine
# Add a horizontal guideline at y=700 (e.g. for cap height):
gl = flGuideLine(0.0, QPointF(0, 700))
font.addGuideline(gl)
# List all font-level guidelines:
for guide in font.guidelines:
print(f"Guide at angle={guide.angle} pos={guide.centerPoint}")
# ============================================================
# 6. Masters in a variable font
# ============================================================
print(f"Masters: {font.masters}")
print(f"Active master: {font.master}")
# Switch to a different master:
if len(font.masters) > 1:
font.setMaster(font.masters[1], notify=True)
# Read the design-space location of the active master:
loc = font.location()
print(f"Current location: {loc}")
# ============================================================
# 7. Editing font metadata
# ============================================================
info = font.info
print(f"Designer: {info.openTypeNameDesigner}")
# Write metadata — these end up in the font's name tables:
info.copyright = "Copyright 2026 My Foundry"
info.openTypeOS2WeightClass = 400 # Regular weight
info.openTypeNameDesigner = "Jane Smith"
# Font-level metrics (affects line spacing and hinting zones):
font.xHeight_value = 500
font.capsHeight_value = 700
font.ascender_value = 800
font.descender_value = -200
# ============================================================
# 8. Kerning
# ============================================================
master_name = font.masters[0]
pairs = font.kerning(master_name)
# Print the first 5 kern pairs:
for (g1, g2), val in list(pairs.items())[:5]:
print(f" {g1} / {g2} = {val}")
# ============================================================
# 9. Saving
# ============================================================
# Save to the same location the font was opened from:
# font.save()
# Save to a new path:
# font.saveAs("/path/to/MyFont_v2.vfc")
Current wrapper and naming helpers
flPackage.hasInstaceFor(fg_font) is the registered spelling, including the missing "n" in "Instance"; hasInstanceFor is not an alias. clearActiveGlyphs() clears the package's active-glyph collection. checkVariableName(name) returns the native checked variable-name string. guidelinesHost is a read-only GuidelinesHostIntf interface value when exposed by the build; it does not imply that GuidelinesHostIntf is a constructible module class.
Guideline host property
| Property | Type | Access | Meaning |
|---|---|---|---|
guidelinesHost |
GuidelinesHostIntf | read | Native guideline-host interface. Its availability does not export a constructible module class of the same name. |
Constructors: flPackage() flPackage(flObject) flPackage(fgFont)
Native bases: object
Captured native MRO: flPackage, object
Native new allocation evidence (not an init overload): (args, *kwargs) Create and return a new object. See help(type) for accurate signature.
Supplemental documentation:
Font package. The captured declaration exposes addAxis, addGlyph, addInstance, addMaster, autoKern, autohintGlyphs, clearInstances, clearMasters, close, deleteGlyph, deleteGroups, findAxis, findGroup, findUnicode, generateGlyph, getAllGroups, hasAxis and hasMaster. It is created with no captured constructor overloads. It also carries the shared object members changed, clone, cloneObject, getProperty, setProperty, release, remove and update and the shared attributes id, name, type, isValid and isNull.
Source: FontLab Proteus API documentation
Source: generated/fontlab.py: flPackage captured declaration
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 |
|---|---|---|---|
__init__ |
function | (self, /, *args: Any, **kwargs: Any) -> None |
Initialize self. (shared captured text) |
activateGlyph |
function | (self, arg0: flGlyph) -> Any |
Open the given glyph in the glyph editor and make it active. |
addAxis |
function | (self, variable: flAxis) -> Any |
Add a design-space axis (e.g. |
addGlyph |
function | (self, flGlyph: Any) -> Any |
Add a glyph to the font. |
addInstance |
function | (self, *args: Any, **kwargs: Any) -> Any |
Add a named instance to the font. |
addMaster |
function | (self, *args: Any, **kwargs: Any) -> Any |
Add a new master to the font. |
allGuidelines |
attribute | Any |
All guidelines including any special types. |
ascender_value |
attribute | Any |
The ascender height — how far the tallest ascenders reach above the baseline, in font units. |
assignData |
function | (self, *args: Any, **kwargs: Any) -> Any |
Copy all data from another package into this one. |
autoKern |
function | (self, left: flGlyph, right: flGlyph, master_name: Any) -> Any |
Automatically calculate and set a kern value for a specific pair of glyphs in the given master. |
autohintGlyphs |
function | (self, glyphs: list[flGlyph], make_hints: bool) -> Any |
Run FontLab's auto-hinting algorithm on a list of glyphs. |
axes |
attribute | Any |
All design-space axes defined in this font. |
bold |
attribute | Any |
True if this font is styled as bold. |
buildShapeDataNames |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return a set of all unique shared shape data names in the font, excluding a given object. |
can_interpolate |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return True if the font (or a specific master) is compatible for interpolation — meaning all glyphs have matching structure across masters. |
capsHeight_value |
attribute | Any |
The cap height — the distance from baseline to the top of flat capital letters like "H". |
caretOffset_value |
attribute | Any |
Horizontal offset for the text insertion caret in italic fonts. |
changed |
function | (self) -> Any |
(shared captured text) |
checkAxisName |
function | (self, name: Any) -> Any |
Validate and potentially correct an axis name, ensuring it meets OpenType requirements. |
checkInitHistoryState |
function | (self, history_ix: int) -> Any |
(shared captured text) |
checkVariableName |
function | (self, name: Any) -> Any |
|
clearAboveHistory |
function | (self, history_ix: int) -> Any |
(shared captured text) |
clearActiveGlyphs |
function | (self) -> Any |
|
clearFlag |
function | (self, f: int) -> Any |
(shared captured text) |
clearFlags |
function | (self) -> Any |
(shared captured text) |
clearInstances |
function | (self) -> Any |
Remove all named instances. |
clearMasters |
function | (self, release: bool) -> Any |
Remove all masters from the font. |
clone |
function | (self, *args: Any, **kwargs: Any) -> Any |
Clone the object (shared captured text) |
cloneObject |
function | (*args: Any, **kwargs: Any) -> Any |
(shared captured text) |
close |
function | (self, prompt: Any=True) -> Any |
Close the font, prompting for unsaved changes. |
collectNames |
function | (self, storage: Any) -> Any |
Collect all glyph names into the storage descriptor before saving. |
completeData |
function | (self, fg_data: Any=...) -> Any |
Fill in any missing font information — default names, metrics, and flags — based on what is already set. |
convertZonesToGuidelines |
function | (self, zonesT: flZones, zonesB: flZones) -> Any |
Convert a set of alignment zones into font-level guidelines. |
cornerTension_value |
attribute | Any |
The global corner tension for smart corners. |
counterAnchors |
attribute | Any |
The number of font-level anchor points defined. |
counterGuides |
attribute | Any |
The number of font-level guidelines. |
createObject |
function | (*args: Any, **kwargs: Any) -> Any |
FlObject/Nothing createObject(int); (shared captured text) |
currentHistoryState |
function | (self, *args: Any, **kwargs: Any) -> Any |
(shared captured text) |
currentSearch |
attribute | Any |
The serialised state of the current font-window search filter. |
curveTension |
attribute | Any |
Global curve tension value — affects how FontLab draws Bézier curves. |
curveTension_value |
attribute | Any |
The global curve tension (0–1 scale). |
defaultMaster |
attribute | Any |
The name of the master used as the interpolation origin (usually the "Regular" or middle weight). |
deleteGlyph |
function | (self, flGlyph: Any) -> bool |
Remove a glyph from the font permanently. |
deleteGroups |
function | (self, ids: set[int], deleteDependentContent: bool) -> Any |
Delete one or more groups. |
descender_value |
attribute | Any |
The descender depth — a negative number for how far descenders drop below the baseline. |
elidedName |
attribute | Any |
A shortened family name used when the full name is too long for some environments. |
ensureProteusData |
function | (self) -> Any |
Ensure that FontLab's Proteus-specific metadata block is initialised on this package. |
family_zones |
function | (self, top: bool) -> Any |
Return the family-level alignment zones, which apply across all masters. |
family_zonesB |
attribute | Any |
Family-level bottom zones, shared across all masters. |
family_zonesT |
attribute | Any |
Family-level top zones, shared across all masters. |
featuresContainer |
function | (self) -> flObject |
Return the container holding the OpenType feature code. |
ffn |
attribute | Any |
Full font name — the complete name as it appears in font menus, e.g. |
fgId |
attribute | Any |
The low-level fontgate integer identifier for this font. |
fgPackage |
attribute | Any |
The underlying low-level fontgate font object. |
fileName |
attribute | Any |
Just the filename without its directory path. |
findAxis |
function | (self, cs: Any=...) -> Any |
FlAxis/Nothing findAxis(string name[, Qt::CaseSensitivity cs = Qt::CaseSensitive]) |
findAxisShort |
function | (self, short_name: Any) -> Any |
FlAxis/Nothing findAxisShort(string short_name) |
findFgId |
function | (self, id: int) -> flGlyph |
Find a glyph by its internal low-level integer id. |
findGroup |
function | (self, _id: int) -> Any |
Find a group by its integer id. |
findName |
function | (self, name: Any) -> flGlyph |
Find and return the glyph with the given name, or None. |
findNameId |
function | (self, fg_id: int) -> flGlyph |
Find a glyph by its fontgate name id. |
findNewName |
function | (self, name: Any) -> Any |
Given a proposed name, return a version that is guaranteed to be unique in this font (e.g. |
findShapeRoot |
function | (self, shape_data: flShapeData) -> flGlyph |
Find the glyph that owns (defines) a particular shared shape data. |
findStem |
function | (self, n: Any, b: bool, loose: bool) -> int |
Find a stem by name and return its index in the stem list, or -1 if not found. |
findUnicode |
function | (self, uni: int) -> flGlyph |
Find the glyph assigned to a given unicode codepoint. |
findZone |
function | (self, n: Any, b: bool) -> int |
Find a zone by name and return its index. |
flObjectFlags |
attribute | dict |
(shared captured text) |
flag |
function | (self, f: int) -> Any |
(shared captured text) |
fontLayerOrder |
attribute | Any |
A list of layer names indicating order of the layers in the font |
generateGlyph |
function | (self, recipe: Any, layer_name: Any, metrics: Any, rtl: bool) -> Any |
QList<GlyphComponent>/Nothing generateGlyph(string recipe, string layer_name, FontMetrics metrics, bool rtl) |
getAccentsInfo |
function | (self, arg0: flLayer, arg1: flPinPoint) -> Any |
Return accent-positioning information for a given anchor point on a layer. |
getAllGroups |
function | (self) -> Any |
Return all glyph groups (kerning classes and general groups) with full metadata. |
getAxisName |
function | (self, short_name: Any) -> Any |
Given a four-letter tag, return the full axis name. |
getAxisShortName |
function | (self, name: Any) -> Any |
Given a full axis name, return its four-letter tag. |
getLayerName |
function | (self) -> Any |
Return the name of the currently active master layer. |
getMarkOffset |
function | (self, g1: flGlyph, g2: flGlyph, layer_name: Any) -> Any |
QPointF/Nothing getMarkOffset(flGlyph g1, flGlyph g2, string layer_name) |
getProperties |
function | (self, *args: Any, **kwargs: Any) -> Any |
Get object's properties list (shared captured text) |
getProperty |
function | (self, *args: Any, **kwargs: Any) -> Any |
Get object property by 'key' or number (shared captured text) |
getPropertyFloat |
function | (self, *args: Any, **kwargs: Any) -> Any |
Get float object property by 'key' (shared captured text) |
getPropertyInt |
function | (self, *args: Any, **kwargs: Any) -> Any |
Get int object property by 'key' (shared captured text) |
getShapes |
function | (self, *args: Any, **kwargs: Any) -> Any |
QList<int>/Nothing getShapes(string filter[, string layer_name]) |
glyphsCount |
attribute | Any |
The total number of glyphs in the font. |
guidelines |
attribute | Any |
All font-level guidelines. |
guidelinesHost |
attribute | Any |
|
hasAxis |
function | (self, cs: Any=...) -> bool |
Return True if an axis with that name exists. |
hasAxisShort |
function | (self, short_name: Any) -> bool |
Return True if an axis with that four-letter tag exists. |
hasChanges |
attribute | Any |
(shared captured text) |
hasGuides |
function | (self) -> bool |
Return True if there are any font-level guidelines defined. |
hasHistoryState |
function | (self, history_ix: int) -> Any |
(shared captured text) |
hasHistoryStates |
attribute | Any |
(shared captured text) |
hasInstaceFor |
function | (arg0: fgFont) -> bool |
Check whether a Python flPackage wrapper already exists for the given low-level font. |
hasMaster |
function | (self, name: Any) -> bool |
Return True if a master with that name exists in this font. |
hasName |
function | (self, relaxed: Any=...) -> bool |
Return True if a glyph with that name already exists. |
hasPackageHistoryStorages |
function | (self, to_history_ix: int) -> bool |
Check whether the undo history goes back at least to the given index. |
hasWeightAxis |
attribute | Any |
True if the font has a weight axis defined in its design space. |
hasWidthAxis |
attribute | Any |
True if the font has a width axis defined. |
hasZones |
function | (self) -> bool |
Return True if there are any alignment zones defined. |
haveObject |
function | (*args: Any, **kwargs: Any) -> Any |
(shared captured text) |
hinting |
attribute | Any |
The font-wide hinting configuration. |
historyStack |
function | (self) -> flObject |
Return the undo/redo history stack. |
historyStates |
function | (self, accepted_state: bool) -> Any |
(shared captured text) |
id |
attribute | Any |
Object id (shared captured text) |
independedAll |
function | (self) -> Any |
(shared captured text) |
info |
attribute | Any |
The structured font info object — gives you access to all UFO-compatible metadata fields like familyName, styleName, copyright, and OS/2 values. |
initItr |
function | (self, itr: fgTTInterpreter) -> Any |
Initialise the TrueType interpreter for this font. |
initItrGlyph |
function | (self, itr: fgTTInterpreter, glyph: flGlyph) -> Any |
Initialise the TT interpreter for a specific glyph, loading its outline data into the interpreter's memory. |
initialHistoryState |
function | (self, *args: Any, **kwargs: Any) -> Any |
(shared captured text) |
inktrapLen_value |
attribute | Any |
The ink-trap length for optical corrections at sharp joins. |
instanceAttributes |
attribute | Any |
Default layer attributes for generated instances. |
instanceType |
function | (*args: Any, **kwargs: Any) -> Any |
(shared captured text) |
instances |
attribute | Any |
All named instances (the specific points in design space you've chosen to name). |
interpolateInstance |
function | (self, location: flLocation, round: bool) -> flPackage |
Generate a fully interpolated font package at the given design-space location. |
interpolateMaster |
function | (self, location: flLocation, master_name: Any) -> bool |
Compute an interpolated master layer at the given location and write the result into the named master. |
interpolationCheckGeometry |
attribute | Any |
Whether FontLab verifies that master outlines have compatible geometry before interpolating. |
interpolationExtrapolate |
attribute | Any |
Whether interpolation is allowed to extrapolate beyond the defined axis range. |
interpolationFlags |
attribute | Any |
A bit-field of options that control how interpolation behaves for this font. |
interpolationMutatorMath |
attribute | Any |
Whether to use the MutatorMath engine for interpolation (more powerful than simple linear blending). |
interpolationSortContours |
attribute | Any |
Whether FontLab sorts contours by position before interpolating (helps avoid crossed outlines). |
isChanged |
attribute | Any |
(shared captured text) |
isComponent |
function | (self, *args: Any, **kwargs: Any) -> Any |
Check whether a shape data is used as a component. |
isEqual |
function | (self, arg0: flObject) -> Any |
(shared captured text) |
isKey |
attribute | Any |
True if this package is the key (default) master in a variable font project. |
isMaster |
attribute | Any |
True if this package is a master font within a variable font. |
isNull |
attribute | Any |
(shared captured text) |
isPresent |
attribute | Any |
(shared captured text) |
isReleased |
attribute | Any |
(shared captured text) |
isValid |
attribute | Any |
(shared captured text) |
italic |
attribute | Any |
True if this font is styled as italic. |
italicAngle_value |
attribute | Any |
The italic angle in degrees. |
keepShapeData |
attribute | Any |
When True, shared shape data is preserved on export rather than expanded to individual outlines. |
kerning |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the kerning table for the given master as a dictionary. |
kerningContainer |
function | (self) -> flObject |
Return the internal object that holds all kerning data. |
lineGap_value |
attribute | Any |
Extra space added between lines of text beyond ascender and descender. |
location |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the design-space location (axis values) for the given master, or for the active master if no name is given. |
makeShapeDataName |
function | (self, name: Any, _id: Any, layer_name: Any) -> Any |
Generate a unique name for a shared shape data, based on a proposed name. |
mask |
attribute | Any |
The font's shared mask layer. |
master |
attribute | Any |
The name of the currently active master. |
masterLib |
attribute | Any |
A key–value dictionary for the active master. |
masters |
attribute | Any |
The names of all masters in this font, in order. |
mastersContainer |
function | (self) -> flObject |
Return the internal object that holds all master packages. |
mastersCount |
attribute | Any |
How many masters this font has. |
measurement_value |
attribute | Any |
The Y position of the custom measurement line. |
monospaced |
attribute | Any |
True if every glyph has the same advance width (fixed-pitch font). |
name |
attribute | Any |
Object name (shared captured text) |
note |
attribute | Any |
A freeform text note attached to the font. |
optimizeShapeTransformations |
function | (self, changes: list[flObject]) -> bool |
Clean up and simplify the transform matrices stored in shape data — removing redundant or identity transforms. |
optimizeStemData |
function | (self, *args: Any, **kwargs: Any) -> Any |
Optimise a pair of stem lists by removing duplicates and merging near-identical values. |
other |
attribute | Any |
Other classification metadata. |
packageLib |
attribute | Any |
A key–value dictionary for storing arbitrary font-level metadata. |
panose |
attribute | Any |
PANOSE classification string — a legacy 10-digit classification system. |
path |
attribute | Any |
The path to the source font file |
prepareAxes |
function | (self, packages: list[flPackage], glyphs: list[flGlyph]) -> Any |
QList<flAxis>/Nothing prepareAxes(QList<flPackage> packages, QList<flGlyph> glyphs) |
prepareFontGateData |
function | (self, prepare_tth: bool) -> Any |
Prepare the low-level fontgate data structures for export. |
preparePropertiesData |
function | (self) -> Any |
Prepare the variable-properties data structures for the inspector UI. |
projectPackageName |
function | (self) -> Any |
Return the name of this package within a multi-font project. |
propertyNames |
function | (self, *args: Any, **kwargs: Any) -> Any |
PropertyNames(): sorted snapshot of dynamic property keys (shared captured text) |
ps_stemsH |
attribute | Any |
PostScript horizontal stems (describing horizontal stroke weights). |
ps_stemsV |
attribute | Any |
PostScript vertical stems (describing vertical stroke weights). |
ps_zonesB |
attribute | Any |
PostScript bottom alignment zones (baseline, descender). |
ps_zonesT |
attribute | Any |
PostScript top alignment zones (x-height, cap height, ascender). |
psn |
attribute | Any |
PostScript name — the single-word identifier used in PostScript and PDF, e.g. |
readFromFile |
function | (*args: Any, **kwargs: Any) -> Any |
FlPackage/Nothing readFromFile(string[, StorageInfo*=0]) |
refCnt |
attribute | Any |
Object references count (shared captured text) |
referencesCount |
function | (self, shapeDataId: int) -> int |
Count how many glyphs reference a particular shared shape data. |
release |
function | (self) -> Any |
(shared captured text) |
remove |
function | (self, *args: Any, **kwargs: Any) -> Any |
(shared captured text) |
removeChild |
function | (self, arg0: flObject) -> Any |
(shared captured text) |
removeMaster |
function | (self, name: Any, remove_glyph_masters: bool) -> Any |
Remove a master. |
renameGlyph |
function | (self, glyph: fgGlyph, name: Any, rename: bool) -> bool |
Rename a glyph. |
renameMaster |
function | (self, old_name: Any, new_name: Any) -> Any |
Rename a master. |
replaceGlyph |
function | (self, target: fgGlyph, newGlyph: fgGlyph, rename: bool) -> bool |
Swap one glyph for another. |
replaceShapeWithReference |
function | (self, *args: Any, **kwargs: Any) -> Any |
FlShape/Nothing replaceShapeWithReference(flShape shape, bool process[, string layer_name]) |
resetPackage |
function | (self) -> Any |
Reset the internal package state to defaults. |
resetStemData |
function | (self, *args: Any, **kwargs: Any) -> Any |
Reset stem data to default values derived from the font's outline weights. |
restoreHistoryState |
function | (self, history_ix: int) -> Any |
(shared captured text) |
runActions |
function | (self, *args: Any, **kwargs: Any) -> Any |
Apply one or more named actions to a list of glyphs. |
safeBottom_value |
attribute | Any |
The bottom of the "safe" rendering zone. |
safeTop_value |
attribute | Any |
The top of the "safe" rendering zone. |
sampleString |
attribute | Any |
An auto-generated sample text string based on the font's character set. |
setAxis |
function | (self, *args: Any, **kwargs: Any) -> Any |
Update an existing axis with new values (min, max, default, mapping). |
setFlag |
function | (self, *args: Any, **kwargs: Any) -> Any |
(shared captured text) |
setLocation |
function | (self, *args: Any, **kwargs: Any) -> Any |
Set the design-space location for a master. |
setMaster |
function | (self, notify: Any=...) -> Any |
Switch the active master to the one with the given name. |
setProperty |
function | (self, *args: Any, **kwargs: Any) -> Any |
Set object property by 'key' or number (shared captured text) |
setPropertyFloat |
function | (self, *args: Any, **kwargs: Any) -> Any |
Set float object property by 'key' (shared captured text) |
setPropertyInt |
function | (self, *args: Any, **kwargs: Any) -> Any |
Set int object property by 'key' (shared captured text) |
setUpm |
function | (self, upm: int, scale: bool) -> Any |
Change the units-per-em value. |
set_ascender_locked |
function | (self, b: bool) -> Any |
Lock the ascender metric so it cannot be changed by automatic recalculation. |
set_capsHeight_locked |
function | (self, b: bool) -> Any |
Lock the cap-height metric. |
set_descender_locked |
function | (self, b: bool) -> Any |
Lock the descender metric. |
set_interpolate |
function | (self, *args: Any, **kwargs: Any) -> Any |
Enable or disable interpolation for the font or a specific master. |
set_measurement_locked |
function | (self, b: bool) -> Any |
Lock the measurement line position. |
set_xHeight_locked |
function | (self, b: bool) -> Any |
Lock the x-height metric. |
sgn |
attribute | Any |
Style group name (subfamily within the family), e.g. |
slantTransform |
attribute | Any |
The geometric transform that applies the font's italic slant angle. |
slope |
attribute | Any |
Slope string, e.g. |
smartCornerParameters |
attribute | Any |
Parameters controlling smart-corner behaviour. |
stems |
function | (self, HintingDataType: Any, top: bool) -> Any |
Return the list of PostScript or TrueType stems (horizontal or vertical). |
store_font_info |
function | (self, *args: Any, **kwargs: Any) -> Any |
Write font info (names, metrics, flags) into a low-level fontgate package. |
store_hinting_data |
function | (self, package: fgPackage) -> Any |
Write the font's hinting data (stems, zones, glyph hints) into a low-level fontgate package. |
styleCode |
function | (self) -> Any |
Return the OS/2 fsSelection style code byte. |
tag |
function | (self, *args: Any, **kwargs: Any) -> Any |
(shared captured text) |
tfn |
attribute | Any |
Typographic family name — the top-level family name shared by all styles, e.g. |
title_name |
function | (self, force_full: Any=...) -> Any |
Return a display title for the font (family + style). |
tsn |
attribute | Any |
Typographic subfamily name — the style name within the typographic family, e.g. |
tt_stemsH |
attribute | Any |
TrueType horizontal stems. |
tt_stemsV |
attribute | Any |
TrueType vertical stems. |
tt_zonesB |
attribute | Any |
TrueType bottom zones. |
tt_zonesT |
attribute | Any |
TrueType top zones. |
tthRenameStems |
function | (self, map_h: dict[str, str], map_v: dict[str, str]) -> bool |
Rename TrueType stems across all glyphs in the font. |
tthRenameZones |
function | (self, map_top: dict[str, str], map_bottom: dict[str, str]) -> bool |
Rename TrueType zones across all glyphs. |
type |
attribute | Any |
Object type (shared captured text) |
underlinePosition_value |
attribute | Any |
The Y position of the underline stroke, relative to the baseline. |
underlineThickness_value |
attribute | Any |
The thickness of the underline stroke. |
update |
function | (self) -> Any |
(shared captured text) |
updateAxesMap |
function | (self) -> Any |
Rebuild the internal mapping between axis names and design-space locations after making changes to axes. |
updateFontMetrics |
function | (self) -> Any |
Recalculate all font-level metric values (ascender, descender, x-height, etc.) based on the current glyph data. |
updateShapeReferenceCount |
function | (self) -> Any |
Rebuild the internal reference-count table for all shared shape data. |
updateZonesFromGuidelines |
function | (self, *args: Any, **kwargs: Any) -> Any |
Re-derive alignment zone positions from the current font-level guidelines. |
upm |
attribute | Any |
The units-per-em value. |
variables |
attribute | Any |
All variable properties (expressions and interpolation formulas) defined in this font. |
variationPackages |
attribute | Any |
The list of master sub-packages. |
versionMajor |
attribute | Any |
The font's major version number (e.g. |
versionMinor |
attribute | Any |
The font's minor version number (e.g. |
weight |
attribute | Any |
Weight string, e.g. |
weight_value |
attribute | Any |
The weight axis value (0–1000 scale, matching the OpenType wght axis). |
width |
attribute | Any |
Width string, e.g. |
width_value |
attribute | Any |
The width axis value. |
xHeight_value |
attribute | Any |
The x-height — the distance from baseline to the top of flat lowercase letters like "x". |
zones |
function | (self, HintingDataType: Any, top: bool) -> Any |
Return the list of PS or TT alignment zones. |