font reloading for real this time

This commit is contained in:
AJ Kelly
2011-02-17 15:00:58 -06:00
parent 69491c7ccb
commit 8283a5bdda
2 changed files with 5 additions and 6 deletions
+4 -3
View File
@@ -726,9 +726,10 @@ void Font::Load( const RString &sIniPath, RString sChars )
continue; continue;
} }
Font *subfont=FONT->LoadFont(path,""); Font subfont;
MergeFont(*subfont); subfont.Load(path,"");
FONT->UnloadFont(subfont); MergeFont(subfont);
//FONT->UnloadFont(subfont);
} }
} }
+1 -3
View File
@@ -54,8 +54,7 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha
if( p != g_mapPathToFont.end() ) if( p != g_mapPathToFont.end() )
{ {
pFont=p->second; pFont=p->second;
// reload in case metrics may have changed pFont->m_iRefCount++;
pFont->Load(sFontOrTextureFilePath, sChars);
} }
else { else {
pFont= new Font; pFont= new Font;
@@ -63,7 +62,6 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha
g_mapPathToFont[NewName] = pFont; g_mapPathToFont[NewName] = pFont;
} }
pFont->m_iRefCount++;
return pFont; return pFont;
} }