summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-26 15:51:13 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-26 15:51:13 +0200
commit9cc4511031a2a522088b5a45ac7b770cc8e7c67c (patch)
tree4ebdc29c3a52aa8de6c99fdd308fbde8e526a652 /modules
parent59f6233075c0f030d030afba46be83784411d284 (diff)
parent970592274d4aa91fbe41682faec7b7ec00bec6a2 (diff)
Merge pull request #66434 from bruvzg/rtl_fix_def_ot
[RTL] Fix font variations / OpenType features of theme default font not updated when default font is changed.
Diffstat (limited to 'modules')
-rw-r--r--modules/text_server_adv/text_server_adv.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp
index 1a4831857f..3565254ac7 100644
--- a/modules/text_server_adv/text_server_adv.cpp
+++ b/modules/text_server_adv/text_server_adv.cpp
@@ -3826,19 +3826,11 @@ void TextServerAdvanced::shaped_set_span_update_font(const RID &p_shaped, int64_
ERR_FAIL_INDEX(p_index, sd->spans.size());
ShapedTextDataAdvanced::Span &span = sd->spans.ptrw()[p_index];
- bool changed = (span.font_size != p_size) || (span.features != p_opentype_features) || (p_fonts.size() != span.fonts.size());
- if (!changed) {
- for (int i = 0; i < p_fonts.size(); i++) {
- changed = changed || (span.fonts[i] != p_fonts[i]);
- }
- }
- if (changed) {
- span.fonts = p_fonts;
- span.font_size = p_size;
- span.features = p_opentype_features;
+ span.fonts = p_fonts;
+ span.font_size = p_size;
+ span.features = p_opentype_features;
- invalidate(sd, false);
- }
+ invalidate(sd, false);
}
bool TextServerAdvanced::shaped_text_add_string(const RID &p_shaped, const String &p_text, const TypedArray<RID> &p_fonts, int64_t p_size, const Dictionary &p_opentype_features, const String &p_language, const Variant &p_meta) {