omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Pillow seems to break TrueType loading

    Pythonista
    pillow beta
    3
    6
    3879
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ccc
      ccc last edited by ccc

      @omz, It is awesome to have Pillow in build 160033!! Congratulations on this major step forward!

      from PIL import ImageFont
      # each of the remaining lines fail
      font = ImageFont.truetype('<System>', 15)
      font = ImageFont.truetype("Arial", 15)
      font = ImageFont.truetype('Helvetica', 20)
      
      1 Reply Last reply Reply Quote 1
      • Webmaster4o
        Webmaster4o last edited by

        Was just about to post this issue.

        1 Reply Last reply Reply Quote 0
        • Webmaster4o
          Webmaster4o last edited by

          Posted anyway, because I wanted to post the error it was throwing and I didn't want to delete my already-written post.

          1 Reply Last reply Reply Quote 0
          • omz
            omz last edited by

            I forgot that I had patched PIL to make that work, should be easy to use the same technique in Pillow.

            1 Reply Last reply Reply Quote 0
            • Webmaster4o
              Webmaster4o last edited by

              Great! looking forward to it.

              1 Reply Last reply Reply Quote 0
              • omz
                omz last edited by

                Quick workaround:

                import _font_cache
                font_name = 'Helvetica'
                font = ImageFont.truetype(_font_cache.get_font_path(font_name))
                
                1 Reply Last reply Reply Quote 3
                • First post
                  Last post
                Powered by NodeBB Forums | Contributors