ecode: Some minor performance improvements.

eterm: added font family.
This commit is contained in:
Martín Lucas Golini
2023-08-13 00:33:27 -03:00
parent 0903bd7039
commit 86000a3047
6 changed files with 30 additions and 15 deletions
+5 -1
View File
@@ -230,12 +230,16 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
if ( fontPath && FileSystem::fileExists( fontPath.Get() ) ) {
FileInfo file( fontPath.Get() );
fontMono = FontTrueType::New( "monospace" );
if ( !fontMono->loadFromFile( file.getFilepath() ) )
if ( fontMono->loadFromFile( file.getFilepath() ) ) {
FontFamily::loadFromRegular( fontMono );
} else {
fontMono = nullptr;
}
}
if ( fontMono == nullptr ) {
fontMono = FontTrueType::New( "monospace" );
fontMono->loadFromFile( resPath + "fonts/DejaVuSansMonoNerdFontComplete.ttf" );
FontFamily::loadFromRegular( fontMono, "DejaVuSansMono" );
}
if ( FileSystem::fileExists( resPath + "fonts/NotoColorEmoji.ttf" ) ) {