Added setting of the charcode during construction of osgText::Font::Glyph()
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user