Skip to content

fontlab.flGlyph · declarations 001

Back to fontlab.flGlyph

activeLayer instance-attribute

activeLayer: Any

flLayer

The shared legacy/default layer. Glyph Window occurrences may override it; interactive tools should use their flGlyphInfo.activeLayer and isEditable instead.

Source: FontLab Proteus API documentation

addLayer

addLayer(back: Any = ...) -> None

void addLayer(flLayer[, bool back = false])

Append a layer to the glyph's layer stack. If back=True, the layer is inserted at the back (bottom) of the stack instead.

Source: FontLab Proteus API documentation

addLayers

addLayers(*args: Any, **kwargs: Any) -> Any

void addLayers(list(flLayer))

Add multiple layers at once — more efficient than calling addLayer in a loop when you have many layers to add.

Source: FontLab Proteus API documentation

advanceWidth instance-attribute

advanceWidth: Any

double

The total advance width in font units — the horizontal distance the cursor moves after this glyph.

Source: FontLab Proteus API documentation

applyTransform

applyTransform(*args: Any, **kwargs: Any) -> Any

applyTransform([QTransform transform])

Apply a geometric transform (move, scale, rotate, skew) to all shapes in all layers. If no transform is passed, the glyph's own stored transform is applied and cleared.

Source: FontLab Proteus API documentation

ascender instance-attribute

ascender: Any

double

A glyph-specific ascender override. Set to 0 to inherit the font-level ascender value.

Source: FontLab Proteus API documentation

assignFontGateData

assignFontGateData(arg0: fgFontGateData, doGuide: bool = True, doHints: bool = True, doAnchors: bool = True) -> None

void assignFontGateData(fgFontGateData, bool doGuide = true, bool doHints = true, bool doAnchors = true)

Apply a previously collected low-level data snapshot back onto this glyph, restoring guides, hints, and/or anchors.

Source: FontLab Proteus API documentation

bindDependencies

bindDependencies() -> Any

bindDependencies()

Re-link component references — useful after you have programmatically added glyphs that are used as components in other glyphs.

Source: FontLab Proteus API documentation

bodyLayer instance-attribute

bodyLayer: Any

flLayer

The primary drawing layer — usually the one whose name matches the active master.

Source: FontLab Proteus API documentation

bodyRect instance-attribute

bodyRect: Any

QRectF

The bounding rectangle of the glyph's "body" layer shapes only — excluding service layers.

Source: FontLab Proteus API documentation

boundingBox instance-attribute

boundingBox: Any

QRectF

The tightest rectangle that encloses all outlines in the active layer. Unlike inkBox(), this is always in plain glyph coordinates with no transform applied.

Source: FontLab Proteus API documentation

clearSigmaData

clearSigmaData(*args: Any, **kwargs: Any) -> Any

clearSigmaData(): remove authored Sigma curves

clearUpdateFgGlyphs

clearUpdateFgGlyphs() -> Any

clearUpdateFgGlyphs()

Clear the queue of glyphs pending a low-level refresh.

Source: FontLab Proteus API documentation

createInstance

createInstance() -> flGlyph

flGlyph createInstance()

Allocate and return a fresh internal glyph instance. Rarely needed in scripts — use flGlyph() instead.

Source: FontLab Proteus API documentation

deactivateAll

deactivateAll() -> Any

deactivateAll()

Deactivate all active shapes and contours in this glyph.

Source: FontLab Proteus API documentation

descender instance-attribute

descender: Any

double

A glyph-specific descender override. Set to 0 to inherit the font-level value.

Source: FontLab Proteus API documentation

ensureFgData

ensureFgData(arg0: fgGlyph) -> fgFontGateData

fgFontGateData ensureFgData(fgGlyph)

Guarantee the glyph has an associated low-level data block, creating it if absent. Call before writing hint or guide data.

Source: FontLab Proteus API documentation

ensureMaskLayer

ensureMaskLayer() -> flLayer

flLayer ensureMaskLayer()

Return the glyph's mask layer, creating it if it doesn't exist yet. The mask layer is used for reference drawings that don't export.

Source: FontLab Proteus API documentation

fgGlyph instance-attribute

fgGlyph: Any

fgGlyph

The underlying low-level glyph object. Needed when calling fontgate-level APIs.

Source: FontLab Proteus API documentation

fgGlyphId instance-attribute

fgGlyphId: Any

FgTypeId

The low-level numeric identifier for this glyph within the fontgate engine.

Source: FontLab Proteus API documentation

fgPackage instance-attribute

fgPackage: Any

fgFont

The underlying low-level font object. Mostly used internally; prefer glyph.package for scripting.

Source: FontLab Proteus API documentation

fillFgData

fillFgData(doGuides: bool, doHints: bool) -> fgFontGateData

fgFontGateData fillFgData(bool doGuides, bool doHints)

Collect the glyph's guide and hint data into a low-level snapshot object. Used before exporting or comparing hint data.

Source: FontLab Proteus API documentation

findLayer

findLayer(cs: Any = ...) -> flLayer

flLayer findLayer(QString name[, Qt::CaseSensitivity cs = Qt::CaseSensitive])

Search for a layer by name and return it, or None if no layer with that name exists. Case-sensitive by default.

Source: FontLab Proteus API documentation

findLayerCreate

findLayerCreate(cs: Any = ...) -> flLayer

flLayer findLayerCreate(QString name[, Qt::CaseSensitivity cs = Qt::CaseSensitive])

Like findLayer, but if no layer is found it creates a new empty layer with the given name and returns it. Handy when you want to make sure a layer exists before writing to it.

Source: FontLab Proteus API documentation

findVerticalGuideline

findVerticalGuideline(arg0: str) -> Any

double/Nothing findVerticalGuideline(QString)

Look up a named vertical guideline and return its X position, or None if not found.

Source: FontLab Proteus API documentation

getAuditInfo

getAuditInfo() -> Any

list(flAuditInfo) getAuditInfo()

Return the list of currently recorded quality issues for this glyph — open contours, wrong curve directions, duplicate nodes, and so on.

Source: FontLab Proteus API documentation

getLSB

getLSB(tr: QTransform) -> float

double getLSB(QTransform tr)

Return the current left sidebearing, measured under the given transform.

Source: FontLab Proteus API documentation

getLayerByName

getLayerByName(create: Any = ...) -> flLayer

flLayer getLayerByName(QString[, bool create =false])

Look up a layer by name. Pass create=True to auto-create it if absent — equivalent to findLayerCreate.

Source: FontLab Proteus API documentation

getRSB

getRSB(tr: QTransform) -> float

double getRSB(QTransform tr)

Return the current right sidebearing, measured under the given transform.

Source: FontLab Proteus API documentation

getSB

getSB(*args: Any, **kwargs: Any) -> Any

(double l, double r) getSB(QTransform tr)

Return both sidebearings as a tuple (left, right).

Source: FontLab Proteus API documentation

getSigmaData

getSigmaData(*args: Any, **kwargs: Any) -> Any

dict getSigmaData(): return editable Sigma metadata

glyphMark instance-attribute

glyphMark: Any

int: glyph-only mark; does not change layer marks or record history

Stored glyph-only colour mark. Reads and writes do not import geometry or change layer flags. The setter also synchronizes the FontGate mark, but does not create an Undo step or notify the UI.

Source: FontLab Proteus API documentation

glyphName

glyphName() -> str

QString glyphName()

Return the canonical glyph name as a string. Usually the same as glyph.name but guaranteed to be non-null.

Source: FontLab Proteus API documentation

glyphRect instance-attribute

glyphRect: Any

QRectF

The full glyph cell rectangle, spanning the advance width and the font's ascender-to-descender range.

Source: FontLab Proteus API documentation

hasBody instance-attribute

hasBody: Any

bool

True if the body layer contains at least some visible outline data. Useful for skipping empty glyphs in a loop.

Source: FontLab Proteus API documentation

hasChanges instance-attribute

hasChanges: Any

bool

True if the glyph has been modified since the last save.

Source: FontLab Proteus API documentation

hasFontAudit

hasFontAudit() -> bool

bool hasFontAudit()

Return True if there is at least one outstanding audit issue recorded for this glyph.

Source: FontLab Proteus API documentation

hasInstance

hasInstance(arg0: fgGlyph) -> bool

bool hasInstance(fgGlyph)

Check whether a given low-level fgGlyph already has a Python flGlyph wrapper bound to it. Useful when writing tools that mix low-level and high-level APIs.

Source: FontLab Proteus API documentation

has_layer

has_layer(name: str) -> bool

Check for a named layer; see extensions.has_layer on immutable classes.

haveSelected

haveSelected(SelectionMode: Any) -> bool

bool haveSelected(SelectionMode)

Return True if there is an active selection of the given type (nodes, shapes, etc.).

Source: FontLab Proteus API documentation