Skip to content

fontlab · declarations 001

Back to fontlab

AcceptChanges

AcceptChanges(clearChangedState: Any = ...) -> Any

AcceptChanges([bool clearChangedState = true])

fontlab.AcceptChanges()
fontlab.AcceptChanges(False)
Accept pending changes.

Parameters: clearChangedState (bool, default True)

Source: FontLab Proteus API documentation

AllFonts

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

Get a list of currently opened fonts

packages = fontlab.AllFonts()
Get a list of currently opened fonts (fgPackages).

Returns: fgPackages list

Source: FontLab Proteus API documentation

ApplicationPath

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

Return path to FontLab main application

path = fontlab.ApplicationPath()
Return path to the FontLab main application directory.

Returns: str

Source: FontLab Proteus API documentation

BinaryFormatVersion module-attribute

BinaryFormatVersion: dict

Keys:

  • BinaryFormatVersion_2015_1
  • BinaryFormatVersion_2015_2
  • BinaryFormatCurrentVersion

Source: FontLab Proteus API documentation

Supplemental documentation: Binary file format version identifiers, including the current version.

Source: FontLab Proteus API documentation key list for this dict

BuilderFeatures module-attribute

BuilderFeatures: dict

Keys:

  • bfSmartAngle

Source: FontLab Proteus API documentation

Supplemental documentation: Builder feature flags; the documented key is bfSmartAngle.

Source: FontLab Proteus API documentation key list for this dict

CountFonts

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

Return number of currently opened fonts

n = fontlab.CountFonts()
Return the number of currently opened fonts.

Returns: int

Source: FontLab Proteus API documentation

CreatePanel

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

Create YPanelWidget instance

panel = fontlab.CreatePanel(100, "My Panel")
Create YPanelWidget.

Parameters: - id (int) - title (str, optional) - resizePolicy (ResizePolicy, optional) - parent (QWidget, optional)

Returns: YPanelWidget

Throws: TypeError if args invalid

Source: FontLab Proteus API documentation

CurrentFont

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

Get currently active font

font = fontlab.CurrentFont()
Get the currently active font.

Returns: fgFont or None

Source: FontLab Proteus API documentation

CurrentGlyph

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

Get currently active glyph

glyph = fontlab.CurrentGlyph()
Get the currently active glyph.

Returns: fgGlyph (DataOwner) or None

Source: FontLab Proteus API documentation

DecoratorOrder module-attribute

DecoratorOrder: dict

Keys:

  • OverOwner
  • UnderOwner

Source: FontLab Proteus API documentation

Supplemental documentation: Drawing order of a decorator relative to its owner: over or under.

Source: FontLab Proteus API documentation key list for this dict

EditMode module-attribute

EditMode: dict

Keys:

  • emPreviewText: Preview text mode
  • emEditOutline: Edit outline mode
  • emEditMetrics: Edit metrics mode
  • emEditText: Edit text mode
  • emEditMetricsOrOutlines: Edit metrics or outlines

Source: FontLab Proteus API documentation

Supplemental documentation: Glyph window editing modes: preview text, edit outline, edit metrics, edit text, and edit metrics or outlines.

Source: FontLab Proteus API documentation key list for this dict

GetFileName

GetFileName(open_save: Any, extension: Any, filename: Any, filters: Any) -> Any

GetFileName(open_save, string extension, string filename, string filters) - opens the file dialog. open_save = 1 for file open dialog

path = fontlab.GetFileName(1, ".vfc", "", "FontLab (*.vfc)")
Open file dialog.

Parameters: - open_save – 1 for open, 0 for save - extension – default extension - filename – initial path/filename - filters – filter string

Returns: Selected path or empty string

Source: FontLab Proteus API documentation

GetPathName

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

GetPathName(String title, ...) - allows to select folder

path = fontlab.GetPathName("Browse for folder", "Select folder:")
Open folder selection dialog.

Parameters: title, prompt (strings)

Returns: Selected folder path or empty string

Source: FontLab Proteus API documentation

GetProperty

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

Get FL properties (keywords: output, ...)

output_text = fontlab.GetProperty("output")
Get FL properties. Known: output (Python output panel text).

Parameters: name (str)

Returns: Property value or None

Source: FontLab Proteus API documentation

GlyphInfoState module-attribute

GlyphInfoState: dict

Keys:

  • gstNoState
  • gstSelected
  • gstActive
  • gstActiveSelected
  • gstAll

Source: FontLab Proteus API documentation

Supplemental documentation: Glyph state flags: no state, selected, active, active and selected, and all.

Source: FontLab Proteus API documentation key list for this dict

HintingDataType module-attribute

HintingDataType: dict

Keys:

  • HintingPS
  • HintingTT

Source: FontLab Proteus API documentation

Supplemental documentation: Hinting data kinds: PostScript or TrueType.

Source: FontLab Proteus API documentation key list for this dict

LightNodesMode module-attribute

LightNodesMode: dict

Keys:

  • LightSwitchedOff
  • LightAllNodes
  • LightOnActiveGlyphOnly
  • LightOnlyArea

Source: FontLab Proteus API documentation

Supplemental documentation: Node highlighting modes: off, all nodes, active glyph only, or an area only.

Source: FontLab Proteus API documentation key list for this dict

MainWindow

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

Get MainWindow object

mw = fontlab.MainWindow()
Get MainWindow QObject.

Returns: MainWindow instance

Source: FontLab Proteus API documentation

ObjectFlag module-attribute

ObjectFlag: dict

Keys:

  • ofReleased
  • ofChanged
  • ofIgnoreChanges
  • ofIgnore
  • ofPassive
  • ofSlowUpdate
  • ofAnchored
  • ofHistory

Source: FontLab Proteus API documentation

Supplemental documentation: Object state flags such as released, changed, ignore changes, passive, slow update, anchored and history.

Source: FontLab Proteus API documentation key list for this dict

PanelManager

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

Get YPanelManager object

pm = fontlab.PanelManager()
Get YPanelManager.

Returns: YPanelManager instance

Source: FontLab Proteus API documentation

SelectionMode module-attribute

SelectionMode: dict

Keys:

  • AnyNodeSelected: Any node selected
  • AllContourSelected: All nodes selected (full contour)

Source: FontLab Proteus API documentation

Supplemental documentation: Node selection tests: any node selected, or all nodes of the contour selected.

Source: FontLab Proteus API documentation key list for this dict

SetCurrentFont

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

Set active font

fontlab.SetCurrentFont(fg_font)
Set the active font.

Parameters: fgFont – font to activate

Source: FontLab Proteus API documentation

SetCurrentGlyph

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

Set active glyph

fontlab.SetCurrentGlyph(fg_glyph)
Set the active glyph.

Parameters: fgGlyph – glyph (DataOwner) to activate

Source: FontLab Proteus API documentation

SetProperty

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

Set FL properties (keywords: output, ...)

fontlab.SetProperty("output", "Hello")
Set FL properties. Known: output (sets Python output panel text).

Parameters: name (str), value

Returns: 0 on success, -1 on failure

Source: FontLab Proteus API documentation

ShapeCloneInfo module-attribute

ShapeCloneInfo: dict

Keys:

  • cloneContours
  • cloneAnchors
  • cloneComposite
  • cloneShapeGuidelines
  • cloneShapePinPoints
  • cloneShapeTransform
  • cloneAll

Source: FontLab Proteus API documentation

Supplemental documentation: Flags choosing which shape parts to clone: contours, anchors, composite, guidelines, pin points, transform or all.

Source: FontLab Proteus API documentation key list for this dict

ShapeType module-attribute

ShapeType: dict

Keys:

  • ShapeUndefined: Undefined
  • ShapeContours: Outline contours
  • ShapeImage: Bitmap image
  • ShapeSticker: Sticker/reference
  • "AnyShape\t"

Source: FontLab Proteus API documentation

Supplemental documentation: Shape kinds: undefined, outline contours, bitmap image, sticker, or any shape.

Source: FontLab Proteus API documentation key list for this dict

SnapAngleMode module-attribute

SnapAngleMode: dict

Keys:

  • AngleAbsolute
  • AngleVector

Source: FontLab Proteus API documentation

Supplemental documentation: Angle snapping modes: absolute or vector.

Source: FontLab Proteus API documentation key list for this dict

SnapObjectsStyle module-attribute

SnapObjectsStyle: dict

Keys:

  • gsUndefined: Undefined
  • gsPageGuideline: Page guideline
  • gsGlyphGuideline: Glyph guideline
  • gsCustomFontGuideline: Custom font guideline
  • gsBasicFontGuideline: Basic font guideline
  • gsShapeGuideline: Shape guideline
  • gsSmartPosition: Smart position
  • gsSmartTangent: Smart tangent
  • gsSmartDirection: Smart direction
  • gsSmartBounds: Smart bounds
  • gsSmartGrid: Smart grid
  • gsSmartStem: Smart stem
  • gsGlyphMask: Glyph mask
  • gsSmartMask: Smart mask

Source: FontLab Proteus API documentation

Supplemental documentation: Kinds of snap target, such as page, glyph, font and shape guidelines and smart positions.

Source: FontLab Proteus API documentation key list for this dict

TestBuilder

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

Test Glyph Builder

result = fontlab.TestBuilder("test")
Test Glyph Builder with given text.

Parameters: text (str)

Returns: Result string

Source: FontLab Proteus API documentation

TextBlockFormat module-attribute

TextBlockFormat: dict

Keys:

  • tbfText
  • tbfFrame
  • tbfTable

Source: FontLab Proteus API documentation

Supplemental documentation: Text block formats: text, frame or table.

Source: FontLab Proteus API documentation key list for this dict

TransformFrameControls module-attribute

TransformFrameControls: dict

Keys:

  • tfNoControl
  • tfTop
  • tfVCenter
  • tfBottom
  • tfLeft
  • tfHCenter
  • tfRight
  • tfTopLeft
  • tfTopHCenter
  • tfTopRight
  • tfBottomLeft
  • tfBottomHCenter
  • tfBottomRight
  • tfVCenterLeft
  • tfVCenterRight
  • tfCenter
  • tfBody
  • tfRotate

Source: FontLab Proteus API documentation

Supplemental documentation: Transform frame handles: edges, corners, centers, body and rotate.

Source: FontLab Proteus API documentation key list for this dict

Update

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

Update object and it's visual representations. Without argument update all changed objects. Update([fgGlyph|fgFont|flObject object])

fontlab.Update()                    # update all changed objects
fontlab.Update(fg_glyph)            # update specific glyph
fontlab.Update(fg_font)             # update specific font
fontlab.Update(fl_object)           # update flObject-derived
Update object(s) and their visual representations.

Parameters: Optional – fgGlyph, fgFont, or flObject-derived. If omitted, updates all changed objects.

Source: FontLab Proteus API documentation

UpdateActiveCanvas

UpdateActiveCanvas() -> Any

UpdateActiveCanvas()

fontlab.UpdateActiveCanvas()
Refresh the active canvas.

Source: FontLab Proteus API documentation

UpdateAll

UpdateAll() -> Any

UpdateAll()

fontlab.UpdateAll()
Full preview update.

Source: FontLab Proteus API documentation

UpdateGlyphRect

UpdateGlyphRect(x0: Any, y0: Any, x1: Any, y1: Any) -> Any

UpdateGlyphRect(x0, y0, x1, y1)

fontlab.UpdateGlyphRect(0, 0, 500, 600)
fontlab.UpdateGlyphRect(QRectF(...))
Update glyph rect and trigger preview.

Parameters: Four numbers (x0, y0, x1, y1) or a QRectF / QRect.

Source: FontLab Proteus API documentation

ViewPointAlignment module-attribute

ViewPointAlignment: dict

Keys:

  • vpCenter
  • vpTopLeft

Source: FontLab Proteus API documentation

Supplemental documentation: View point alignment: center or top left.

Source: FontLab Proteus API documentation key list for this dict

flTools module-attribute

flTools: dict

Keys:

  • BaseTool
  • StandartTool
  • ShapeTool
  • NodesTool
  • PenTool
  • DrawTool
  • KnifeTool
  • StaplerTool
  • GuidelineTool
  • TextTool
  • BrushTool
  • EllipseTool
  • RectTool
  • AnchoringNodesTool
  • AnchoringShapesTool
  • TransformTool
  • MagicTool
  • OptimizerTool
  • BucketTool
  • RotateTool
  • ScaleTool
  • SlantTool
  • SmartPenTool

Source: FontLab Proteus API documentation

Supplemental documentation: Names of the FontLab editing tools, such as the pen, knife, text and transform tools.

Source: FontLab Proteus API documentation key list for this dict