Skip to content

fontlab.flShape · declarations 003

Back to fontlab.flShape

removeContour

removeContour(arg0: flContour) -> Any

removeContour(flContour)

Detaches and removes a specific contour from the shape. The shape's geometry updates immediately. Pass the exact flContour object you got from getContours().

Source: FontLab Proteus API documentation

removeContours

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

removeContours(list(flContour))

Removes several contours at once. Equivalent to multiple removeContour calls but faster for batch operations.

Source: FontLab Proteus API documentation

replaceInclude

replaceInclude(old_shape: flShape, new_shape: flShape) -> Any

replaceInclude(flShape old_shape, flShape new_shape)

Swaps one child shape for another within the composite list. The position in the list is preserved. Useful for updating a component reference without reconstructing the entire composite.

Source: FontLab Proteus API documentation

resetInkBox

resetInkBox() -> Any

resetInkBox()

Invalidates the cached bounding box, forcing it to be recalculated on next access. Call this after you modify nodes directly without going through the shape's transform pipeline.

Source: FontLab Proteus API documentation

resetTransformationData

resetTransformationData() -> Any

resetTransformationData()

Clears the transform cache created by prepareTransformationData(). Call this after finishing or cancelling a transform operation.

Source: FontLab Proteus API documentation

selectAllData

selectAllData() -> Any

selectAllData()

Selects every node and every sub-shape in this shape. Equivalent to pressing Cmd+A while this element is active in the editor.

Source: FontLab Proteus API documentation

selected instance-attribute

selected: Any

bool

Whether this shape is selected in the layer. Selected shapes respond to UI transform commands (move, scale, rotate).

Source: FontLab Proteus API documentation

setIncludes

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

setIncludes(list(flShape))

Replaces the entire include list in one operation. Use this to completely reorder or restructure the children of a composite.

Source: FontLab Proteus API documentation

setReflected

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

setReflected(bool, bool)

Sets the horizontal and/or vertical reflection state. Passing True, False flips the element horizontally; False, True flips it vertically.

Source: FontLab Proteus API documentation

shapeBuilder instance-attribute

shapeBuilder: Any

flShapeBuilder

The parametric builder attached to this shape, if any. Stroke elements, engravings, and smart-corner shapes all have a shapeBuilder. For plain drawn contours, this property is None. See flShapeBuilder.

Source: FontLab Proteus API documentation

shapeData instance-attribute

shapeData: Any

flShapeData

The underlying shared data record for this shape. For component shapes, multiple flShape objects point to the same flShapeData. See flShapeData for details.

Source: FontLab Proteus API documentation

shapeType instance-attribute

shapeType: Any

ShapeType

An enum value describing what kind of shape this is: Simple, Composite, AccentInfo, Image, etc. Use this for type dispatching in scripts that handle multiple shape kinds.

Source: FontLab Proteus API documentation

simpleShape

simpleShape() -> bool

bool simpleShape()

Currently returns False unconditionally in the native implementation. Use shapeType, isComponent and isComposite to select plain contours.

Source: FontLab Proteus API documentation

smartCornerSource

smartCornerSource() -> flShape

flShape smartCornerSource() - editable source of a Smart Corners filter, self for plain outlines, null for unsupported/locked shapes

sticker instance-attribute

sticker: Any

flSticker

The sticker (visual annotation bubble) attached to this shape, if any. Stickers are the coloured note labels you can attach to elements in the FontLab UI.

Source: FontLab Proteus API documentation

transform instance-attribute

transform: Any

transform

The raw Qt transformation matrix for this shape. This controls position, scale, rotation, and skew in one matrix. For simpler positional offsets, prefer moving nodes rather than adjusting the transform, as transform-offset shapes can behave unexpectedly in interpolation.

Source: FontLab Proteus API documentation

unselectAllNodes

unselectAllNodes() -> Any

unselectAllNodes()

Clears the node selection on every contour in this shape. Useful at the start of a script that will set a specific selection, to ensure you start from a clean state.

Source: FontLab Proteus API documentation

vertReflection

vertReflection() -> bool

bool vertReflection()

Returns True if this shape has a vertical reflection flag set, meaning it is mirrored top-to-bottom.

Source: FontLab Proteus API documentation