Bitmap fonts problem

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

atsakir
Just popping in
Just popping in
Posts: 1
Joined: Mon Apr 17, 2006 12:44

Bitmap fonts problem

Postby atsakir » Mon Apr 17, 2006 14:22

Here is the situation, I need to use bitmap fonts (mainly for nicer effects like bevel, inner shadows etc. and because I want to use Multiple languages like Greek, German etc) I looked at this thread
http://www.cegui.org.uk/phpBB2/viewtopic.php?t=410&highlight=bitmap+font

and downloaded the binary in this link:
http://www.weltenspiegel.de/private/ogre/cegui/20050215/font_futech.zip

My first test is trying to use this bitmap font in my own code and there lies the problem. Here is a snippet of the code I use:

Code: Select all

   mGUISystem = new CEGUI::System(mGUIRenderer);
   CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative);
   CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLook.scheme");
    mGUISystem->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow");
   mGUISystem->setDefaultFont("Futech9");

Simple stuff really. However, it doesn't even get to the point where the default font is set and I get a debug assertion like so..

Image

looking into the local variables in the debugger it seems there is a problem somewhere in the XML parser for the font.


Looking at CEGUI.log it appears that the TTF fonts are generated normally but the bitmap chokes:

Code: Select all

17/04/2006 16:39:46 (InfL1)   Attempting to create Font from the information specified in file 'tahoma-12.font'.
17/04/2006 16:39:46 (InfL2)   Started creation of Font 'Tahoma-12' via XML file.
17/04/2006 16:39:46 (InfL1)   Attempting to create Imageset 'Tahoma-12_auto_glyph_images' with texture only.
17/04/2006 16:39:46 (InfL2)   Font 'Tahoma-12' now has the following glyphs defined: ' !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'.
17/04/2006 16:39:46 (InfL2)   Finished creation of Font 'Tahoma-12' via XML file.
17/04/2006 16:39:46 (InfL1)   Attempting to create Font from the information specified in file 'tahoma-10.font'.
17/04/2006 16:39:46 (InfL2)   Started creation of Font 'Tahoma-10' via XML file.
17/04/2006 16:39:46 (InfL1)   Attempting to create Imageset 'Tahoma-10_auto_glyph_images' with texture only.
17/04/2006 16:39:46 (InfL2)   Font 'Tahoma-10' now has the following glyphs defined: ' !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'.
17/04/2006 16:39:46 (InfL2)   Finished creation of Font 'Tahoma-10' via XML file.
17/04/2006 16:39:46 (InfL1)   Attempting to create Font from the information specified in file 'tahoma-8.font'.
17/04/2006 16:39:46 (InfL2)   Started creation of Font 'Tahoma-8' via XML file.
17/04/2006 16:39:46 (InfL1)   Attempting to create Imageset 'Tahoma-8_auto_glyph_images' with texture only.
17/04/2006 16:39:46 (InfL2)   Font 'Tahoma-8' now has the following glyphs defined: ' !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'.
17/04/2006 16:39:46 (InfL2)   Finished creation of Font 'Tahoma-8' via XML file.
17/04/2006 16:39:46 (InfL1)   Attempting to create Font from the information specified in file 'font_futech12.font'.
17/04/2006 16:39:46 (InfL2)   Started creation of Font 'Futech12' via XML file.
17/04/2006 16:39:46 (InfL1)   Attempting to create an Imageset from the information specified in file 'font_futech12.imageset'.
17/04/2006 16:39:47 (InfL2)   Started creation of Imageset 'font_futech.imageset' via XML file.
17/04/2006 16:39:47 (InfL2)   Finished creation of Imageset 'font_futech.imageset' via XML file.


My TaharezLook.scheme file is like so:

Code: Select all

<?xml version="1.0" ?>
<GUIScheme Name="TaharezLook">
   <Imageset Name="TaharezLook" Filename="TaharezLook.imageset" />
   <Font Name="Tahoma-12" Filename="tahoma-12.font" />
   <Font Name="Tahoma-10" Filename="tahoma-10.font" />
   <Font Name="Tahoma-8" Filename="tahoma-8.font" />
   <Font Name="Futech9" Filename="font_futech9.font" />
   <WindowSet Filename="CEGUITaharezLook">
      <WindowFactory Name="TaharezLook/AlternateProgressBar" />
      <WindowFactory Name="TaharezLook/Button" />
      <WindowFactory Name="TaharezLook/Checkbox" />
      <WindowFactory Name="TaharezLook/CloseButton" />
      <WindowFactory Name="TaharezLook/Combobox" />
      <WindowFactory Name="TaharezLook/ComboDropList" />
      <WindowFactory Name="TaharezLook/ComboEditbox" />
      <WindowFactory Name="TaharezLook/Editbox" />
      <WindowFactory Name="TaharezLook/FrameWindow" />
      <WindowFactory Name="TaharezLook/LargeVerticalScrollbar" />
      <WindowFactory Name="TaharezLook/LargeVerticalScrollbarThumb" />
      <WindowFactory Name="TaharezLook/Listbox" />
      <WindowFactory Name="TaharezLook/ListHeader" />
      <WindowFactory Name="TaharezLook/ListHeaderSegment" />
      <WindowFactory Name="TaharezLook/HorizontalScrollbar" />
      <WindowFactory Name="TaharezLook/HorizontalScrollbarThumb" />
      <WindowFactory Name="TaharezLook/MultiColumnList" />
      <WindowFactory Name="TaharezLook/MultiLineEditbox" />
      <WindowFactory Name="TaharezLook/ProgressBar" />
      <WindowFactory Name="TaharezLook/RadioButton" />
      <WindowFactory Name="TaharezLook/Slider" />
      <WindowFactory Name="TaharezLook/SliderThumb" />
      <WindowFactory Name="TaharezLook/StaticImage" />
      <WindowFactory Name="TaharezLook/StaticText" />
      <WindowFactory Name="TaharezLook/TabButton" />
      <WindowFactory Name="TaharezLook/TabControl" />
      <WindowFactory Name="TaharezLook/TabPane" />
      <WindowFactory Name="TaharezLook/Titlebar" />
      <WindowFactory Name="TaharezLook/VerticalScrollbar" />
      <WindowFactory Name="TaharezLook/VerticalScrollbarThumb" />
   </WindowSet>
</GUIScheme>


Since this particular font is working correctly in the binary from the 2nd link I take it the problem must lie in the version of CEGUI that I use (Ogre 1.0.7/CEGUI 0.4(?). I also tried using this particular font with the Demo_GUI from the Ogre sources (thinking it might be an issue with my project) but I get the same error.

Is there a different way to implement bitmap fonts for the version of CEGUI that is included with Ogre source 1.0.7? Is perhaps the Font.xsd different and therefore the XML parser for FontManager crashes because of that?

Please if someone knows how to work with bitmap fonts in Ogre 1.0.6-1.0.7 and can help with this I would be ecstatic

Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 13 guests