Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#17 piddlePIL-helvetica ascent/descent wrong

open
nobody
None
5
2000-11-30
2000-11-30
No

Hi,

I've found yet another piddlePIL bug. This time it the helvetica 8pt
font that's giving me a little trouble. It seems that either its ascent
or descent are wrong. The following sample code draws several strings in
different sizes and draws a line where the baseline is. The smalles text
is clearly placed too low:

import piddlePIL, piddle

canvas = piddlePIL.PILCanvas(size = (100, 100))

x = 5
y = 20
face = 'helvetica'
for size in (8, 10, 12, 18):
font = piddle.Font(face = face, size = size)
canvas.drawString('Der Fluegelflagel gaustert', x, y, font = font)
canvas.drawLine(x, y, x + 90, y)
y = y + 20

canvas.getImage().save('bug.ppm')

Bernhard

Discussion

  • michal wallace
    michal wallace
    2005-09-25

    Logged In: YES
    user_id=1971

    Next action:

    duplicate the bug with current piddle/sping