Font loading

Problems building or running the engine, queries about how to use features etc.
Post Reply
xjum52
Gnoblar
Posts: 1
Joined: Mon Jul 28, 2014 9:11 pm

Font loading

Post by xjum52 »

Hello, I am using Ogre 1.9 and have followed steps outlined in the tutorial & forums regarding the OverlaySystem. I am able to display popups, text boxs, etc.

http://i.imgur.com/dgjUVG1.png

However, I ran into a problem where Font::getGlyphAspectRatio was always returning 1.0f due to an empty mCodePointMap member variable, thus I am unable to compute the width of a string.

The following fixes the problem,

Code: Select all

if (Ogre::Font* font = (Ogre::Font*)Ogre::FontManager::getSingleton().getByName("SdkTrays/Value").getPointer())
	{
		font->load();
	}
...as isLoaded() was in fact returning false.

However, I do not believe this is the intended solution as I would expect this to be automated via initialiseAllResourceGroups or something similar. Thanks in advance if anyone can point me in the right direction.
Post Reply