mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-18 20:50:09 +08:00
improve
This commit is contained in:
parent
d655b14f69
commit
4942c25f18
@ -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
|
||||
|
||||
5
res/EmojiFont.qrc
Normal file
5
res/EmojiFont.qrc
Normal file
@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/font">
|
||||
<file alias="notoEmoji">font/NotoColorEmoji.ttf</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@ -24,7 +24,4 @@
|
||||
<file alias="Tun.png">public/Tun.png</file>
|
||||
<file>dashboard-notice.html</file>
|
||||
</qresource>
|
||||
<qresource prefix="/font">
|
||||
<file alias="notoEmoji">font/NotoColorEmoji.ttf</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@ -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!";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user