From 16eceadc7ecdbb07bbaac66ea7b5d684b226f729 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 5 Apr 2023 19:01:19 +0200 Subject: [PATCH] - fixed handling for Turkish i's. * islowermap and isuppermap were not set for the new characters. * special handling for the lowercase dotted i in allcaps fonts returned the wrong character. --- src/common/fonts/font.cpp | 2 +- src/common/utility/utf8.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/fonts/font.cpp b/src/common/fonts/font.cpp index 7028ee33d..3876dd7ea 100644 --- a/src/common/fonts/font.cpp +++ b/src/common/fonts/font.cpp @@ -763,7 +763,7 @@ int FFont::GetCharCode(int code, bool needpic) const // a similar check is needed for the small i in allcaps fonts. Here we cannot simply remap to an existing character, so the small dotted i must be placed at code point 0080. if (code == 'i' && LastChar >= 0x80 && Chars[0x80 - FirstChar].OriginalPic != nullptr) { - return 0x131; + return 0x80; } } diff --git a/src/common/utility/utf8.cpp b/src/common/utility/utf8.cpp index e5b52347b..100c06a13 100644 --- a/src/common/utility/utf8.cpp +++ b/src/common/utility/utf8.cpp @@ -1138,6 +1138,8 @@ struct InitLowerUpper // Turkish 'I's. upperforlower[0x131] = 'I'; lowerforupper[0x130] = 'i'; + islowermap[0x131] = true; + isuppermap[0x130] = true; } };