From 1ae11f71ff6f076ebc428dc949c5b2a0339aa1e4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 16 Jul 2014 11:09:42 +1000 Subject: BLF: avoid float/int conversion drawing glyphs also use UNLIKELY for error cases --- source/blender/blenfont/intern/blf_glyph.c | 1 + 1 file changed, 1 insertion(+) (limited to '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 7c3cfa30e16..bfb42f69077 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -279,6 +279,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c) } g->advance = ((float)slot->advance.x) / 64.0f; + g->advance_i = (int)g->advance; g->pos_x = (float)slot->bitmap_left; g->pos_y = (float)slot->bitmap_top; g->pitch = slot->bitmap.pitch; -- cgit v1.2.3