Sure enough, that seems to have been the problem. A new font file with internal settings for opsz that increase rather than decrease with point size seems to now respond in Drawbot as expected.
Craig
@Craig
Best posts made by Craig
Latest posts made by Craig
-
RE: Accessing opsz fontVariation
-
RE: Accessing opsz fontVariation
Ah wait, I've found the font file also doesn't work in Axis Praxis, and I think it may be because I started with an opsz scale that went in the wrong direction (I based in on stem thickness which is inverse to point size). I think that may be what's screwing the font up in multiple applications. Will see if that can be fixed.
-
RE: Accessing opsz fontVariation
@frederik Happy to, is there a DM function on this board or an email address I should use? Thanks.
-
RE: Accessing opsz fontVariation
I'm on Big Sur 11.6.
Seems to work with Source Serif Variable, but not with my own font design. Uh oh. There isn't some signal within the font spec that would allow changing the setting or force the linkage to size, is there? It does seem to be accessing the optical sizes when I set at different sizes, but not accepting direct settings of them.
-
Accessing opsz fontVariation
I can't seem to access differing optical size settings in a variable font. This script, based on the documentation (for wght), nets two identical lines.
size(1000, 500) # pick a font font("/Library/Application Support/Adobe/Fonts/FeneonSingleVF.ttf") # pick a font size fontSize(200) # list all axis from the current font for axis, data in listFontVariations().items(): print((axis, data)) # pick a variation from the current font fontVariations(opsz=14) # draw text!! text("Hello Q", (100, 100)) # pick a variation from the current font fontVariations(opsz=66) # draw text!! text("Hello Q", (100, 300))
Console correctly reports
('opsz', {'name': 'Optical size', 'minValue': 14.0, 'maxValue': 66.0, 'defaultValue': 66.0})
But the display doesn't show the lines at different optical sizes. Does Drawbot tie opsz to font size, preventing forcing an overriding opsz setting?
-
RE: where does print go?
@frederik Got it, thanks.
I just knew someday my print()s would come! -
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? -
RE: Animate a word with an apostrophe
It would also probably work to use double quotes as your delimiters. I think
text("d'etude", (x, y))
works but
text('d'etude', (x, y))
won't.
-
RE: Animate a word with an apostrophe
I would try typing a backslash \ before the apostrophe. I think that's the escape character Python uses to indicate the ensuing character is still part of the string.