By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,587 Members | 1,580 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,587 IT Pros & Developers. It's quick & easy.

PIL pilfont.py

P: n/a
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.

--
zooy
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Daewon YOON wrote:
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.

--
zooy


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

--
zooy
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.