Does CEGUI support bitmap fonts?
Posted: Sun Jan 30, 2005 03:50
I would like to know if CEGUI supports bitmap fonts, and if so, how would I go about implementing one.
The official forum for CEGUI
http://cegui.org/forum/
Code: Select all
<?xml version="1.0" ?>
<Font Name="myFont" Filename="myFont.imageset" Type="Static" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true">
<Mapping Codepoint="49" Image="Num1" />
<Mapping Codepoint="50" Image="Num2" />
<Mapping Codepoint="51" Image="Num3" />
<Mapping Codepoint="52" Image="Num4" />
<Mapping Codepoint="53" Image="Num5" />
</Font>Code: Select all
Index: src/CEGUIFont.cpp
===================================================================
RCS file: /cvsroot/crayzedsgui/cegui_mk2/src/CEGUIFont.cpp,v
retrieving revision 1.29
diff -u -r1.29 CEGUIFont.cpp
--- src/CEGUIFont.cpp 11 Feb 2005 10:48:02 -0000 1.29
+++ src/CEGUIFont.cpp 26 Feb 2005 16:11:40 -0000
@@ -891,8 +891,8 @@
{
const Image* img = pos->second.d_image;
- if (img->getOffsetY() > d_max_bearingY)
- d_max_bearingY = img->getOffsetY();
+ if (-img->getOffsetY() > d_max_bearingY)
+ d_max_bearingY = -img->getOffsetY();
if (img->getHeight() > d_lineHeight)
d_lineHeight = img->getHeight();
@@ -901,6 +901,7 @@
d_max_bearingY *= scale;
d_lineHeight *= scale;
d_lineSpacing = d_lineHeight;
+ d_maxGlyphHeight = d_lineHeight;
}
}
YOffset does not have any effekt anymore? (it was strange though, as I had it on negativ values - dont remember why though)