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:
authorCampbell Barton <campbell@blender.org>2022-02-04 05:48:02 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2022-04-11 01:28:55 +0300
commitdb86d3199c118b9edcb297b58df1e864424d8503 (patch)
tree1870ff1a916a8f020b50c469b973bd1d099ad2e9 /source/blender/editors/space_text
parentcd91b0fd184aa2bc4f377869a1583750efad8b0f (diff)
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).
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_draw.c2
1 files changed, 1 insertions, 1 deletions
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;
}