Added setting of the charcode during construction of osgText::Font::Glyph()

This commit is contained in:
Robert Osfield
2010-01-14 15:15:42 +00:00
parent f53c3c1036
commit 8f6db66e59
6 changed files with 11 additions and 14 deletions

View File

@@ -135,7 +135,7 @@ osgText::Font::Glyph* FreeTypeFont::getGlyph(const osgText::FontResolution& font
unsigned int width = sourceWidth;
unsigned int height = sourceHeight;
osg::ref_ptr<osgText::Font::Glyph> glyph = new osgText::Font::Glyph;
osg::ref_ptr<osgText::Font::Glyph> glyph = new osgText::Font::Glyph(charcode);
unsigned int dataSize = width*height;
unsigned char* data = new unsigned char[dataSize];

View File

@@ -230,7 +230,7 @@ TXFFont::loadFont(std::istream& stream)
continue;
// add the characters ...
osgText::Font::Glyph* glyph = new osgText::Font::Glyph;
osgText::Font::Glyph* glyph = new osgText::Font::Glyph(glyphs[i].ch);
unsigned sourceWidth = glyphs[i].width;
unsigned sourceHeight = glyphs[i].height;
@@ -271,7 +271,7 @@ TXFFont::loadFont(std::istream& stream)
}
// insert a trivial blank character
osgText::Font::Glyph* glyph = new osgText::Font::Glyph;
osgText::Font::Glyph* glyph = new osgText::Font::Glyph(' ');
unsigned width = 1;
unsigned height = 1;