diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-04-09 12:53:06 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-04-09 13:10:03 +0300 |
commit | 020c4e19f2b8334cce776caae43c343842ace3f7 (patch) | |
tree | 119ad875667b33ca4e0368a020593c1ab9a295e5 /source/blender/blenfont | |
parent | 209c5cebb06abc06f7afd6b70298cf14a7138b64 (diff) |
BLF: Fix assert when drawing very small chars.
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/intern/blf_glyph.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index 21c11d96b07..6ab95e0a59a 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -230,7 +230,7 @@ static void blf_glyph_cache_texture(FontBLF *font, GlyphCacheBLF *gc) } i = (int)((gc->p2_width - (gc->pad * 2)) / gc->glyph_width_max); - gc->p2_height = (int)blf_next_p2((unsigned int)(((gc->glyphs_len_max / i) + 1) * gc->glyph_height_max)); + gc->p2_height = (int)blf_next_p2((unsigned int)(((gc->glyphs_len_max / i) + 1) * gc->glyph_height_max + (gc->pad * 2))); if (gc->p2_height > font->tex_size_max) { gc->p2_height = font->tex_size_max; |