From db86d3199c118b9edcb297b58df1e864424d8503 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 4 Feb 2022 13:48:02 +1100 Subject: Cleanup: use mono-space font drawing for single character display This doesn't make a user visible difference since it's only used for brackets at the moment, this is more for general correctness as the width calculation for mono-spaced text drawing is different (as it uses BLI_wcwidth). --- source/blender/editors/space_text/text_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/space_text') diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 8fb55ed9b46..549264ed51a 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -90,7 +90,7 @@ static int text_font_draw(const TextDrawContext *tdc, int x, int y, const char * static int text_font_draw_character(const TextDrawContext *tdc, int x, int y, char c) { BLF_position(tdc->font_id, x, y, 0); - BLF_draw(tdc->font_id, &c, 1); + BLF_draw_mono(tdc->font_id, &c, 1, tdc->cwidth_px); return tdc->cwidth_px; } -- cgit v1.2.3