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

[pygame] [announcement] SFont 0.1 for pygame



Download it from here: http://big-brain.org/files/python/pygame/

I've created a small module that allows the use of SFont bitmapped fonts with pygame. The SFont format makes it simple to use proportional-width bitmapped fonts. More information on SFont can be found at http://www.linux-games.com/sfont/

The SFont format is cool because:

* It supports multi-colored fonts
* It is easy to use
* It's easy to create your own fonts!
* You can choose between a large number of fonts
* Handle as many fonts as you like at the same time
* Simple font format - all data is stored in one png!
* It's well tested and used in many projects
* You don't have to deal with strange file formats: all font info is
stored in one image file
* The fonts are not dependant on the used image file format


My implementation has the following features:

* Easy to load from an SFont file: font = sfont.Font('file.png')
* Automatic word-wrapping at a specified pixel width
* Ability to blit directly to an existing surface, or return a new
surface with the text rendered onto it (this is useful when the
same text needs to be shown many times)
* Unicode support (untested, and requires an SFont file with the
desired characters--a few are available on the net)


If anyone finds this useful, I'd appreciate any feedback or bug reports.

Thanks!
Eric Burgess "mojo-"