From bbecb4cc1bcee362e6d5c5f0066350a42a44429e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Wed, 8 Jun 2022 01:17:20 -0300 Subject: [PATCH] ecode: Font loading small bug fix. --- src/tools/ecode/ecode.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tools/ecode/ecode.cpp b/src/tools/ecode/ecode.cpp index e30e33ae9..682dcf32d 100644 --- a/src/tools/ecode/ecode.cpp +++ b/src/tools/ecode/ecode.cpp @@ -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 ); }