more font theming

Stefan Kloe stefan.kloe at googlemail.com
Tue Oct 30 09:18:47 EDT 2007


Hi,

based on the recent changes I extended the font theming.

I added lots of new purposes in the config files that are used
throughout pydance. This made me able to eliminate the FONTS dictionary
from 'constants.py'. Maybe there are too many purposes now but I don't
know which fonts could be merged.

The two methods 'embfade' and 'shadefade' from 'fontfx.py' are now
expecting a font instead of its size, therefore matching the declaration
of 'shadow' and fitting into the font theming concept.

Imho the next step would be moving the method 'max_size' from
'fontfx.py' into 'fonttheme.py'. It computes the optimal size of an font
based on the string to render and a given width. 'fonttheme' itself
knows the font and the maximal size and should be able to do this quite
easily. 

Best regards,
Stefan  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: extended_font_theming.diff
Type: text/x-patch
Size: 18232 bytes
Desc: not available
URL: <http://icculus.org/pipermail/pyddr-devel/attachments/20071030/0933e6ea/attachment.bin>


More information about the pyddr-devel mailing list