Could not find font - MyFont

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
papaonn
Kobold
Posts: 30
Joined: Wed Nov 13, 2013 5:59 pm
x 1

Could not find font - MyFont

Post by papaonn »

Hi guys, i could not load font to Ogre.

Error : Could not find font - MyFont

What's up with this?

I have located
1) MyFont.fontdef
MyFont
{
type truetype
source cuckoo.ttf
size 16
resolution 96
}

2) MyFont.font
<?xml version="1.0" ?>
<Font Name="MyFont" Filename="cuckoo.ttf" Type="FreeType" Size="16" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" AntiAlias="true" />

3) cuckoo.ttf


Ogre::TextAreaOverlayElement *textArea

Code: Select all

        textArea->setCaption(szString);
        textArea->setDimensions(1.0f,1.0f);
        textArea->setMetricsMode(Ogre::GMM_RELATIVE);
        textArea->setFontName("MyFont");
        textArea->setCharHeight(0.03f);
3Q very much!
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: Could not find font - MyFont

Post by spacegaier »

Did you verify that your *.fontdef file was loaded/parsed by Ogre. A respective entry should be written into the ogre logfile if it was.

Something like this:
01:35:14: Parsing script SdkTrays.fontdef
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Post Reply