mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Added the possibility to configure the font hinting and font anti-aliasing.
MenuBar buttons are now slightly more separated. When switching between dark and light ui prefers color scheme now pick a dark/light color scheme if the currently set is the default (SpartanJ/ecode#535). Fix a bug in menu bar pop-up not hiding properly.
This commit is contained in:
@@ -3398,16 +3398,22 @@ FontTrueType* App::loadFont( const std::string& name, std::string fontPath,
|
||||
if ( fontPath.empty() )
|
||||
return nullptr;
|
||||
FontTrueType* font = FontTrueType::New( name );
|
||||
if ( font->loadFromFile( fontPath ) )
|
||||
if ( font->loadFromFile( fontPath ) ) {
|
||||
font->setHinting( mConfig.ui.fontHinting );
|
||||
font->setAntialiasing( mConfig.ui.fontAntialiasing );
|
||||
return font;
|
||||
}
|
||||
eeSAFE_DELETE( font );
|
||||
// Failed to load original font? Try to fallback
|
||||
if ( !fallback.empty() && !wasFallback ) {
|
||||
if ( !fontPath.empty() && FileSystem::isRelativePath( fontPath ) )
|
||||
fontPath = mResPath + fontPath;
|
||||
font = FontTrueType::New( name );
|
||||
if ( font->loadFromFile( fontPath ) )
|
||||
if ( font->loadFromFile( fontPath ) ) {
|
||||
font->setHinting( mConfig.ui.fontHinting );
|
||||
font->setAntialiasing( mConfig.ui.fontAntialiasing );
|
||||
return font;
|
||||
}
|
||||
eeSAFE_DELETE( font );
|
||||
}
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user