diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-09-25 23:05:17 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-09-25 23:07:30 +0300 |
commit | 8cdb482738604f191f67bde23a812711d0146dab (patch) | |
tree | 7236befb8fd241cc19fc61d71adf42e7e7b810a5 /modules/text_server_adv | |
parent | ef266183598401d89482c5d2035d7e4cd3f64cb9 (diff) |
[TextServer] Always prefer main font over fallbacks, regardless of script/language support.
Diffstat (limited to 'modules/text_server_adv')
-rw-r--r-- | modules/text_server_adv/text_server_adv.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index c97a6ef289..1a4831857f 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -5430,7 +5430,10 @@ bool TextServerAdvanced::shaped_text_shape(const RID &p_shaped) { Array fonts_scr_only; Array fonts_no_match; int font_count = span.fonts.size(); - for (int l = 0; l < font_count; l++) { + if (font_count > 0) { + fonts.push_back(sd->spans[k].fonts[0]); + } + for (int l = 1; l < font_count; l++) { if (font_is_script_supported(span.fonts[l], script)) { if (font_is_language_supported(span.fonts[l], span.language)) { fonts.push_back(sd->spans[k].fonts[l]); |