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:
Diffstat (limited to 'source/blender/blenfont/intern/blf_font.c')
-rw-r--r--source/blender/blenfont/intern/blf_font.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 02b66993c0a..1900efa2dbc 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -174,7 +174,7 @@ void blf_font_draw(FontBLF *font, const char *str, size_t len)
blf_font_ensure_ascii_table(font);
- while (str[i] && i < len) {
+ while ((i < len) && str[i]) {
BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
if (c == BLI_UTF8_ERR)
@@ -430,8 +430,8 @@ void blf_font_width_and_height(FontBLF *font, const char *str, float *width, flo
}
blf_font_boundbox(font, str, &box);
- *width = (BLI_RCT_SIZE_X(&box) * xa);
- *height = (BLI_RCT_SIZE_Y(&box) * ya);
+ *width = (BLI_rctf_size_x(&box) * xa);
+ *height = (BLI_rctf_size_y(&box) * ya);
}
float blf_font_width(FontBLF *font, const char *str)
@@ -445,7 +445,7 @@ float blf_font_width(FontBLF *font, const char *str)
xa = 1.0f;
blf_font_boundbox(font, str, &box);
- return BLI_RCT_SIZE_X(&box) * xa;
+ return BLI_rctf_size_x(&box) * xa;
}
float blf_font_height(FontBLF *font, const char *str)
@@ -459,7 +459,7 @@ float blf_font_height(FontBLF *font, const char *str)
ya = 1.0f;
blf_font_boundbox(font, str, &box);
- return BLI_RCT_SIZE_Y(&box) * ya;
+ return BLI_rctf_size_y(&box) * ya;
}
float blf_font_fixed_width(FontBLF *font)