Fix confusing behavior when importing a font that doesn't exist
This commit is contained in:
@@ -799,7 +799,13 @@ void Font::Load(const CString &sFontOrTextureFilePath, CString sChars)
|
||||
split(imports, ",", ImportList, true);
|
||||
for(unsigned i = 0; i < ImportList.size(); ++i)
|
||||
{
|
||||
CString path = THEME->GetPathToF( ImportList[i]);
|
||||
CString path = THEME->GetPathToF( ImportList[i], true );
|
||||
if( path == "" )
|
||||
{
|
||||
LOG->Warn("Font \"%s\" imports a font \"%s\" that doesn't exist", sFontOrTextureFilePath.c_str(), ImportList[i].c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
Font subfont;
|
||||
subfont.Load(path, "");
|
||||
MergeFont(subfont);
|
||||
|
||||
Reference in New Issue
Block a user