From 81fa121909f554157cff789354d6d0b32a90d296 Mon Sep 17 00:00:00 2001 From: Akeru Date: Tue, 2 Oct 2018 21:55:06 +0200 Subject: [PATCH] Fix fallback font oversampling. --- scene/resources/dynamic_font.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 0785d3bfc6b..6790c35c4b5 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -1083,8 +1083,19 @@ void DynamicFont::update_oversampling() { E->self()->outline_data_at_size->update_oversampling(); } + for (int i = 0; i < E->self()->fallback_data_at_size.size(); i++) { + if (E->self()->fallback_data_at_size[i].is_valid()) { + E->self()->fallback_data_at_size.write[i]->update_oversampling(); + + if (E->self()->has_outline() && E->self()->fallback_outline_data_at_size[i].is_valid()) { + E->self()->fallback_outline_data_at_size.write[i]->update_oversampling(); + } + } + } + changed.push_back(Ref(E->self())); } + E = E->next(); }