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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user