Share

piddle

Tracker: Bugs

5 piddlePIL-doesn't support non-ascii characters - ID: 225242
Last Update: Comment added ( sabren )

drawString and stringWidth don't support non-ASCII characters. The
pilfonts apparently contain everything from ISO-Latin-1, but the
metrics.dat file doesn't. Would it be possible to extend it? How is
it generated anyway?

sample program:

import piddlePIL

canvas = piddlePIL.PILCanvas(size = (100, 100))
canvas.drawString("\0344", 40, 40) # draw an a umlaut
(ä)
canvas.save("ppm")

exception:

Traceback (innermost last):
File "bug-nonascii.py", line 4, in ?
canvas.drawString("\0344", 40, 40) # draw an a umlaut
(ä)
File "../cvs/piddle/piddlePIL.py", line 321, in drawString
tempsize = self.stringWidth(s, font) * 1.2
File "../cvs/piddle/piddlePIL.py", line 172, in stringWidth
out = out + map[c]
KeyError:


Christopher Lee-Messer ( clee ) - 2000-12-10 16:56

5

Open

None

Christopher Lee-Messer

None

None

Public


Comment ( 1 )




Date: 2005-09-25 16:50
Sender: sabrenProject Admin

Logged In: YES
user_id=1971

Next Action:

duplicate the bug with current piddle/sping/PIL




Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.