Any ideas on how do I get rid of this error?
Exception: FontManager::getFont - A Font object with the specified name 'Tahoma-12.font' does not exist within the system
Offending code in ceguifont.h
float getLineSpacing (float y_scale = 1.0f) const
{ return d_height * y_scale; }
Called by the following code (mine):
...setup resource paths, etc...
CEGUI::SchemeManager::getSingleton().loadScheme("TaharezLook.scheme");
CEGUI::FontManager::getSingleton().createFont("Tahoma-12.font");
CEGUI::System::getSingleton().setDefaultFont("Tahoma-12.font");
How to get rid of error FontManager::getFont - A Font object
Moderators: CEGUI MVP, CEGUI Team
Skip the third line (if there's only one font setDefaultFont is not necessary) or try it this way:
Code: Select all
CEGUI::Font* myFont = CEGUI::FontManager::getSingleton().createFont("Tahoma-12.font");
CEGUI::System::getSingleton().setDefaultFont(myFont);
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
You have probably got confused (i forgive you
) by the slight difference in the CreateFont and SetDefaultFont methods.
CreateFont receives a filename, however SetDefaultFont receives a font name, which is the Name attribute in your font.xml file. So this will probably work:
Or, as suggested by Kuehrli, pass the font itself.

CreateFont receives a filename, however SetDefaultFont receives a font name, which is the Name attribute in your font.xml file. So this will probably work:
Code: Select all
CEGUI::System::getSingleton().setDefaultFont("Tahoma-12");
Or, as suggested by Kuehrli, pass the font itself.
Who is online
Users browsing this forum: No registered users and 16 guests