diff --git a/src/TLuaInterpreterUI.cpp b/src/TLuaInterpreterUI.cpp index c0cf0581b89..49cfceecfe5 100644 --- a/src/TLuaInterpreterUI.cpp +++ b/src/TLuaInterpreterUI.cpp @@ -2389,6 +2389,11 @@ int TLuaInterpreter::setFont(lua_State* L) // TODO issue #4159: a nonexisting font breaks the console #endif +#if defined(Q_OS_MACOS) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + // Add Apple Color Emoji fallback. + QFont::insertSubstitution(font, qsl("Apple Color Emoji")); +#endif + auto console = CONSOLE(L, windowName); if (console == host.mpConsole) { // apply changes to main console and its while-scrolling component too. diff --git a/src/XMLimport.cpp b/src/XMLimport.cpp index b3fd81b1425..e71238fbaf0 100644 --- a/src/XMLimport.cpp +++ b/src/XMLimport.cpp @@ -1159,6 +1159,10 @@ void XMLimport::readHost(Host* pHost) // On Linux ensure that emojis are displayed in colour even if // this font doesn't support it: QFont::insertSubstitution(pHost->mDisplayFont.family(), qsl("Noto Color Emoji")); +#endif +#if defined(Q_OS_MACOS) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + // Add Apple Color Emoji fallback. + QFont::insertSubstitution(pHost->mDisplayFont.family(), qsl("Apple Color Emoji")); #endif pHost->setDisplayFontFixedPitch(true); } else if (name() == qsl("mCommandLineFont")) { diff --git a/src/dlgProfilePreferences.cpp b/src/dlgProfilePreferences.cpp index e802b3b12b3..59a573b3c53 100644 --- a/src/dlgProfilePreferences.cpp +++ b/src/dlgProfilePreferences.cpp @@ -1903,6 +1903,11 @@ void dlgProfilePreferences::slot_setDisplayFont() QFont::insertSubstitution(pHost->mDisplayFont.family(), qsl("Noto Color Emoji")); #endif +#if defined(Q_OS_MACOS) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + // Add Apple Color Emoji fallback. + QFont::insertSubstitution(pHost->mDisplayFont.family(), qsl("Apple Color Emoji")); +#endif + auto mainConsole = pHost->mpConsole; if (!mainConsole) { return; diff --git a/src/main.cpp b/src/main.cpp index eee24cb74ee..aaf7f9be924 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -215,6 +215,14 @@ int main(int argc, char* argv[]) QAccessible::installFactory(Announcer::accessibleFactory); #endif +#if defined(Q_OS_MACOS) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + // Apple Color Emoji Fallback + QFont defaultFont; + defaultFont.setFamily(defaultFont.defaultFamily()); + QFont::insertSubstitution(defaultFont.family(), qsl("Apple Color Emoji")); + app->setFont(defaultFont); +#endif + #if defined(Q_OS_WIN32) && defined(INCLUDE_UPDATER) auto abortLaunch = runUpdate(); if (abortLaunch) { diff --git a/src/mudlet.cpp b/src/mudlet.cpp index 21e95a9ed6b..23d0ca5f343 100644 --- a/src/mudlet.cpp +++ b/src/mudlet.cpp @@ -481,6 +481,10 @@ void mudlet::init() } const QFont mainFont = QFont(qsl("Bitstream Vera Sans Mono"), 8, QFont::Normal); + #if defined(Q_OS_MACOS) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + // Add Apple Color Emoji fallback. + QFont::insertSubstitution(mainFont.family(), qsl("Apple Color Emoji")); + #endif mpWidget_profileContainer->setFont(mainFont); mpWidget_profileContainer->show();