PIL pilfont.py

D

Daewon YOON

Hi.

I tried to convert a bdf file using pilfont.py script. Instead producing
pretty font images, it complained like following.

**
daewian:~/fonting$ ./pilfont.py gulim24.bdf
gulim24.bdf...
Traceback (most recent call last):
File "./pilfont.py", line 47, in ?
p.save(f)
File "/usr/lib/python2.3/site-packages/PIL/FontFile.py", line 105, in
save1
self.bitmap.save(os.path.splitext(filename)[0] + ".pbm", "PNG")
AttributeError: 'NoneType' object has no attribute 'save'
**

Gulim is a korean font with KSX encoding.
The script worked fine with a ntimb08.bdf. So I suspect the script
doesn't like non-latin
characters.

Can anybody help me?

BTW, my previous problem with truetype() was solved. Some ttf files work and
others don't.
 
D

Daewon YOON

Daewon said:
Hi.

I tried to convert a bdf file using pilfont.py script. Instead producing
pretty font images, it complained like following.

**
daewian:~/fonting$ ./pilfont.py gulim24.bdf
gulim24.bdf...
Traceback (most recent call last):
File "./pilfont.py", line 47, in ?
p.save(f)
File "/usr/lib/python2.3/site-packages/PIL/FontFile.py", line 105, in
save1
self.bitmap.save(os.path.splitext(filename)[0] + ".pbm", "PNG")
AttributeError: 'NoneType' object has no attribute 'save'
**

Gulim is a korean font with KSX encoding.
The script worked fine with a ntimb08.bdf. So I suspect the script
doesn't like non-latin characters.

Can anybody help me?

BTW, my previous problem with truetype() was solved. Some ttf files
work and others don't.

Solved by myself.
Changed '256's in FontFile of FontFile.py to 256 * 256. Then the
sciprt produced pretty .pbm file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top