Navigation

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

    michelangelo

    @michelangelo

    2
    Reputation
    23
    Posts
    654
    Profile views
    1
    Followers
    0
    Following
    Joined Last Online

    michelangelo Follow

    Best posts made by michelangelo

    • RE: Impossible typefaces?

      @MauriceMeilleur Hi Maurice, sorry I reply sooo late, but I missed this message. I just wanted to show you what I did at the end of the semester.

      http://nedkamburov.com/res/projects/TypeWeb/AmendFont/showcase.html

      Thank you, @frederik, because due to your suggestion, I went to look for some type in the library and found some pretty funky examples.

      Thank you, all the best,
      ned

      posted in Code snippets
      michelangelo
      michelangelo
    • Impossible typefaces?

      Hello masters of code,
      I am fairly new to Drawbot but I have been working on it with Just at KABK. I did this project http://nedkamburov.com/res/project/TypeCoding/ShowcaseDrawbot/website/showcase.html, which was really exciting but I decided it's finished and I need to move on.

      I want to create another font, maybe with some OpenType features (but that's for later). I was interested in 'impossible typeface'— fonts that are only possible through programming. Any suggestions? Maybe references?

      thank you, all the best,
      ned

      posted in Code snippets
      michelangelo
      michelangelo

    Latest posts made by michelangelo

    • RE: Set Rfont to some font and access its glyph methods

      @gferreira Thank you! That is much clearer now. I found that in my example I have a lot of transformations and somewhere it gets weird again, but on its own it works!

      Screenshot 2020-04-22 at 18.48.30.png

      posted in Code snippets
      michelangelo
      michelangelo
    • RE: Set Rfont to some font and access its glyph methods

      @gferreira That seems important! Thank you!
      @frederik No, I do not want to make my typesetter, definitely. Thanks for the heads up. What Gustavo explained is what I am talking about...

      This is exactly what I need. However, my font doesn't react normally to it... The same code with the same arguments, only different fonts:

      for char in TEXT:
          src.text(char, (0, 0), font='someFont', fontSize=FONTSIZE)
          drawPath(src)
      
          advance = textSize(char)[0] 
      

      Screenshot 2020-04-22 at 17.16.35.png Screenshot 2020-04-22 at 17.16.44.png

      But if I typeset it in another way, it works:

      font('someFont', fontSize=FONTSIZE)
      text(TEXT, (0, 0))
      

      Screenshot 2020-04-22 at 17.19.41.png

      That's why I am confused... šŸ˜‘

      posted in Code snippets
      michelangelo
      michelangelo
    • RE: Set Rfont to some font and access its glyph methods

      Thank you, @frederik. That's exactly what I was wondering! I am trying to access the side bearings but what is the method for that (leftMargin, rightMargin)?

      If I use the drawBot text():

      font('Helvetica', 200)
      txt = 'ABCW'
      text(txt, (0,0))
      

      The spacing is perfectly rendered from the font. How does drawBot know when to use the kerning pairs for [AA], [AW]?

      If I manipulate the characters one by one and then render them, how can I use the existing font bearings to maintain proper spacing?

      I end up with this kind of nonsense:

      def drawText(txt, x, y, fSize):
        for char in txt, range(len(txt))):
              aWidth = fSize * 0.6 * i        
              
              if char =="A":
                  aWidth += i * 40 # + (glyph.leftMargin?)
                  
              if char =="B":
                  aWidth += i * 36
      
              ...
      
              renderChar(char, x + aWidth, y, fSize)
      
      posted in Code snippets
      michelangelo
      michelangelo
    • Set Rfont to some font and access its glyph methods

      Hello guys,
      I was wondering how Rfont and RGlyph work? I can set a myFont.newGlyph(char) but I am missing something.

      from fontParts.world import RFont, RGlyph
      
      # create a font object
      myFont = RFont(showInterface=False)
      
      fontName = "LucidaGrande"
      
      char = 'A'
      glyph = myFont.newGlyph(char)
      print(glyph)
      

      I get, as expected:

      <RGlyph 'A' ('public.default') at 4470687248>

      but then the glyph is empty if I:

      print(glyph.isEmpty())


      Usually you would do

      glyph = CurrentGlyph()
      

      but I am working in drawBot. Can I just set this glyph to a typeface I specify and still get access to all the methods of a RGlyph() object?

      posted in Code snippets
      michelangelo
      michelangelo
    • RE: UI help

      Hello @frederik,
      thank you for sheding some light on the issue. Maybe I will try the DrawBot package.

      Sorry for the confusion about the example, I meant this which is from the official documentation of Vanilla. I also understand now that a print() command prints in a specified window (I guess) and not the console.

      Thanks! It is exciting to see all sliders and buttons šŸŽš šŸ”˜ šŸŽš

      posted in General Discussion
      michelangelo
      michelangelo
    • UI help

      Hello there,
      I have a question about some UI within drawbot. I used the standard Variable[] but it is not really working for my purpose.
      In short: I have a string ('SOME TEXT') that renders each letter, but there are multiple methods that can be chosen for each of them.
      Screenshot 2020-04-16 at 11.34.31.png
      Here, I am just hardcoding the dictionary 'options' for each character...


      If I use the default UI from Drawbot I can render the text
      Screenshot 2020-04-16 at 11.34.12.png
      but I also want to show under it, based on the string, a multiple choice for each letter:
      Screenshot 2020-04-16 at 11.33.50.png

      I saw that the vanilla library is meant for this, but what approach could I take to enter the string and based on it to render a dictionary which can be modified by the user? And btw these examples from RoboFont don't print anything, not sure if they work on my machine. No errors but I am not sure what I should do.

      Thanks a lot!

      posted in General Discussion
      michelangelo
      michelangelo
    • RE: Manipulating points

      Great, that makes sense. Is it also possible in DrawBot directly? I would like to animate it with other letters later.

      posted in General Discussion
      michelangelo
      michelangelo
    • RE: Manipulating points

      Hi @frederik, thanks, I got RoboFont now and labelled them, but how can I references them.

      What method could find the labelled points in an array of points?

      If I use:

      for points in srcShape.points:
          print(points)
      

      I get all points (x, y), but they have no 'label' attribute.

      posted in General Discussion
      michelangelo
      michelangelo
    • Manipulating points

      Hello guys,
      I want to try some point manipulation in DrawBot. I have used bezier paths before but it seems like it is very unclear how to start it all.

      In short I have a drawn font and I want to:

      • Load a letter or a string into Drawbot (or work directly in Glyphs)
      • Select the specific points I want to manipulate
      • Move them around while keeping the curve smooth

      Here I attach a gif of what I have in mind as the end result:

      h-stretch-demo.gif

      – Can I label specific points from Glyphs to access them easily later?
      – Perhaps there is already something similar asked in the forum but I didn't find it. Can you reference it here?

      thank you!

      posted in General Discussion
      michelangelo
      michelangelo