Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-22 01:26:04 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-22 01:26:04 +0400
commit3448f675cb20ad38691a4d40ed90f44722243ae9 (patch)
treedb38a231c678e039b57add6f524ea794961689cc /source/blender/blenfont
parentd601a51e03ca0dc8d714b36ad7ae7a5005119bc3 (diff)
Fix #19427, problem in blenfont not computing the width of text correct,
particularly text including spaces. This gave some problems with placing the cursor and selection, and clipping text inside buttons.
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf_font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 0a3dd259f6c..8721e49f06b 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -353,8 +353,8 @@ void blf_font_boundbox(FontBLF *font, char *str, rctf *box)
pen_x += delta.x >> 6;
}
- gbox.xmin= g->box.xmin + pen_x;
- gbox.xmax= g->box.xmax + pen_x;
+ gbox.xmin= pen_x;
+ gbox.xmax= pen_x + g->advance;
gbox.ymin= g->box.ymin + pen_y;
gbox.ymax= g->box.ymax + pen_y;