From ce98d6ae17abbc7322d8f41bbdecc4dcba04c6b9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Sep 2010 12:35:02 +0000 Subject: fix for own bug for font buffer drawing (only effected the bottom line of the stamp) --- source/blender/blenfont/intern/blf_font.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/blender/blenfont') diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 4c7e6410585..04f40ac825b 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -200,9 +200,14 @@ void blf_font_buffer(FontBLF *font, char *str) } chx= pen_x + ((int)g->pos_x); + chy= (int)font->pos[1] + g->height; - pen_y= (int)font->pos[1] - (g->height - ((int)g->pos_y)); - chy= pen_y - ((int)g->pos_y); + if (g->pitch < 0) { + pen_y = (int)font->pos[1] + (g->height - (int)g->pos_y); + } + else { + pen_y = (int)font->pos[1] - (g->height - (int)g->pos_y); + } if ((chx + g->width) >= 0 && chx < font->bw && (pen_y + g->height) >= 0 && pen_y < font->bh) { /* dont draw beyond the buffer bounds */ -- cgit v1.2.3