ecode: Fallback font path minor bug fix.

This commit is contained in:
Martín Lucas Golini
2022-06-04 21:53:17 -03:00
parent 042b8f0304
commit 34abcf8eee
3 changed files with 5 additions and 0 deletions
+2
View File
@@ -2736,6 +2736,8 @@ FontTrueType* App::loadFont( const std::string& name, std::string fontPath,
fontPath = mResPath + fontPath;
if ( fontPath.empty() || !FileSystem::fileExists( fontPath ) )
fontPath = fallback;
if ( FileSystem::isRelativePath( fontPath ) )
fontPath = mResPath + fontPath;
return FontTrueType::New( name, fontPath );
}