Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Solved
    • Unsolved
    • Search
    1. Home
    2. Hugo Jourdan
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by Hugo Jourdan

    • Hugo Jourdan

      Drawbot and PIL
      General Discussion • • Hugo Jourdan  

      2
      0
      Votes
      2
      Posts
      11
      Views

      frederik

      yes you can! in the DrawBot code base test we use: rect(10, 10, 100, 100) pilObject = saveImage("PIL") you need to have PIL installed yourself (the drawBot forum is almost closed, I keep it as read only, to much spam, sorry, move to drawBot channel in the RoboFont discord)
    • Hugo Jourdan

      Auto-Resize FormattedString
      General Discussion • • Hugo Jourdan  

      3
      0
      Votes
      3
      Posts
      15
      Views

      Hugo Jourdan

      I hadn't thought about this solution! Thanks, @frederik! newPage("A4Landscape") box_w, box_h = width()-100, height()-100 box_x, box_y = 50, 50 txt = FormattedString() txt.fontSize(90) txt.align("center") txt.append("LOOOOOOOOOOOOOOONG STRING\n"*30) txt_w = textSize(txt)[0] txt_h = textSize(txt)[1] width_ratio = box_w/txt_w height_ratio = box_h/txt_h sf = min(width_ratio , height_ratio, 1) scale(sf) textBox(txt, (box_x/sf, box_y/sf, box_w/sf, box_h/sf))
    • Hugo Jourdan

      Snippet : drawOnCurvePoints
      Code snippets • • Hugo Jourdan  

      1
      0
      Votes
      1
      Posts
      23
      Views

      No one has replied

    • Hugo Jourdan

      listNamedInstances is broken ?
      General Discussion • • Hugo Jourdan  

      3
      0
      Votes
      3
      Posts
      20
      Views

      frederik

      thanks for the issue --> https://github.com/typemytype/drawbot/issues/495
    • Hugo Jourdan

      Mute DrawBot warning ?
      General Discussion • • Hugo Jourdan  

      4
      0
      Votes
      4
      Posts
      14
      Views

      Hugo Jourdan

      I'm looking to not print : *** DrawBot warning: [...] ***
    • Hugo Jourdan

      BezierPath offset problem.
      General Discussion • • Hugo Jourdan  

      4
      0
      Votes
      4
      Posts
      20
      Views

      Hugo Jourdan

      @frederik Thanks for this clarification !
    • Hugo Jourdan

      DrawBot Auto-completion Snippet
      Code snippets • • Hugo Jourdan  

      3
      0
      Votes
      3
      Posts
      14
      Views

      Hugo Jourdan

      I just updated the repo with separated snippets for SublimeText.
    • Hugo Jourdan

      Python Update ?
      General Discussion • • Hugo Jourdan  

      2
      0
      Votes
      2
      Posts
      19
      Views

      frederik

      no, you can not.. but DrawBot exists also as a module where you can use your own python. see https://github.com/typemytype/drawbot#using-drawbot-as-a-python-module
    • Hugo Jourdan

      Rounded Rectangle
      Code snippets • • Hugo Jourdan  

      2
      1
      Votes
      2
      Posts
      27
      Views

      frederik

      cool way to make a rounded rect! there are already a roundedRect example in the repository: see https://github.com/typemytype/drawbot/blob/master/examples/roundedRect.py I would encourage you to make a python package out of your helper tools that you import when you needed it... # a separate file with the name "roundedRect.py" def roundedRect(...): # draw your stuff here # an other file in the same directory # name of the file/module name of the function from roundedRect import roundedRect # call it roundedRect(...) hope this makes sense!
    • Hugo Jourdan

      Using tkinter in DrawBot
      General Discussion • • Hugo Jourdan  

      3
      0
      Votes
      3
      Posts
      21
      Views

      Hugo Jourdan

      I didn't know that option, thanks a lot frederik !
    • Hugo Jourdan

      How to draw all glyphs from .ttf ?
      General Discussion • • Hugo Jourdan  

      3
      0
      Votes
      3
      Posts
      24
      Views

      frederik

      use: glyphNames = ["a", "aring", "agrave"] txt = FormattedString() txt.appendGlyph(*glyphNames) textBox(txt, (10, 10, 400, 400)) see https://www.drawbot.com/content/text/formattedString.html#drawBot.context.baseContext.FormattedString.appendGlyph
    • Hugo Jourdan

      How to set x,y position for a BezierPath ?
      General Discussion • • Hugo Jourdan  

      2
      0
      Votes
      2
      Posts
      26
      Views

      frederik

      I dont know glyhps but I would encourage you to use a BezierPath object instead see https://www.drawbot.com/content/shapes/bezierPath.html#drawBot.context.baseContext.BezierPath.translate
    • Hugo Jourdan

      Tracking for txt variable doest'n work
      General Discussion • • Hugo Jourdan  

      4
      0
      Votes
      4
      Posts
      19
      Views

      Hugo Jourdan

      Thanks for your help! I don't know what was wrong in my code, but if yours everything is working !