Skip to content

Instantly share code, notes, and snippets.

@twardoch
Created September 1, 2020 00:38
Show Gist options
  • Save twardoch/2757a9faef9335e2e2137d5e66054a01 to your computer and use it in GitHub Desktop.
Save twardoch/2757a9faef9335e2e2137d5e66054a01 to your computer and use it in GitHub Desktop.
Editing Glyph window text in FontLab 7 via Python
from fontgate import *
from fontlab import *
ws = flWorkspace.instance()
canvas = ws.getActiveCanvas()
textblocks = canvas.textBlocks()
symbols = textblocks[0].symbolList()
print symbols.string(True) # glyphtext representation
print symbols.symbols()
symbols.setString('A' + symbols.string(True) + ' A')
flItems.requestContent(symbols, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment