[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re: Erratic behavior with pygame.font.SysFont



On 31.12.2009 01:25, Daniel Waltrip wrote:
What method did you determine if a font had the "erratic behavior",
where it wouldn't load and didn't have a real exception?
Is there a simple way other than testing each font individually?
I tested every font individually. If python did not react after loading the font I put it on a blacklist and ran the script again.
from my script: http://lizard.pastebin.com/m3bc7419c
*erratic behavior*, put in BLACKLIST list: does not have a real exception but program freezes
ERRORLIST contains those which have a real exception
STRANGE contains fonts with no exception but which display strange boxes instead of actual characters WHITELIST contains fonts that work as expected, my script skips them to save my time

It is probably hard to write an automated script, since the python process that loaded the font becomes unusable. Possibly one could launch a new program for each font and wait a few seconds for it to (somehow) announce success. If there is no sign of success the font would be put on the Blacklist. I doubt I'm capable of writing such a script.
On my system there are 220 fonts returned by pygame.font.get_fonts()

On Dec 30, 5:24 am, Rolf Sievers<rolf.siev...@xxxxxxxx>  wrote:
Hi,

I have got 271 Fonts on my (father's) PC and just checked all of them
with a modified script.http://lizard.pastebin.com/m3bc7419c

You can see which fonts have this erratic behavion, which fail to load
with  real exception, which display strange (boxes) and wich work fine.
30 are broken
206 work fine

On XP with 1.9.1 I freeze up on the ~10th font called impact.
I'm on Vista, PortablePython 2.5, pygame 1.8.1release - impact works for me
Therefore it might be wise to double check the fonts anyone reports as
broken
Also I don't have my own PC and can't install Subversion to make a
patch, neither do I feel good enough to write one by hand

On 30.12.2009 09:42, René Dudfield wrote:



hi,
you could try filtering out that font and not loading it.  I'm
guessing there is a bug in freetype and that font.
I could add that font(and other broken ones) to sysfont if someone
submits a patch.  That is a font blacklist.
      http://www.seul.org/viewcvs/viewcvs.cgi/trunk/lib/sysfont.py?rev=2519...
cu,
On Wed, Dec 30, 2009 at 7:59 AM, Ian Mallett<geometr...@xxxxxxxxx>    wrote:
I get the same error as Dan.