@frederik Thanks (and thanks for opening this over in the GitHub repo). I'll give it a try later today. Speed isn't a factor in this case because I'm generating static diagrams.
further discussion here https://github.com/typemytype/drawbot/issues/274
also read why we dont allow embedding fonts: https://github.com/typemytype/drawbot/issues/23
use language('nl') to switch between languages, as DrawBot is typesetting environment...
font('/Users/frederik/Downloads/source-code-pro-2.030R-ro-1.050R-it/OTF/SourceCodePro-Regular.otf')
char = "б"
fontSize(200)
text(char, (10, 100))
language("sr")
text(char, (150, 100))
@gferreira said in Drawbot for other Operating Systems? Linux? Windows?:
hello @dywen,
DrawBot is macOS-only because it’s written on top of the macOS graphics layer.
there have been some attempts at creating drawbots for other platforms using Cairo as the graphics layer (for example ShoeBot and Cairo DrawBot). not really sure how well these work.
you might have more luck with Even, Processing, or Paper.js.
hope this helps!
Ok, thanks!
Processing is already being taught at the school. I'll look into the other projects - already knowing one of the developers of Shoebot.
I asked the question after reading about this nice tutorial sequence, based on Drawbot:
http://pythonfordesigners.com/
Enjoy!
(I won't ditch my Linux ;-))
@frederik Stupid beginner question: where would I find the existing code on my machine that you've fixed here? I want to manually edit the file to take advantage of your improvement until you push the next version of DB …
You can pass an ImageObject to imagePixelColor():
im = ImageObject()
with im:
fill(1, 0, 0)
rect(100, 100, 200, 200)
print(imagePixelColor(im, (150, 140)))