I'm having a related problem.

The fragment of code listed by Peter De Wachter in the initial report
does not break pygame for me, but using "serif" instead does.

I traced the problem down to incorrect parsing of a fonts.dir file (as
opposed to a fonts.cache-1 file, as in the earlier case).

My /usr/share/fonts/truetype/freefont/fonts.dir (covering apparently
only fonts from the ttf-freefont package) looks like this:

--------
21
FreeMono.ttf -misc-FreeMono-medium-r-normal--0-0-0-0-p-0-iso8859-1
FreeMonoBold.ttf -misc-FreeMono-bold-r-normal--0-0-0-0-p-0-iso8859-1
FreeMonoBoldOblique.ttf -misc-FreeMono-medium-r-normal--0-0-0-0-p-0-iso8859-1
FreeMonoOblique.ttf -misc-FreeMono-medium-r-normal--0-0-0-0-p-0-iso8859-1
FreeSans.ttf -misc-FreeSans-medium-r-normal--0-0-0-0-c-0-jisx0208.1983-0
FreeSans.ttf -misc-FreeSans-medium-r-normal--0-0-0-0-p-0-iso8859-1
FreeSansBold.ttf -misc-FreeSans-bold-r-normal--0-0-0-0-p-0-iso8859-1
FreeSansBoldOblique.ttf -misc-FreeSans-medium-r-normal--0-0-0-0-p-0-iso8859-1
FreeSansOblique.ttf -misc-FreeSans-medium-r-normal--0-0-0-0-p-0-iso8859-1
FreeSerif.ttf -misc-FreeSerif-medium-r-normal--0-0-0-0-c-0-jisx0208.1983-0
FreeSerif.ttf -misc-FreeSerif-medium-r-normal--0-0-0-0-p-0-iso8859-1
FreeSerifBold.ttf -misc-FreeSerif-bold-r-normal--0-0-0-0-c-0-jisx0208.1983-0
FreeSerifBold.ttf -misc-FreeSerif-bold-r-normal--0-0-0-0-p-0-iso8859-1
FreeSerifBoldItalic.ttf -misc-FreeSerif-medium-r-normal--0-0-0-0-p-0-iso8859-1
FreeSerifItalic.ttf -misc-FreeSerif-medium-i-normal--0-0-0-0-p-0-iso8859-1
bw=0.5:FreeSans.ttf -misc-FreeSans-medium-r-normal--0-0-0-0-c-0-iso8859-1
bw=0.5:FreeSans.ttf -misc-FreeSans-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0
bw=0.5:FreeSerif.ttf -misc-FreeSerif-medium-r-normal--0-0-0-0-c-0-iso8859-1
bw=0.5:FreeSerif.ttf 
-misc-FreeSerif-medium-r-normal--0-0-0-0-c-0-jisx0201.1976-0
bw=0.5:FreeSerifBold.ttf -misc-FreeSerif-bold-r-normal--0-0-0-0-c-0-iso8859-1
bw=0.5:FreeSerifBold.ttf 
-misc-FreeSerif-bold-r-normal--0-0-0-0-c-0-jisx0201.1976-0
--------

Those last few lines are what's causing the breakage; pygame thinks that
"bw=0.5:FreeSerifBold.ttf" is a filename, when in fact it is not.

I don't know exactly what the stuff before the colon means; possibly
it's that TTCap stuff [1], but it soudns like that is supposed to have a
colon before it too. Not too important, as sysfont.py:read_unix_fontsdir()
would be parsing them wrong in either case.

It should ignore everything up to the last colon in the field it's using
as a filename.

Alternatively, use the patch provided by Peter, as fc-list seems to know
how to handle that sort of thing and everything is happy.

[1] http://www.xfree86.org/4.0.1/fonts4.html#26

-- 
paul


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to