[Image-SIG] howto?--Converting X pcf fonts to PIL image fonts on Windows

Andres Polit apolit at yahoo.com
Sun Sep 7 20:17:40 EDT 2003


Hello,
I'm trying to convert pcf fonts from X11 to image
fonts.  
On linux, I gunzipped helvO18.pcf.gz to get
helvO18.pcf.  On windows, running python22 I tried:
------
import  os, sys
from PIL import PcfFontFile
f = 'c:\helvO18.pcf'
fp = open(f, "rb")
p = PcfFontFile.PcfFontFile(fp)
-----
PcfFontFile causes an error...

1885562369 1885562369
Traceback (most recent call last):
  File "<pyshell#4>", line 1, in ?
    p = PcfFontFile.PcfFontFile(fp)
  File
"C:\PYTHON22\lib\site-packages\PIL\PcfFontFile.py",
line 87, in __init__
    encoding = self._load_encoding()
  File
"C:\PYTHON22\lib\site-packages\PIL\PcfFontFile.py",
line 250, in _load_encoding
    encoding[i+firstCol] = encodingOffset
IndexError: list assignment index out of range
>>> 

------
I don't have PIL on Linux.  Could anyone tell me how
to do this correctly on Windows? 
Thanks very much.
A. Polit

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the Image-SIG mailing list