diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-05-07 18:21:11 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-07 18:21:11 -0300 |
commit | 7175a7f02532eba6232c3bedb206c77103213b6d (patch) | |
tree | 4582dc15f84e38cfb8aac9e9a5c413b68140b50a | |
parent | 7b065a59fa1d413b4199bdd3e998cba717ebe90c (diff) | |
parent | aa8561ded403020f0292450e7a7af75eaf001e94 (diff) |
Merge pull request #17504 from endragor/fix-oversampling-autowrap
Ceil dynamic font glyph size
-rw-r--r-- | scene/resources/dynamic_font.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 26e29b3ccb..3d825b5a27 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; } |