diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-12-10 22:09:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 22:09:04 +0100 |
commit | a4131b61b10cb3a7fe0e1e76ed11dfebfa55e7e6 (patch) | |
tree | 0d8346c87cccb4a9c760c00b04b35e46f2bffd4c | |
parent | 21136aaf9ae679f76f52b7ffa9703480ba555403 (diff) | |
parent | 3395539ed457618f55321f78472357010903b588 (diff) |
Merge pull request #69857 from bruvzg/bim_font_no_clean
[TextServer] Do not clean up font texture cache when setting `allow_system_fallback` property.
-rw-r--r-- | modules/text_server_adv/text_server_adv.cpp | 5 | ||||
-rw-r--r-- | modules/text_server_fb/text_server_fb.cpp | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/modules/text_server_adv/text_server_adv.cpp b/modules/text_server_adv/text_server_adv.cpp index 27fab88956..cf77d0ed7f 100644 --- a/modules/text_server_adv/text_server_adv.cpp +++ b/modules/text_server_adv/text_server_adv.cpp @@ -2151,10 +2151,7 @@ void TextServerAdvanced::_font_set_allow_system_fallback(const RID &p_font_rid, ERR_FAIL_COND(!fd); MutexLock lock(fd->mutex); - if (fd->allow_system_fallback != p_allow_system_fallback) { - _font_clear_cache(fd); - fd->allow_system_fallback = p_allow_system_fallback; - } + fd->allow_system_fallback = p_allow_system_fallback; } bool TextServerAdvanced::_font_is_allow_system_fallback(const RID &p_font_rid) const { diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index 9133c277bb..353d370f14 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -1246,10 +1246,7 @@ void TextServerFallback::_font_set_allow_system_fallback(const RID &p_font_rid, ERR_FAIL_COND(!fd); MutexLock lock(fd->mutex); - if (fd->allow_system_fallback != p_allow_system_fallback) { - _font_clear_cache(fd); - fd->allow_system_fallback = p_allow_system_fallback; - } + fd->allow_system_fallback = p_allow_system_fallback; } bool TextServerFallback::_font_is_allow_system_fallback(const RID &p_font_rid) const { |