Renamed osgText::Font::SizePair to osgText::FontSizePair in prep for use this more
widely within osgText/freetype plugin. Added support for inserting loading models into --mt multithreaded implementation.
This commit is contained in:
@@ -52,14 +52,14 @@ Font::Glyph* DefaultFont::getGlyph(unsigned int charcode)
|
||||
{
|
||||
if (_sizeGlyphMap.empty()) return 0;
|
||||
|
||||
SizeGlyphMap::iterator itr = _sizeGlyphMap.find(SizePair(_width,_height));
|
||||
FontSizeGlyphMap::iterator itr = _sizeGlyphMap.find(FontSizePair(_width,_height));
|
||||
if (itr==_sizeGlyphMap.end())
|
||||
{
|
||||
// no font found of correct size, will need to find the nearest.
|
||||
itr = _sizeGlyphMap.begin();
|
||||
int mindeviation = abs((int)_width-(int)itr->first.first)+
|
||||
abs((int)_height-(int)itr->first.second);
|
||||
SizeGlyphMap::iterator sitr=itr;
|
||||
FontSizeGlyphMap::iterator sitr=itr;
|
||||
++sitr;
|
||||
for(;
|
||||
sitr!=_sizeGlyphMap.end();
|
||||
|
||||
@@ -347,7 +347,7 @@ osg::Texture::FilterMode Font::getMagFilterHint() const
|
||||
|
||||
Font::Glyph* Font::getGlyph(unsigned int charcode)
|
||||
{
|
||||
SizeGlyphMap::iterator itr = _sizeGlyphMap.find(SizePair(_width,_height));
|
||||
FontSizeGlyphMap::iterator itr = _sizeGlyphMap.find(FontSizePair(_width,_height));
|
||||
if (itr!=_sizeGlyphMap.end())
|
||||
{
|
||||
GlyphMap& glyphmap = itr->second;
|
||||
@@ -417,7 +417,7 @@ bool Font::hasVertical() const
|
||||
|
||||
void Font::addGlyph(unsigned int width, unsigned int height, unsigned int charcode, Glyph* glyph)
|
||||
{
|
||||
_sizeGlyphMap[SizePair(width,height)][charcode]=glyph;
|
||||
_sizeGlyphMap[FontSizePair(width,height)][charcode]=glyph;
|
||||
|
||||
int posX=0,posY=0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user