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:
authorHarley Acheson <harley.acheson@gmail.com>2022-07-29 03:28:05 +0300
committerHarley Acheson <harley.acheson@gmail.com>2022-07-29 03:28:05 +0300
commit848dd4a40afed8874abfb499100f09ff291ce14e (patch)
treedcf3978527439c9b7ab368c9ad9fa4ebb225cd3a
parente261290cb61696548ced2b8fe667ca2e4a67d6ee (diff)
BLF: Don't Print Empty Strings
Optimize font drawing by skipping empty strings. See D15472 for more details. Differential Revision: https://developer.blender.org/D15472 Reviewed by Campbell Barton
-rw-r--r--source/blender/blenfont/intern/blf_font.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 038e73cc928..0efd3537a32 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -836,7 +836,7 @@ static void blf_font_boundbox_foreach_glyph_ex(FontBLF *font,
size_t i = 0, i_curr;
rcti gbox_px;
- if (str_len == 0) {
+ if (str_len == 0 || str[0] == 0) {
/* early output. */
return;
}