@frederik Got it, thanks.
I just knew someday my print()s would come!
Best posts made by Craig
Latest posts made by Craig
where does print go?
This was unexpected: If I run this (taken pretty directly from vanilla documentation)
from vanilla import * class ButtonDemo(object): def __init__(self): self.w = Window((100, 40)) self.w.button = Button((10, 10, -10, 20), "A Button", callback=self.buttonCallback) self.w.open() def buttonCallback(self, sender): print ("Button callback") ButtonDemo() print ("Print statement")
in the Glyphs.app macro window, all works fine. If I run it in the Drawbot Glyphs plugin window, the “Print statement” appears in the Drawbot console but the “Button callback” appears in the Glyphs console! If I run it in the standalone Drawbot app (which is where I was trying to develop my script) I see “Print statement” in its console, and “Button callback” is nowhere I can see.
Why are some print statements working in the output window and some not? And are they somewhere else I could monitor?
specify variable font settings
What is the proper way to specify variable font settings when appending text to a formatted string? I get how to alter single-setting attributes like size and alignment, but how do I specify I want the last text in this string to be at wght 100? (There are two axes in this variable font, CONT and wght.)
txt = FormattedString() txt.append(topText.text, font=cards[example].font, fontSize=130, fill=0, align="center") print(cards[example].label, fontLeading()) txt += "\n" txt.append(cards[example].label, font=fontName, fontSize=24, fill=0, align="right", tailIndent=-(width()/5)) textBox(txt, (0, 0, width(), height()*.85))