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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Font *subfont=FONT->LoadFont(path,"");
|
Font subfont;
|
||||||
MergeFont(*subfont);
|
subfont.Load(path,"");
|
||||||
FONT->UnloadFont(subfont);
|
MergeFont(subfont);
|
||||||
|
//FONT->UnloadFont(subfont);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user