From 3265912b28a7afa458fe88e43d31b85c17f56d3b Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Sat, 13 May 2023 13:48:13 +0800 Subject: [PATCH] fix: enable font antialias fix #315 --- src/main.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main.cc b/src/main.cc index 6c4da55d..282ab42a 100644 --- a/src/main.cc +++ b/src/main.cc @@ -287,12 +287,10 @@ int main( int argc, char ** argv ) { "gdlookup", "gdau", "gico", "qrcx", "bres", "bword", "gdprg", "gdvideo", "gdpicture", "gdtts", "ifr", "entry" }; for ( const auto & localScheme : localSchemes ) { - QWebEngineUrlScheme webUiScheme(localScheme.toLatin1()); - webUiScheme.setFlags(QWebEngineUrlScheme::SecureScheme | - QWebEngineUrlScheme::LocalScheme | - QWebEngineUrlScheme::LocalAccessAllowed| - QWebEngineUrlScheme::CorsEnabled); - QWebEngineUrlScheme::registerScheme(webUiScheme); + QWebEngineUrlScheme webUiScheme( localScheme.toLatin1() ); + webUiScheme.setFlags( QWebEngineUrlScheme::SecureScheme | QWebEngineUrlScheme::LocalScheme + | QWebEngineUrlScheme::LocalAccessAllowed | QWebEngineUrlScheme::CorsEnabled ); + QWebEngineUrlScheme::registerScheme( webUiScheme ); } QFile file; @@ -304,6 +302,9 @@ int main( int argc, char ** argv ) Q_UNUSED( guard ) + QFont f = QApplication::font(); + f.setStyleStrategy( QFont::PreferAntialias ); + QApplication::setFont( f ); if ( app.isRunning() ) {