[Bf-blender-cvs] [020c4e19f2b] blender2.8: BLF: Fix assert when drawing very small chars.
Clément Foucault
noreply at git.blender.org
Mon Apr 9 12:03:30 CEST 2018
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;
More information about the Bf-blender-cvs
mailing list