summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-05-07 18:21:11 -0300
committerGitHub <noreply@github.com>2018-05-07 18:21:11 -0300
commit7175a7f02532eba6232c3bedb206c77103213b6d (patch)
tree4582dc15f84e38cfb8aac9e9a5c413b68140b50a /scene
parent7b065a59fa1d413b4199bdd3e998cba717ebe90c (diff)
parentaa8561ded403020f0292450e7a7af75eaf001e94 (diff)
Merge pull request #17504 from endragor/fix-oversampling-autowrap
Ceil dynamic font glyph size
Diffstat (limited to 'scene')
-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 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;
}