473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
Jul 18 '05 #1
1 2435
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jack Wu | last post by:
Hi I've spent a good majority of my day trying to figure out how to have PIL 1.1.5 working on my OSX 10.3.9_PPC machine. I'm still stuck and I have not gotten anywhere. Could somebody please...
0
by: Huuuze | last post by:
I could really use some help. Please take a look at the following image: http://img227.imageshack.us/img227/1346/grainynn3.png As you can see, the text in the image is fairly grainy. To get...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.