Skip to content

Commit 6b17d35

Browse files
committed
Merge pull request #112436 from bruvzg/emof
[TextServer] Improve font fallback for emojis.
2 parents 522fa8d + 23907cd commit 6b17d35

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

modules/text_server_adv/text_server_adv.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5689,6 +5689,15 @@ RID TextServerAdvanced::_find_sys_font_for_text(const RID &p_fdef, const String
56895689
if (dvar.has(ital_tag) && dvar[ital_tag].operator int() == 1) {
56905690
font_style.set_flag(TextServer::FONT_ITALIC);
56915691
}
5692+
if (p_script_code == "Zsye") {
5693+
#if defined(MACOS_ENABLED) || defined(APPLE_EMBEDDED_ENABLED)
5694+
font_name = "Apple Color Emoji";
5695+
#elif defined(WINDOWS_ENABLED)
5696+
font_name = "Segoe UI Emoji";
5697+
#else
5698+
font_name = "Noto Color Emoji";
5699+
#endif
5700+
}
56925701

56935702
String locale = (p_language.is_empty()) ? TranslationServer::get_singleton()->get_tool_locale() : p_language;
56945703
PackedStringArray fallback_font_name = OS::get_singleton()->get_system_font_path_for_text(font_name, p_text, locale, p_script_code, font_weight, font_stretch, font_style & TextServer::FONT_ITALIC);

0 commit comments

Comments
 (0)