Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 12:59 AM
Daewon YOON
Guest
 
Posts: n/a
Default PIL pilfont.py

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
  #2  
Old July 19th, 2005, 01:02 AM
Daewon YOON
Guest
 
Posts: n/a
Default Re: PIL pilfont.py

Daewon YOON wrote:[color=blue]
> 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[/color]

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

--
zooy
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles