From 5f19646d7edef02479bccd7e898f072c9e54ac6e Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Wed, 9 Jun 2021 13:37:44 -0700 Subject: Fix T88799: 3DViewport Stats Column Measurements To draw the overlay stats in columns the strings must be measured to find the longest one. In some circumstances this measurement can be incorrect. We draw the text with a specific size yet do not explicitly set the size before calling BLF_size. This patch properly sets the size so that the measurement will match what will be used for output. See T88799 for examples of measurement failure. Differential Revision: https://developer.blender.org/D11504 Reviewed by Hans Goudey --- source/blender/editors/space_info/info_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index cf847fa18a8..ebdf32a1cdb 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -693,7 +693,7 @@ void ED_info_draw_stats( Object *ob = OBACT(view_layer); Object *obedit = OBEDIT_FROM_OBACT(ob); eObjectMode object_mode = ob ? ob->mode : OB_MODE_OBJECT; - const int font_id = BLF_default(); + const int font_id = BLF_set_default(); UI_FontThemeColor(font_id, TH_TEXT_HI); BLF_enable(font_id, BLF_SHADOW); -- cgit v1.2.3