fontlab.flShapeBuilder · declarations 001
Back to fontlab.flShapeBuilder
canUngroup
instance-attribute
canUngroup: Any
bool canUngroup()
True if this builder's result can be ungrouped — dissolved into its individual constituent shapes. For example, a group builder that combines several sub-shapes can be ungrouped; a simple stroke builder cannot. Check this before attempting an ungroup operation.
Source: FontLab Proteus API documentation
deactivate
deactivate() -> Any
deactivate()
Signals that the current build operation is complete and cleans up the in-progress state. In a drawing context, this is called when you finish placing a contour. In a script, you would call this if you have programmatically activated a builder and want to commit its result and return the shape to a normal state.
Source: FontLab Proteus API documentation
getSmartNodes
getSmartNodes() -> Any
list(flNode)/Nothing getSmartNodes()
hasFeature
hasFeature(BuilderFeatures: Any) -> bool
bool hasFeature(BuilderFeatures)
Tests whether this builder supports a specific capability. BuilderFeatures is an integer enum; common values are: 1 = CanAddNodes (you can add nodes to the builder's skeleton path), 2 = CanClose (the path can be closed), 4 = CanBoolean (boolean operations are supported). Check capabilities before calling operations that may not apply to all builder types.
Source: FontLab Proteus API documentation
haveResult
instance-attribute
haveResult: Any
bool haveResult()
True if the builder has finished computing and has a result shape ready to commit to the glyph. During an in-progress drawing operation, this will be False until the contour is closed or the tool is deactivated. Checking haveResult is the correct way to determine whether the builder's output is ready.
Source: FontLab Proteus API documentation
init
init() -> Any
init()
Resets the builder to a fresh, empty state, discarding any partially built result. Call this before starting a new build session on a builder you are reusing. Calling init() on a builder that already has a committed shape does nothing to the shape — it only resets the builder's internal tracking.
Source: FontLab Proteus API documentation
prepareTransformationData
prepareTransformationData() -> Any
prepareTransformationData()
Caches the current geometry so that interactive transformations (rotate, scale) work correctly on the builder's result shape. Must be called before applying any transform to a shape that has a builder. The same rule applies here as for flShape.prepareTransformationData().
Source: FontLab Proteus API documentation
resetTransformationData
resetTransformationData() -> Any
resetTransformationData()
Discards the transform cache created by prepareTransformationData(). Call after finishing or cancelling a transform on a builder shape. Leaving stale transform data can cause visual glitches on subsequent transforms.
Source: FontLab Proteus API documentation
setDestShape
setDestShape(arg0: flShape) -> Any
setDestShape(flShape)
Designates which flShape the builder should write its generated contours into. When the builder recomputes, its output goes into this shape. Used when setting up a builder programmatically and connecting it to a target shape.
Source: FontLab Proteus API documentation
setDestShapeData
setDestShapeData(arg0: flShapeData) -> Any
setDestShapeData(flShapeData)
Like setDestShape, but targets the inner flShapeData directly rather than the full shape wrapper. This is the lower-level version, useful when you are assembling shape data manually and want to connect a builder at the data layer.
Source: FontLab Proteus API documentation
setOwnerLayer
setOwnerLayer(arg0: flObject) -> Any
setOwnerLayer(flObject)
Sets the layer that "owns" this builder — the layer in which new shapes or glyphs created by the build operation will appear. This is important for builders that can create additional shapes (like some composite builders).
Source: FontLab Proteus API documentation
setOwnerShapeData
setOwnerShapeData(arg0: flObject) -> Any
setOwnerShapeData(flObject)
Sets the owning shape data context. Controls which flShapeData this builder is nested inside when building composite or grouped parametric structures.
Source: FontLab Proteus API documentation
title
instance-attribute
title: Any
QString title()
A short human-readable label for this builder type, such as "Pen", "Stroke", "Engraving", "SmartCorner", or "Group". This string is what FontLab displays in the status bar when this kind of element is active. Use it for type identification in scripts.
Source: FontLab Proteus API documentation