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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-07-08 17:09:28 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-07-08 17:11:55 +0300
commit6546442f4f0a275a15969e1daefcc8e0f5fa8f54 (patch)
tree74243e8b25c9676b44fb25a9ccdb3bd015edb69a /source/blender/editors/curve/editfont.c
parent9cb1810551a257043f1f6db7e320b690ff4391f4 (diff)
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! ;)
Diffstat (limited to 'source/blender/editors/curve/editfont.c')
-rw-r--r--source/blender/editors/curve/editfont.c16
1 files changed, 8 insertions, 8 deletions
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 == '+') {