summaryrefslogtreecommitdiff
path: root/scene/resources/dynamic_font.cpp
diff options
context:
space:
mode:
authorAkeru <akerudesu@gmail.com>2018-10-02 21:55:06 +0200
committerAkeru <akerudesu@gmail.com>2018-10-03 17:25:28 +0200
commit81fa121909f554157cff789354d6d0b32a90d296 (patch)
tree37ef074c61871cde123a572514115b3802d4c040 /scene/resources/dynamic_font.cpp
parentb05efd98ffe3036b05e501b26ed2ee811161ee11 (diff)
Fix fallback font oversampling.
Diffstat (limited to 'scene/resources/dynamic_font.cpp')
-rw-r--r--scene/resources/dynamic_font.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 0785d3bfc6..6790c35c4b 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<DynamicFont>(E->self()));
}
+
E = E->next();
}