try fixing linux emoji issue

This commit is contained in:
Nova 2025-09-25 02:08:22 +03:30
parent 93c794d236
commit cb30dbadc9
3 changed files with 9 additions and 0 deletions

View File

@ -24,4 +24,7 @@
<file alias="Tun.png">public/Tun.png</file> <file alias="Tun.png">public/Tun.png</file>
<file>dashboard-notice.html</file> <file>dashboard-notice.html</file>
</qresource> </qresource>
<qresource prefix="/font">
<file alias="notoEmoji">font/NotoColorEmoji.ttf</file>
</qresource>
</RCC> </RCC>

BIN
res/font/NotoColorEmoji.ttf Normal file

Binary file not shown.

View File

@ -21,6 +21,7 @@
#endif #endif
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
#include "include/sys/linux/desktopinfo.h" #include "include/sys/linux/desktopinfo.h"
#include <qfontdatabase.h>
#endif #endif
void signal_handler(int signum) { void signal_handler(int signum) {
@ -67,6 +68,11 @@ int main(int argc, char* argv[]) {
QApplication::setQuitOnLastWindowClosed(false); QApplication::setQuitOnLastWindowClosed(false);
QApplication a(argc, argv); QApplication a(argc, argv);
#ifdef Q_OS_LINUX
// Load the emoji font only on Linux
QFontDatabase::addApplicationFont(":/font/notoEmoji");
#endif
// Clean // Clean
QDir::setCurrent(QApplication::applicationDirPath()); QDir::setCurrent(QApplication::applicationDirPath());
if (QFile::exists("updater.old")) { if (QFile::exists("updater.old")) {