Slick Forums

Discuss the Slick 2D Library
It is currently Sat Apr 19, 2014 4:22 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Mar 09, 2010 12:41 pm 
Offline
Game Developer
User avatar

Joined: Tue Nov 21, 2006 4:46 am
Posts: 620
Location: Iceland
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 04, 2010 7:57 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
This should be resolved by the font caching issue fixes. Let me know if it still persists.

Kev


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group