Skip to content

fontlab.flLayer · declarations 004

Back to fontlab.flLayer

setGlyphComponents

setGlyphComponents(components: Any, width: Any, package: Any, colorize: Any, arg4: flags = 0) -> Any

setGlyphComponents(components, width, package, colorize, flags=0) -> bool. Replaces shapes; components are GlyphComponent objects or (name_id, transform, width_scale, use_anchors) tuples.

Replaces this layer's contents with a set of glyph components at the given width. Used to programmatically construct composite glyphs from a component recipe.

Source: FontLab Proteus API documentation

setWireframeColorIx

setWireframeColorIx(int: Any) -> Any

setWireframeColorIx(int)

Sets the wireframe display color for this layer using a color index from FontLab's color palette.

Source: FontLab Proteus API documentation

shapes instance-attribute

shapes: Any

list(flShape) shapes()

All shapes on this layer, in z-order from back to front. The first shape in the list is drawn first (behind others).

Source: FontLab Proteus API documentation

shapesCount instance-attribute

shapesCount: Any

int shapesCount()

The number of shapes on this layer. A quick count without constructing the full shapes list.

Source: FontLab Proteus API documentation

sortShapes

sortShapes() -> Any

sortShapes()

Re-sorts the layer's shape list according to FontLab's z-order rules. Call after reordering operations to ensure the internal order matches what is displayed.

Source: FontLab Proteus API documentation

takeShapes

takeShapes(shape_type: Any) -> list[flShape]

QList takeShapes(ShapeType shape_type)

Removes all shapes of the given type from the layer and returns them as a list. The shapes are detached from the layer — you own them and can add them elsewhere.

Source: FontLab Proteus API documentation

transferNames

transferNames(layer: flLayer) -> Any

transferNames(flLayer layer)

Copies the name and name-related metadata from the given layer to this one.

Source: FontLab Proteus API documentation

transferTTH

transferTTH(arg0: flLayer) -> bool

bool transferTTH(flLayer)

Copies all TrueType hinting commands from the given source layer to this layer. Useful when you have carefully hinted one master and want to use it as a starting point for another.

Source: FontLab Proteus API documentation

transform instance-attribute

transform: Any

QTransform

A layer-level geometric transform applied on top of all shape coordinates during display and export.

Source: FontLab Proteus API documentation

ttData instance-attribute

ttData: Any

fgTrueTypeData

The TrueType-specific data blob for this layer, containing compiled hinting tables.

Source: FontLab Proteus API documentation

tthAutohint

tthAutohint(make_hints: bool, itr: fgTTInterpreter) -> Any

tthAutohint(bool make_hints, fgTTInterpreter itr)

Runs TrueType auto-hinting on this layer. If make_hints is True, PS hints are generated first as the basis for the TTH program.

Source: FontLab Proteus API documentation

tthFixZones

tthFixZones(itr: fgTTInterpreter) -> Any

tthFixZones(fgTTInterpreter itr)

Fixes any broken zone references in the TTH program. Call this after adding or removing alignment zones.

Source: FontLab Proteus API documentation

tthProgram instance-attribute

tthProgram: Any

QList

The list of TrueType hinting commands for this layer. You can iterate, inspect, or modify these directly.

Source: FontLab Proteus API documentation

tthReassignStems

tthReassignStems(itr: fgTTInterpreter) -> Any

tthReassignStems(fgTTInterpreter itr)

Re-maps stem references in the TTH program after stems have been added, removed, or reordered in the font's stem list. Run this after editing stems to keep the TTH program consistent.

Source: FontLab Proteus API documentation

tthReassignZones

tthReassignZones(itr: fgTTInterpreter, bool: Any) -> Any

tthReassignZones(fgTTInterpreter itr, bool)

Reassigns zone references in the TTH program. Similar to tthReassignStems but for zones.

Source: FontLab Proteus API documentation

tthRemoveCommands

tthRemoveCommands(vertical: bool, horizontal: bool) -> Any

tthRemoveCommands(bool vertical, bool horizontal)

Removes TrueType alignment commands by direction. Useful for clearing auto-generated TTH while keeping manually added commands.

Source: FontLab Proteus API documentation

tthRemoveDeltas

tthRemoveDeltas(middle: bool, final: bool) -> Any

tthRemoveDeltas(bool middle, bool final)

Removes TTH delta commands (fine per-PPEM pixel adjustments) by phase. middle deltas adjust intermediate sizes; final deltas adjust specific sizes.

Source: FontLab Proteus API documentation

unselectAllNodes

unselectAllNodes() -> Any

unselectAllNodes()

Deselects every node in every shape in this layer. Call this before programmatically selecting a specific set of nodes to avoid unexpected multi-selections.

Source: FontLab Proteus API documentation

updateAnchors

updateAnchors() -> Any

updateAnchors()

Recalculates anchor positions relative to the current outline geometry. Call this after programmatically moving outlines if you want anchors (like "top" on a base letter) to follow the shapes they are conceptually attached to.

Source: FontLab Proteus API documentation

updateAudit

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

void updateAudit(list(int))

Re-runs the specified audit checks (identified by integer check IDs) on this layer and updates the stored results.

Source: FontLab Proteus API documentation

updateGuidelineNode

updateGuidelineNode(node: flNode) -> flNode

flNode updateGuidelineNode(flNode node)

Recalculates a guideline's anchor node position after the outline geometry has changed. Call this if you have guidelines that are supposed to track outline points.

Source: FontLab Proteus API documentation

updatePreviewLinks() -> None

void updatePreviewLinks()

Rebuilds the preview link chain used by the glyph editor's preview rendering. Call after structural changes that affect how layers relate to each other.

Source: FontLab Proteus API documentation

wireframeColor instance-attribute

wireframeColor: Any

QColor

The display color used when this layer is in wireframe mode.

Source: FontLab Proteus API documentation