fontlab.flGlyph · declarations 002
horzReflection
horzReflection() -> bool
bool horzReflection()
Return True if the glyph is horizontally mirrored (flipped left–right).
Source: FontLab Proteus API documentation
initializeSigma
initializeSigma(*args: Any, **kwargs: Any) -> Any
dict initializeSigma(): bind compatible master points for Sigma
inkBox
inkBox(tx: Any = ...) -> QRectF
QRectF inkBox([QTransform tx = QTransform()])
Returns the tightest bounding box that fits around all visible outlines, optionally measured under a coordinate transform. "Ink box" means only the drawn paths — it excludes side-bearings.
Source: FontLab Proteus API documentation
interpolateInstance
interpolateInstance(location: flLocation, round: bool) -> flLayer
flLayer interpolateInstance(flLocation location, bool round)
Compute and return a new layer that is the interpolated result at the given point in design space. Pass round=True to snap all coordinates to integers.
Source: FontLab Proteus API documentation
isUnbindedDependecies
isUnbindedDependecies() -> bool
bool isUnbindedDependecies()
Return True if any component references are currently unresolved — meaning a component points to a glyph name that doesn't exist in the font.
Source: FontLab Proteus API documentation
lastModified
instance-attribute
lastModified: Any
QDateTime
The timestamp of the most recent change to this glyph.
Source: FontLab Proteus API documentation
layer_names
layer_names() -> list[str]
List layer names; immutable native classes use extensions.layer_names.
layers
instance-attribute
layers: Any
list(flLayer)
All layers belonging to this glyph — master layers plus any service layers.
Source: FontLab Proteus API documentation
leftMetric
instance-attribute
leftMetric: Any
QPointF
The left metric attachment point.
Source: FontLab Proteus API documentation
lib
instance-attribute
lib: Any
dict(name, QVariant)
An arbitrary key–value dictionary for storing custom metadata on the glyph. Keys are strings; values can be any serialisable type.
Source: FontLab Proteus API documentation
linkInstances
bool linkInstances(flGlyph, fgGlyph)
Bind an existing flGlyph to a given fgGlyph identifier. Used internally when the object model is reconstructed after an undo.
Source: FontLab Proteus API documentation
mark
instance-attribute
mark: Any
int
Effective colour mark, which can come from the active layer. Reading can import glyph geometry; writing can also change layer marks. See the encoding and history notes below.
Source: FontLab Proteus API documentation
masters2PS
masters2PS(precision: float) -> bool
bool masters2PS(double precision)
Convert all master layers from TrueType quadratic curves back to PostScript cubic Bézier curves.
Source: FontLab Proteus API documentation
masters2TT
masters2TT(precision: float) -> bool
bool masters2TT(double precision)
Convert all master layers from PostScript cubic Bézier curves to TrueType quadratic curves. Use this when preparing a font for a TrueType-only workflow.
Source: FontLab Proteus API documentation
measurementLine
measurementLine() -> Any
double/Nothing measurementLine()
Return the Y-coordinate of the glyph's custom measurement line, or None if it hasn't been set. The measurement line is a horizontal reference you can draw anywhere in the glyph.
Source: FontLab Proteus API documentation
metricsLeft
instance-attribute
metricsLeft: Any
QString
The left sidebearing expression. Can be a number ("20") or a reference to another glyph ("=n"). FontLab evaluates the expression to determine the actual sidebearing.
Source: FontLab Proteus API documentation
metricsRect
instance-attribute
metricsRect: Any
QRectF
The rectangle defined by the advance width and the font's vertical metrics.
Source: FontLab Proteus API documentation
metricsRight
instance-attribute
metricsRight: Any
QString
The right sidebearing expression. Works the same way as metricsLeft.
Source: FontLab Proteus API documentation
metricsWidth
instance-attribute
metricsWidth: Any
QString
An expression for the total advance width. When set, it overrides both sidebearing expressions.
Source: FontLab Proteus API documentation
name
instance-attribute
name: Any
QString
The glyph's name — for example "A", "a.sc", or "uni0041". This is what OpenType features and classes reference.
Source: FontLab Proteus API documentation
nodesCount
instance-attribute
nodesCount: Any
int
The total number of nodes across all shapes in the active layer. A quick sanity check for outline complexity.
Source: FontLab Proteus API documentation
note
instance-attribute
note: Any
QString
A freeform text note you can attach to any glyph. Great for leaving comments for yourself or collaborators.
Source: FontLab Proteus API documentation
otGlyphClass
instance-attribute
otGlyphClass: Any
int
The OpenType glyph class: 0 = unassigned, 1 = base, 2 = ligature, 3 = mark, 4 = component. This affects how OpenType lookups treat the glyph.
Source: FontLab Proteus API documentation
otLigaturesCount
instance-attribute
otLigaturesCount: Any
int
The number of components in a ligature. Only meaningful when otGlyphClass == 2.
Source: FontLab Proteus API documentation
otMarkClass
instance-attribute
otMarkClass: Any
int
The OpenType mark class index. Only meaningful when otGlyphClass == 3.
Source: FontLab Proteus API documentation
package
instance-attribute
package: Any
flObject
The font that contains this glyph. Use this to navigate back up to the font level.
Source: FontLab Proteus API documentation
prepareTransformationData
prepareTransformationData() -> Any
prepareTransformationData()
Cache the current geometry before beginning a transform operation. Called internally before dragging or scripted transforms.
Source: FontLab Proteus API documentation
removeEmptyShapes
removeEmptyShapes() -> Any
removeEmptyShapes()
Delete any shapes in the glyph that contain no contours — useful for cleaning up stray empty shape containers.
Source: FontLab Proteus API documentation
removeLayer
removeLayer(arg0: flLayer) -> None
void removeLayer(flLayer)
Detach and remove a layer from this glyph. The layer object is not destroyed; you could add it to another glyph if needed.
Source: FontLab Proteus API documentation
resetInkBox
resetInkBox() -> Any
resetInkBox()
Invalidate the cached ink bounding box so it will be recalculated on the next access. Call after modifying outline data.
Source: FontLab Proteus API documentation
resetTransformationData
resetTransformationData() -> Any
resetTransformationData()
Clear the transformation data cache after a transform is complete.
Source: FontLab Proteus API documentation
rightMetric
instance-attribute
rightMetric: Any
QPointF
The right metric attachment point — used when linking metrics to a specific location on the outline.
Source: FontLab Proteus API documentation
setAllShapesSelected
setAllShapesSelected(bool: Any) -> Any
setAllShapesSelected(bool)
Select (True) or deselect (False) every shape in the glyph.
Source: FontLab Proteus API documentation
setLSB
setLSB(v: float, move_guidelines: bool, tr: QTransform) -> bool
bool setLSB(double v, bool move_guidelines, QTransform tr)
Set the left sidebearing to v font units. If move_guidelines=True, any glyph-level vertical guidelines will be shifted to stay in position relative to the outline.
Source: FontLab Proteus API documentation
setLayers
setLayers(*args: Any, **kwargs: Any) -> Any
void setLayers(list(flLayer))
Replace the glyph's entire layer list with a new one. Use with care — this discards all existing layers.
Source: FontLab Proteus API documentation
setRSB
setRSB(v: float, tr: QTransform) -> bool
bool setRSB(double v, QTransform tr)
Set the right sidebearing. The transform tr accounts for italic slant when measuring the right edge.
Source: FontLab Proteus API documentation
setReflected
setReflected(*args: Any, **kwargs: Any) -> Any
setReflected(bool, bool)
Set the horizontal and/or vertical reflection flags.
Source: FontLab Proteus API documentation
setSB
setSB(l: float, r: float, move_guidelines: bool, all_layers: bool, tr: QTransform) -> bool
bool setSB(double l, double r, bool move_guidelines, bool all_layers, QTransform tr)
Set both sidebearings in one call. Pass all_layers=True to propagate the change to every master layer simultaneously.
Source: FontLab Proteus API documentation
setSigmaData
setSigmaData(*args: Any, **kwargs: Any) -> Any
setSigmaData(dict): validate and apply Sigma metadata as an undoable edit
setTag
setTag(arg0: str, bool: Any) -> None
void setTag(QString, bool)
Add (state=True) or remove (state=False) a single tag string from this glyph.
Source: FontLab Proteus API documentation