diff --git a/CMakeLists.txt b/CMakeLists.txt index ddf13ed..ac6515a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,6 +222,10 @@ set(PROJECT_SOURCES src/dataStore/ProxyEntity.cpp ) +if (NOT APPLE AND Qt6_VERSION VERSION_GREATER_EQUAL 6.9.0) + list(APPEND PROJECT_SOURCES res/EmojiFont.qrc) +endif () + # Qt exe qt_add_executable(Throne MANUAL_FINALIZATION diff --git a/res/EmojiFont.qrc b/res/EmojiFont.qrc new file mode 100644 index 0000000..a56ba94 --- /dev/null +++ b/res/EmojiFont.qrc @@ -0,0 +1,5 @@ + + + font/NotoColorEmoji.ttf + + diff --git a/res/Throne.qrc b/res/Throne.qrc index 8ab9a23..8e43448 100644 --- a/res/Throne.qrc +++ b/res/Throne.qrc @@ -24,7 +24,4 @@ public/Tun.png dashboard-notice.html - - font/NotoColorEmoji.ttf - diff --git a/src/main.cpp b/src/main.cpp index 0436ac3..1351285 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,15 +69,13 @@ int main(int argc, char* argv[]) { QApplication::setQuitOnLastWindowClosed(false); QApplication a(argc, argv); -#ifndef Q_OS_MACOS +#if !defined(Q_OS_MACOS) && (QT_VERSION >= QT_VERSION_CHECK(6,9,0)) // Load the emoji fonts int fontId = QFontDatabase::addApplicationFont(":/font/notoEmoji"); if (fontId >= 0) { -#if (QT_VERSION >= QT_VERSION_CHECK(6,9,0)) QStringList fontFamilies = QFontDatabase::applicationFontFamilies(fontId); QFontDatabase::setApplicationEmojiFontFamilies(fontFamilies); -#endif } else { qDebug() << "could not load noto font!";