how to use bitmap fonts?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

pyhmail
Not too shy to talk
Not too shy to talk
Posts: 24
Joined: Thu Apr 03, 2008 02:37

how to use bitmap fonts?

Postby pyhmail » Wed May 21, 2008 05:54

I want use bitmap fonts,my mothed is :
1) create a font file MyFont.font, the content in the file is:
<?xml version="1.0" ?>
<Font Name="MyFont" Filename="TaharezLook.imageset" Type="Static" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true">
<Mapping Codepoint="65" Image="ClientBrush" />
</Font>

2) create the bitmap font:
CEGUI::FontManager::getSingleton().createFont("MyFont.font");

when I run it ,there is a message for error:
FontManager::createFont - The value for the Font:Type attribute 'Static' is unknown.
how to fix it ?

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Wed May 21, 2008 07:15

Mmmm "Static" should work according to the .xsd file. I don't have a running Cegui installation at hands right now, so i can't test anything..

Apparently, dynamic fonts (which use 'Dynamic') do work on your setup?
Check out my released snake game using Cegui!

pyhmail
Not too shy to talk
Not too shy to talk
Posts: 24
Joined: Thu Apr 03, 2008 02:37

Postby pyhmail » Wed May 21, 2008 07:39

thank scriptkid!

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Wed May 21, 2008 08:52

Depending on the version you have those type names were changed.

"Static" became "Pixmap"
"Dynamic" became "FreeType"

Don't ask why this change came about :lol:

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 20 guests