aboutsummaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorJuan Linietsky2018-05-07 18:21:11 -0300
committerGitHub2018-05-07 18:21:11 -0300
commit7175a7f02532eba6232c3bedb206c77103213b6d (patch)
tree4582dc15f84e38cfb8aac9e9a5c413b68140b50a /scene/resources
parent7b065a59fa1d413b4199bdd3e998cba717ebe90c (diff)
parentaa8561ded403020f0292450e7a7af75eaf001e94 (diff)
downloadgodot-7175a7f02532eba6232c3bedb206c77103213b6d.tar.gz
godot-7175a7f02532eba6232c3bedb206c77103213b6d.tar.zst
godot-7175a7f02532eba6232c3bedb206c77103213b6d.zip
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/dynamic_font.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 26e29b3cc..3d825b5a2 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -308,6 +308,9 @@ Size2 DynamicFontAtSize::get_char_size(CharType p_char, CharType p_next, const V
ret.x += (delta.x >> 6) / oversampling;
}
}
+
+ // ensures oversampled glyphs will have enough space when this value is used by clipping/wrapping algorithms
+ ret.x = Math::ceil(ret.x);
return ret;
}