In my Galactic Commander game I change the default font doing something like this in a init() method of a BasicGameState:
Code:
defaultFont = new org.newdawn.slick.AngelCodeFont(...);
game.getContainer().setDefaultFont(defaultFont);
and at start of the main render() I do:
Code:
g.setFont(defaultFont);
The results are quite strange. Most noticeably the text changes to whatever, where it is supposed to say one thing it says another because it was used earlier.
http://gamadu.com/games/gcom/gcwindowed.jnlp
I've not been able to track this down in my code. There's no obvious reason why it behaves like this. Perhaps it's a bug in Slick how it handles a default font, maybe you're not allowed to change it?
I'll need to try to reproduce this perhaps. Will let you know of my results.