Merge pull request #17504 from endragor/fix-oversampling-autowrap

Ceil dynamic font glyph size
This commit is contained in:
Juan Linietsky 2018-05-07 18:21:11 -03:00 committed by GitHub
commit 7175a7f025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}