summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/dynamic_font.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 5704212831..99a2881d58 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -192,7 +192,7 @@ Error DynamicFontAtSize::_load() {
ERR_FAIL_V_MSG(ERR_FILE_CANT_OPEN, "Error loading font.");
}
- if (FT_HAS_COLOR(face)) {
+ if (FT_HAS_COLOR(face) && face->num_fixed_sizes > 0) {
int best_match = 0;
int diff = ABS(id.size - ((int64_t)face->available_sizes[0].width));
scale_color_font = float(id.size) / face->available_sizes[0].width;