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
committerCampbell Barton <campbell@blender.org>2022-02-04 06:02:53 +0300
commitd730f79e0eee1d2d6285d4d631339647e47f2303 (patch)
tree0b8dd399cd14460947c9e5b80a54a6dab6ca8ec5 /source/blender/editors/space_text
parent28656293c624612a72224e0c7139471188c1203e (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;
}