I tried to install this module via pip of all the python versions on my computer (2.7.10-used by DrawBot Plugin and Glyphs, 2.7.16, 3.6, and 3.7). The module can be imported in the standalone DrawBot.
Can you post a sample script?
Here is the script to display the overlays of Khmer base letters with their ligature forms. Because some ligature forms need to be decomposed and have a different shape, and I need to inspect if I forgot to update the ligature forms after I edited the base letters.
I’ll send you the .glyphs file in the message.
from GlyphsApp import *
font = Glyphs.font
masterId = font.selectedFontMaster.id
chars = ["ka", "kha", "ko", "kho", "ngo", "ca", "cha", "co", "cho", "nyo", "da", "ttha", "do", "ttho", "nno", "ta", "tha", "to", "tho", "no", "ba", "pha", "po", "pho", "mo", "yo", "ro", "lo", "vo", "sha", "sso", "sa", "ha", "la", "qa"]
def printAllPaths(cName):
glyph = font.glyphs[cName + '-khmer'].layers[masterId]
gPath = BezierPath(glyph.bezierPath)
if (glyph.components):
for component in glyph.components:
cPath = BezierPath(component.bezierPath)
gPath.appendPath(cPath)
gPath.removeOverlap()
drawPath(gPath)
for c in chars:
newPage(1200, 1200)
translate(30, 400)
fill(1, 0, 0, 0.2)
stroke(1, 0, 0, 0.5)
scale(0.7)
printAllPaths(c)
printAllPaths(c + '_aaSign')
printAllPaths(c + '_auSign')
fontName = font.familyName.replace(' ', '')
saveImage("~/Desktop/Proofing-Overlay-"+fontName+".pdf")
If you put the module into /Library/Python/2.7/site-packages/
it should work. If you installed it somewhere else, just copy it there. To check where the standalone drawbot gets the module from, run this code:
import booleanOperations
print(booleanOperations)
It might be that the version you get now is python3 already. So you need to get an older version that supports python2, still.
Thanks, Georg. I don’t know since when I messed up my python installations, but I figured it out now.