Navigation

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

    renanrosatti

    @renanrosatti

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

    renanrosatti Follow

    Best posts made by renanrosatti

    This user hasn't posted anything yet.

    Latest posts made by renanrosatti

    • RE: Appending a glyph to a FormattedString does not work well when fontVariations are set

      Wow thanks a lot for such a fast fix!
      That is a lifesaver function for glyph proofing 🙂

      posted in Bugs
      renanrosatti
      renanrosatti
    • Appending a glyph to a FormattedString does not work well when fontVariations are set

      I am having problems with a drawBot script to proof all glyphs in a variable font.

      I am adding all glyphs from the list generated by listFontGlyphNames() to a FormattedString with appendGlyph, but it stops working whenever I set any value to fontVariations. (Exactly the same behavior reported here https://github.com/typemytype/drawbot/issues/402, so I discarded any problems with the font I'm using)

      I was wondering if there are any workarounds to this problem or if this is still impossible at this time.

      Here's the code I'm using:

      pageSize = 'A4'
      
      fPath = '/Users/renan/Desktop/ABCDiatypePlusVariable.ttf'
      
      border = 20
      
      class fontInstance:
          def __init__(self, name, axisValues):
              self.axisValues = axisValues
              self.name = name
      
      instanceList = listNamedInstances(fPath)
      instances = []
      
      for i in instanceList:
          instanceName = i
          axisValues = instanceList[i]
          instance = fontInstance(instanceName, axisValues)
          instances.append(instance)
      
      txt = FormattedString()
      txt.font(fPath)
      txt.fontSize(20)
      
      glyphNameList = txt.listFontGlyphNames()
      
      for g in glyphNameList:
          for i in instances:
              txt.fontVariations(**i.axisValues)
              txt.appendGlyph(g)
          txt.append('\n')
      
      while txt:
          newPage(pageSize)
          txt = textBox(txt, (border, border, width() - border*2, height() - border*2))     
      
      
      posted in Bugs
      renanrosatti
      renanrosatti