Commit: 020c4e19f2b8334cce776caae43c343842ace3f7
Author: Clément Foucault
Date:   Mon Apr 9 11:53:06 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB020c4e19f2b8334cce776caae43c343842ace3f7

BLF: Fix assert when drawing very small chars.

===================================================================

M       source/blender/blenfont/intern/blf_glyph.c

===================================================================

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;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to