fontlab.flLayer · declarations 002
getAuditInfo
getAuditInfo() -> Any
list(flAuditInfo) getAuditInfo()
Returns a list of audit issue objects describing problems found on this layer — things like open contours, duplicate nodes, or incorrect path direction.
Source: FontLab Proteus API documentation
getContours
getContours() -> Any
list(flContour) getContours()
Returns every contour from every shape in this layer as a flat list. A convenient way to iterate all outlines without looping through shapes manually.
Source: FontLab Proteus API documentation
getImgLayer
getImgLayer(create: bool) -> flLayer
flLayer getImgLayer(bool create)
Returns the image layer associated with this layer, creating it if create=True. The image layer holds raster reference images (scans, sketches) displayed behind the outlines.
Source: FontLab Proteus API documentation
getMaskLayer
getMaskLayer(create: bool) -> flLayer
flLayer getMaskLayer(bool create)
Returns the mask layer associated with this master layer. If create=True, the mask layer is created if it doesn't already exist. The mask layer is used for manual hinting reference outlines.
Source: FontLab Proteus API documentation
getMasterPosition
getMasterPosition() -> Any
QMap
Returns a dictionary mapping axis tags to values that describes where this layer sits in design space. For a two-axis font, this might be {"wght": 400, "wdth": 100}. Returns None for non-master layers.
Source: FontLab Proteus API documentation
getOwnerComposite
getOwnerComposite(*args: Any, **kwargs: Any) -> Any
flShapeInfo getOwnerComposite(flShape, QTransform) / flShapeData getOwnerComposite(flShape)
Given a sub-shape and a transform, finds the top-level composite that contains it. Useful when you have a reference to a nested element and need to navigate up to its owner.
Source: FontLab Proteus API documentation
getSelected
getSelected(SelectionMode: Any) -> Any
list(flContour)/Nothing getSelected(SelectionMode)
Returns contours (or parts of contours) that have selected nodes, filtered by the given selection mode. Returns None if nothing is selected.
Source: FontLab Proteus API documentation
getShapes
getShapes(shape_type: Any) -> Any
list(flShape) getShapes(ShapeType shape_type)
Returns all shapes of the given type without removing them from the layer. A filtered view of layer.shapes.
Source: FontLab Proteus API documentation
getTthCode
getTthCode(fg_layer: fgLayer, itr: fgTTInterpreter) -> bool
bool getTthCode(fgLayer fg_layer, fgTTInterpreter itr)
Compiles the TTH command list on this layer into executable bytecode and stores it in the given fontgate layer. Used during export.
Source: FontLab Proteus API documentation
getTthData
getTthData(fg_layer: fgLayer, itr: fgTTInterpreter) -> Any
list(bytes) / Nothing getTthData(fgLayer fg_layer, fgTTInterpreter itr)
Returns the compiled TrueType bytecode as a list of byte strings, or None if compilation fails. Useful for inspecting the output of the TTH compiler.
Source: FontLab Proteus API documentation
getTthProgram
getTthProgram(itr: fgTTInterpreter) -> str
QString getTthProgram(fgTTInterpreter itr)
Returns the TrueType hinting program for this layer as a human-readable text string. Use this to inspect, log, or compare TTH programs across masters.
Source: FontLab Proteus API documentation
glyph
instance-attribute
glyph: Any
flGlyph
The parent glyph that owns this layer. Use this to navigate back up from a layer to its glyph — for example, layer.glyph.name gives you the glyph name.
Source: FontLab Proteus API documentation
goDown
goDown(arg0: flShape) -> bool
bool goDown(flShape)
Moves the given shape one step lower in the z-order. Returns True if the move was possible (the shape was not already at the bottom).
Source: FontLab Proteus API documentation
goUp
goUp(arg0: flShape) -> bool
bool goUp(flShape)
Moves the given shape one step higher in the z-order. Returns True if the move was possible (the shape was not already at the top).
Source: FontLab Proteus API documentation
guidelines
instance-attribute
guidelines: Any
list(flGuideLine) guidelines()
All glyph-level guidelines on this layer.
Source: FontLab Proteus API documentation
hasAdvanceHeight
instance-attribute
hasAdvanceHeight: Any
bool hasAdvanceHeight()
True if a vertical advance height override is set.
Source: FontLab Proteus API documentation
hasAdvanceWidth
instance-attribute
hasAdvanceWidth: Any
bool hasAdvanceWidth()
True if this layer has an advance width override set (as opposed to inheriting the font's default).
Source: FontLab Proteus API documentation
hasBody
instance-attribute
hasBody: Any
bool hasBody()
True if this layer contains at least one drawn (non-component) shape.
Source: FontLab Proteus API documentation
hasComponents
instance-attribute
hasComponents: Any
bool hasComponents()
True if this layer has at least one component (composite reference to another glyph).
Source: FontLab Proteus API documentation
hasComposites
instance-attribute
hasComposites: Any
bool hasComposites()
True if this layer contains composite shapes (nested components).
Source: FontLab Proteus API documentation
hasFontAudit
hasFontAudit() -> bool
bool hasFontAudit()
Returns True if any audit issues have been recorded for this layer. A quick check before iterating the full audit list.
Source: FontLab Proteus API documentation
hasGuides
instance-attribute
hasGuides: Any
bool hasGuides()
True if this layer has at least one guideline.
Source: FontLab Proteus API documentation
hasHints
instance-attribute
hasHints: Any
bool hasHints()
True if this layer has PostScript hint data.
Source: FontLab Proteus API documentation
hasNote
instance-attribute
hasNote: Any
bool hasNote()
True if a note text has been set on this layer.
Source: FontLab Proteus API documentation
hasShape
hasShape(arg0: flShape) -> bool
bool hasShape(flShape)
Returns True if the given shape is currently part of this layer. A quick membership test before attempting operations that require the shape to be present.
Source: FontLab Proteus API documentation
hasShapeData
hasShapeData(arg0: flShapeData) -> bool
bool hasShapeData(flShapeData)
Returns True if the layer contains any shape that uses the given shared shape data object. Relevant when working with shapes that share outlines across layers.
Source: FontLab Proteus API documentation
hasTTData
instance-attribute
hasTTData: Any
bool hasTTData()
True if TrueType data is attached to this layer.
Source: FontLab Proteus API documentation
hasTTH
instance-attribute
hasTTH: Any
bool hasTTH()
True if TrueType hinting commands are present on this layer.
Source: FontLab Proteus API documentation
haveActiveComposite
instance-attribute
haveActiveComposite: Any
bool haveActiveComposite()
True if a composite shape is currently in the active/exploded editing state.
Source: FontLab Proteus API documentation
haveSelected
haveSelected(SelectionMode: Any) -> bool
bool haveSelected(SelectionMode)
Returns True if there is any active selection matching the given selection mode. A quick check before attempting operations that require a selection.
Source: FontLab Proteus API documentation
hints2links
hints2links() -> bool
bool hints2links()
Converts existing PostScript hint data on this layer into TrueType link commands. A useful starting point when you want to build a TrueType program from existing PS hints.
Source: FontLab Proteus API documentation
inkBox
inkBox(tx: Any = ...) -> QRectF
QRectF inkBox([QTransform tx = QTransform()])
Returns the bounding rectangle of all visible ink on this layer — the tightest box that encloses all the filled outlines. Optionally applies a transform before computing the box. This is the box that matters for spacing calculations.
Source: FontLab Proteus API documentation
insertShape
flShape insertShape(int index, flShape shape)
Inserts a shape at a specific z-order position rather than appending it to the top. Index 0 is the bottom of the stack. Returns the inserted shape as owned by the layer.
Source: FontLab Proteus API documentation
isActive
instance-attribute
isActive: Any
bool isActive()
True when this is the glyph's currently active layer in the editor.
Source: FontLab Proteus API documentation
isAllSelected
instance-attribute
isAllSelected: Any
bool
True when all shapes and nodes in this layer are selected. Setting to True selects everything; setting to False deselects everything.
Source: FontLab Proteus API documentation
isBack
isBack(arg0: flShape) -> bool
bool isBack(flShape)
Returns True if the given shape is at the very bottom of the z-order (rendered first, behind all others).
Source: FontLab Proteus API documentation
isBodyLayer
instance-attribute
isBodyLayer: Any
bool isBodyLayer()
True for the main drawing layer of a glyph.
Source: FontLab Proteus API documentation
isCompatible
isCompatible(arg0: flLayer, strong: bool) -> bool
bool isCompatible(flLayer, bool strong)
Checks whether this layer is interpolation-compatible with the given layer. With strong=True, the check is strict (same number of contours, nodes, and components in the same order). With strong=False, a looser check is applied.
Source: FontLab Proteus API documentation
isFront
isFront(arg0: flShape) -> bool
bool isFront(flShape)
Returns True if the given shape is at the very top of the z-order (rendered last, in front of all others).
Source: FontLab Proteus API documentation
isImg
instance-attribute
isImg: Any
bool isImg()
True if this layer contains image data (a raster scan or reference image).
Source: FontLab Proteus API documentation