From 6546442f4f0a275a15969e1daefcc8e0f5fa8f54 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 8 Jul 2019 16:09:28 +0200 Subject: Fix (unreported) broken 'compse' feature when editing text. Looks like that code was not updated when we switched to unicode, it was still returning axtended ascii codes (iso-8859-15 ones I think)... That was breaking some chars, which have a very different value in unicode. Found while working on Text section of the Manual! ;) --- source/blender/editors/curve/editfont.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/curve/editfont.c') diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index ffbfb692ca9..db3d5ad401d 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -73,9 +73,9 @@ static int kill_selection(Object *obedit, int ins); /************************* utilities ******************************/ -static char findaccent(char char1, unsigned int code) +static wchar_t findaccent(wchar_t char1, unsigned int code) { - char new = 0; + wchar_t new = 0; if (char1 == 'a') { if (code == '`') { @@ -170,7 +170,7 @@ static char findaccent(char char1, unsigned int code) new = 186; } else if (code == 'e') { - new = 143; + new = 339; } else if (code == 'c') { new = 169; @@ -191,7 +191,7 @@ static char findaccent(char char1, unsigned int code) } else if (char1 == 't') { if (code == 'm') { - new = 153; + new = 8482; } } else if (char1 == 'u') { @@ -342,7 +342,7 @@ static char findaccent(char char1, unsigned int code) new = 247; } if (code == '|') { - new = 135; + new = 8224; } if (code == '+') { new = 177; @@ -350,15 +350,15 @@ static char findaccent(char char1, unsigned int code) } else if (char1 == '|') { if (code == '-') { - new = 135; + new = 8224; } if (code == '=') { - new = 136; + new = 8225; } } else if (char1 == '=') { if (code == '|') { - new = 136; + new = 8225; } } else if (char1 == '+') { -- cgit v1.2.3