[Bug 677208] Re: PIL font renderer cuts off descender of some TrueType fonts

Launchpad Bug Tracker 677208 at bugs.launchpad.net
Tue Oct 30 11:06:11 UTC 2012


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: python-imaging (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-imaging in Ubuntu.
https://bugs.launchpad.net/bugs/677208

Title:
  PIL font renderer cuts off descender of some TrueType fonts

Status in “python-imaging” package in Ubuntu:
  Confirmed

Bug description:
  Binary package hint: python-imaging

  #!/usr/bin/env python
  """Demonstrate a bug in Python Imaging Library.

  Summary: PIL font renderer cuts off descender of some TrueType fonts

  The FreeType font loader in the _imagingft component of
  python-imaging does not always render the entire glyph.

  Steps to reproduce:
  1. Download FinkHeavy.ttf from
     http://www.angelfire.com/stars5/tkcpics2/wildworld/#downloads
  2. Copy it to the .fonts folder in your home folder.
  3. Run this Python program.

  Expected result:
  The bottom of the 'g' is round, as it appears in other programs.

  Actual result:
  The bottom of the 'g' is flat; the bottom has been cut off.

  Unlike python-imaging, SDL_ttf does not have this problem.

  """
  from PIL import Image, ImageDraw, ImageFont
  import os

  fontname = os.path.expanduser('~/.fonts/FinkHeavy.ttf')
  im = Image.new('L', (256, 256))
  dc = ImageDraw.Draw(im)
  fh = ImageFont.truetype(fontname, 64)
  dc.text((62, 64), "Hg", 254, fh)
  im.show()

  ProblemType: Bug
  DistroRelease: Ubuntu 10.10
  Package: python-imaging 1.1.7-2
  ProcVersionSignature: Ubuntu 2.6.35-22.35-generic 2.6.35.4
  Uname: Linux 2.6.35-22-generic i686
  NonfreeKernelModules: wl
  Architecture: i386
  Date: Thu Nov 18 16:41:17 2010
  InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
  ProcEnviron:
   LANG=en_US.utf8
   SHELL=/bin/bash
  SourcePackage: python-imaging

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-imaging/+bug/677208/+subscriptions




More information about the foundations-bugs mailing list