Navigation

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

    chrisjansky

    @chrisjansky

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

    chrisjansky Follow

    Best posts made by chrisjansky

    This user hasn't posted anything yet.

    Latest posts made by chrisjansky

    • RE: Clip off text in textBox

      @frederik Works beautifully, thank you!

      posted in General Discussion
      chrisjansky
      chrisjansky
    • RE: Clip off text in textBox

      Yes, that would be a workaround. Ideally I‘d like to show all fully visible glyphs and hide all remaining that don‘t fit within canvas bounds, like this:

      Screenshot 2022-08-08 at 12.46.27.png

      I was just wondering if there‘s something like hyphenation() that switches from words to glyphs if you know what I mean. 😇

      posted in General Discussion
      chrisjansky
      chrisjansky
    • Clip off text in textBox

      Hello,

      Started playing around in Drawbot and loving it so far. I am wondering – is there a way to clip off text inside a textBox on a glyph-by-glyph basis?

      I understand dictionary-based hyphenation takes priority, so that‘s what happens:

      Screenshot 2022-08-06 at 10.11.30.png

      What I am after is more like:
      AaBbCc 2
      AaBbCc 22
      AaBbCc 225
      AaBbCc 225p
      AaBbCc 225pt

      And not:
      AaBbCc
      AaBbCc
      AaBbCc 225
      AaBbCc 225pt

      My code so far:

      newPage(1500,1500)
      
      lh = 10
      
      factor = 1
      for i in range(17):
          fs = 1 * (i + 1) * factor
          fontSize(fs)
          lineHeight(fs * 0.8)
          textBox(f"AaBbCc {round(fs)} pt", (10, lh, width(), fs))
          lh += fontLineHeight() + 7
          factor += 1
      

      Hopefully makes sense :—) Thanks for any pointers!

      posted in General Discussion
      chrisjansky
      chrisjansky