mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 10:36:30 +03:00
ecode: Font loading small bug fix.
This commit is contained in:
@@ -2734,10 +2734,11 @@ FontTrueType* App::loadFont( const std::string& name, std::string fontPath,
|
||||
const std::string& fallback ) {
|
||||
if ( FileSystem::isRelativePath( fontPath ) )
|
||||
fontPath = mResPath + fontPath;
|
||||
if ( fontPath.empty() || !FileSystem::fileExists( fontPath ) )
|
||||
if ( fontPath.empty() || !FileSystem::fileExists( fontPath ) ) {
|
||||
fontPath = fallback;
|
||||
if ( FileSystem::isRelativePath( fontPath ) )
|
||||
fontPath = mResPath + fontPath;
|
||||
if ( FileSystem::isRelativePath( fontPath ) )
|
||||
fontPath = mResPath + fontPath;
|
||||
}
|
||||
return FontTrueType::New( name, fontPath );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user