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:
authorCampbell Barton <ideasman42@gmail.com>2015-09-19 07:45:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-09-19 08:22:03 +0300
commitcb27d38cf4463d0c6928a048773acf4f057d8705 (patch)
tree4b09c1e931fe79ff377d4acd3eae916b6ebe6b74 /source/blender/blenfont
parente6a413b1ec354dce94c4a42040d15a3191720de4 (diff)
BLF: correct ResultBLF.width value when wrapping
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 edb982538ff..3f3ca78b6cd 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -670,6 +670,7 @@ static void blf_font_wrap_apply(
size_t i = 0;
GlyphBLF **glyph_ascii_table = font->glyph_cache->glyph_ascii_table;
int lines = 0;
+ int pen_x_next = 0;
BLF_KERNING_VARS(font, has_kerning, kern_mode);
@@ -684,7 +685,6 @@ static void blf_font_wrap_apply(
/* wrap vars */
size_t i_curr = i;
- int pen_x_next;
bool do_draw = false;
BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
@@ -745,7 +745,7 @@ static void blf_font_wrap_apply(
if (r_info) {
r_info->lines = lines;
/* width of last line only (with wrapped lines) */
- r_info->width = pen_x;
+ r_info->width = pen_x_next;
}
}