fontlab · declarations 001
AcceptChanges
AcceptChanges(clearChangedState: Any = ...) -> Any
AcceptChanges([bool clearChangedState = true])
fontlab.AcceptChanges()
fontlab.AcceptChanges(False)
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()
Returns: fgPackages list
Source: FontLab Proteus API documentation
ApplicationPath
ApplicationPath(*args: Any, **kwargs: Any) -> Any
Return path to FontLab main application
path = fontlab.ApplicationPath()
Returns: str
Source: FontLab Proteus API documentation
BinaryFormatVersion
module-attribute
BinaryFormatVersion: dict
Keys:
BinaryFormatVersion_2015_1BinaryFormatVersion_2015_2BinaryFormatCurrentVersion
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()
Returns: int
Source: FontLab Proteus API documentation
CreatePanel
CreatePanel(*args: Any, **kwargs: Any) -> Any
Create YPanelWidget instance
panel = fontlab.CreatePanel(100, "My Panel")
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()
Returns: fgFont or None
Source: FontLab Proteus API documentation
CurrentGlyph
CurrentGlyph(*args: Any, **kwargs: Any) -> Any
Get currently active glyph
glyph = fontlab.CurrentGlyph()
Returns: fgGlyph (DataOwner) or None
Source: FontLab Proteus API documentation
DecoratorOrder
module-attribute
DecoratorOrder: dict
Keys:
OverOwnerUnderOwner
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 modeemEditOutline: Edit outline modeemEditMetrics: Edit metrics modeemEditText: Edit text modeemEditMetricsOrOutlines: 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)")
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:")
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")
output (Python output panel text).
Parameters: name (str)
Returns: Property value or None
Source: FontLab Proteus API documentation
GlyphInfoState
module-attribute
GlyphInfoState: dict
Keys:
gstNoStategstSelectedgstActivegstActiveSelectedgstAll
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:
HintingPSHintingTT
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:
LightSwitchedOffLightAllNodesLightOnActiveGlyphOnlyLightOnlyArea
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()
Returns: MainWindow instance
Source: FontLab Proteus API documentation
ObjectFlag
module-attribute
ObjectFlag: dict
Keys:
ofReleasedofChangedofIgnoreChangesofIgnoreofPassiveofSlowUpdateofAnchoredofHistory
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()
Returns: YPanelManager instance
Source: FontLab Proteus API documentation
SelectionMode
module-attribute
SelectionMode: dict
Keys:
AnyNodeSelected: Any node selectedAllContourSelected: 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)
Parameters: fgFont – font to activate
Source: FontLab Proteus API documentation
SetCurrentGlyph
SetCurrentGlyph(*args: Any, **kwargs: Any) -> Any
Set active glyph
fontlab.SetCurrentGlyph(fg_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")
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:
cloneContourscloneAnchorscloneCompositecloneShapeGuidelinescloneShapePinPointscloneShapeTransformcloneAll
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: UndefinedShapeContours: Outline contoursShapeImage: Bitmap imageShapeSticker: 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:
AngleAbsoluteAngleVector
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: UndefinedgsPageGuideline: Page guidelinegsGlyphGuideline: Glyph guidelinegsCustomFontGuideline: Custom font guidelinegsBasicFontGuideline: Basic font guidelinegsShapeGuideline: Shape guidelinegsSmartPosition: Smart positiongsSmartTangent: Smart tangentgsSmartDirection: Smart directiongsSmartBounds: Smart boundsgsSmartGrid: Smart gridgsSmartStem: Smart stemgsGlyphMask: Glyph maskgsSmartMask: 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")
Parameters: text (str)
Returns: Result string
Source: FontLab Proteus API documentation
TextBlockFormat
module-attribute
TextBlockFormat: dict
Keys:
tbfTexttbfFrametbfTable
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:
tfNoControltfToptfVCentertfBottomtfLefttfHCentertfRighttfTopLefttfTopHCentertfTopRighttfBottomLefttfBottomHCentertfBottomRighttfVCenterLefttfVCenterRighttfCentertfBodytfRotate
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
Parameters: Optional – fgGlyph, fgFont, or flObject-derived. If omitted, updates all changed objects.
Source: FontLab Proteus API documentation
UpdateActiveCanvas
UpdateActiveCanvas() -> Any
UpdateActiveCanvas()
fontlab.UpdateActiveCanvas()
Source: FontLab Proteus API documentation
UpdateAll
UpdateAll() -> Any
UpdateAll()
fontlab.UpdateAll()
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(...))
Parameters: Four numbers (x0, y0, x1, y1) or a QRectF / QRect.
Source: FontLab Proteus API documentation
ViewPointAlignment
module-attribute
ViewPointAlignment: dict
Keys:
vpCentervpTopLeft
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:
BaseToolStandartToolShapeToolNodesToolPenToolDrawToolKnifeToolStaplerToolGuidelineToolTextToolBrushToolEllipseToolRectToolAnchoringNodesToolAnchoringShapesToolTransformToolMagicToolOptimizerToolBucketToolRotateToolScaleToolSlantToolSmartPenTool
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