fontlab.flGuideLine · declarations 001
angle
instance-attribute
angle: Any
double
The angle of the guideline in degrees. 0 = horizontal, 90 = vertical, 45 = diagonal. You can set any value
Source: FontLab Proteus API documentation
angleMode
instance-attribute
angleMode: Any
SnapAngleMode
Controls how the angle snaps or is constrained during interactive editing
Source: FontLab Proteus API documentation
applyTransform
applyTransform(arg0: QTransform) -> None
void applyTransform(QTransform)
Move, rotate, or scale the guideline using a transform matrix. The most common use is QTransform().translate(dx, dy) to shift the guideline
Source: FontLab Proteus API documentation
center
instance-attribute
center: Any
flNode
The node that defines the guideline's origin/center point. You can read its .x and .y coordinates
Source: FontLab Proteus API documentation
centerPoint
instance-attribute
centerPoint: Any
QPointF
The center position as a plain QPointF. Convenient when you just need the coordinates without the full node
Source: FontLab Proteus API documentation
color
instance-attribute
color: Any
QColor
A custom color for this guideline. Lets you color-code your references — red for danger zones, blue for optical targets, etc. Check hasColor before reading to avoid surprises
Source: FontLab Proteus API documentation
constraints
instance-attribute
constraints: Any
QRectF
A rectangle that limits how far the guideline can be moved interactively. An empty rectangle means no movement constraint
Source: FontLab Proteus API documentation
counterPaper
counterPaper() -> int
int counterPaper()
Return the number of paper (font-level) guidelines currently in the font
Source: FontLab Proteus API documentation
createInstance
createInstance() -> flGuideLine
flGuideLine createInstance()
Allocate a new guideline instance
Source: FontLab Proteus API documentation
createPowerGuides
createPowerGuides(arg0: fgFont, arg1: flLayer, horizontal: bool, vertical: bool, use_glyph_guides: Any = ...) -> bool
bool createPowerGuides(fgFont, flLayer, bool horizontal, bool vertical, bool diagonal[, bool use_glyph_guides=true[, bool use_font_guides = true]])
Auto-generate power guides from the extreme points of existing contours in this layer. Pass horizontal=True to capture tops and bottoms, vertical=True for left/right extremes, diagonal=True for diagonal tangent points
Source: FontLab Proteus API documentation
disconnectFromContour
disconnectFromContour() -> Any
disconnectFromContour()
If this guideline was "locked" to a specific node on a contour, this breaks that connection, making the guideline free-floating again
Source: FontLab Proteus API documentation
distanceTo
distanceTo(arg0: QPointF, mode: int) -> float
double distanceTo(QPointF, uint mode)
expression
instance-attribute
expression: Any
QString
An arithmetic expression that determines this guideline's position. Write "=xHeight" to lock the guide to the x-height metric, or "=capHeight * 0.5" to place it at half cap height. The guide recalculates automatically when the metric changes
Source: FontLab Proteus API documentation
extLinef
instance-attribute
extLinef: Any
QLineF
The extended line segment, if present
Source: FontLab Proteus API documentation
extPosition
instance-attribute
extPosition: Any
double
An extended position value. For non-horizontal/vertical guides, this stores a secondary position along the guide's axis
Source: FontLab Proteus API documentation
extension
instance-attribute
extension: Any
flNode: existing extension node, or None if absent (read-only)
getHashCode
getHashCode(arg0: QPointF, angle: float) -> int
long getHashCode(QPointF, double angle)
Compute a unique hash for a given position + angle combination. Used internally for deduplication — you rarely need this, but it can help you check whether two guidelines are "the same"
Source: FontLab Proteus API documentation
hasColor
instance-attribute
hasColor: Any
bool
True if a custom color has been set. Always check this before reading color if you don't want the default
Source: FontLab Proteus API documentation
hasExpression
instance-attribute
hasExpression: Any
bool
True if this guideline's position is controlled by an expression string
Source: FontLab Proteus API documentation
hasExtLine
instance-attribute
hasExtLine: Any
bool
True if there is an extended line segment attached (a secondary segment that extends past the main guide)
Source: FontLab Proteus API documentation
hasTags
instance-attribute
hasTags: Any
bool
True if at least one tag has been assigned to this guideline
Source: FontLab Proteus API documentation
isAbsoluteMarkerPos
instance-attribute
isAbsoluteMarkerPos: Any
bool
When True, any measurement markers on this guideline are positioned using absolute coordinates. When False, marker positions are relative to the guideline's center
Source: FontLab Proteus API documentation
isExluded
instance-attribute
isExluded: Any
bool
isGhost
instance-attribute
isGhost: Any
bool: actual ghost-hint flag (read-only)
isGuideLine
isGuideLine(arg0: flObject) -> bool
bool isGuideLine(flObject)
Check whether a generic object is actually a guideline
Source: FontLab Proteus API documentation
isHint
instance-attribute
isHint: Any
bool
isHorizontal
isHorizontal(a: Any = ...) -> bool
bool isHorizontal([double a=1])
Returns True if the guideline's angle is within a degrees of horizontal (0°). A guideline at 0.3° counts as horizontal
Source: FontLab Proteus API documentation
isInUse
instance-attribute
isInUse: Any
bool
isMeasurementLine
instance-attribute
isMeasurementLine: Any
bool
isPassive
instance-attribute
isPassive: Any
bool
isShortGuideline
instance-attribute
isShortGuideline: Any
bool
True if this is a bounded (short, finite-length) guideline rather than an infinite one
Source: FontLab Proteus API documentation
isVertical
isVertical(a: Any = ...) -> bool
bool isVertical([double a=1])
Returns True if the guideline's angle is within a degrees of vertical (90°). The tolerance a defaults to 1°, so a guideline at 89.5° is still considered vertical
Source: FontLab Proteus API documentation
isVerticalQuarter
instance-attribute
isVerticalQuarter: Any
bool
True if the angle is exactly 90° or 270° — a perfectly vertical guideline. Useful for a quick check without the tolerance parameter that isVertical() allows
Source: FontLab Proteus API documentation
isZone
instance-attribute
isZone: Any
bool
length
instance-attribute
length: Any
double
The visible length of the guideline segment in font units. 0 means the line extends infinitely across the canvas. A nonzero value creates a short, bounded guide segment (useful as a local reference marker)
Source: FontLab Proteus API documentation
linef
instance-attribute
linef: Any
QLineF
The guideline as a Qt QLineF segment. Useful when you need to pass it to geometry calculations
Source: FontLab Proteus API documentation
markers
instance-attribute
markers: Any
list(flMarkerPoint)
A list of measurement markers attached to this guideline. Markers appear as tick marks that measure distances — for example, stem width or zone height. Iterate over them to read their positions
Source: FontLab Proteus API documentation
markersStructVersion
instance-attribute
markersStructVersion: Any
int
An integer that increments every time the markers list changes. Useful for cache invalidation: if this number changes since you last checked, the markers have been modified
Source: FontLab Proteus API documentation
offsetTo
offsetTo(arg0: QPointF, mode: int) -> QPointF
QPointF offsetTo(QPointF, uint mode)