font reloading for real this time
This commit is contained in:
+4
-3
@@ -726,9 +726,10 @@ void Font::Load( const RString &sIniPath, RString sChars )
|
||||
continue;
|
||||
}
|
||||
|
||||
Font *subfont=FONT->LoadFont(path,"");
|
||||
MergeFont(*subfont);
|
||||
FONT->UnloadFont(subfont);
|
||||
Font subfont;
|
||||
subfont.Load(path,"");
|
||||
MergeFont(subfont);
|
||||
//FONT->UnloadFont(subfont);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -54,8 +54,7 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha
|
||||
if( p != g_mapPathToFont.end() )
|
||||
{
|
||||
pFont=p->second;
|
||||
// reload in case metrics may have changed
|
||||
pFont->Load(sFontOrTextureFilePath, sChars);
|
||||
pFont->m_iRefCount++;
|
||||
}
|
||||
else {
|
||||
pFont= new Font;
|
||||
@@ -63,7 +62,6 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha
|
||||
g_mapPathToFont[NewName] = pFont;
|
||||
}
|
||||
|
||||
pFont->m_iRefCount++;
|
||||
return pFont;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user