- 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.
This commit is contained in:
Christoph Oelckers 2023-04-05 19:01:19 +02:00
parent 78ef506f5f
commit e3f8230035
2 changed files with 3 additions and 1 deletions

View file

@ -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. // 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) if (code == 'i' && LastChar >= 0x80 && Chars[0x80 - FirstChar].OriginalPic != nullptr)
{ {
return 0x131; return 0x80;
} }
} }

View file

@ -1138,6 +1138,8 @@ struct InitLowerUpper
// Turkish 'I's. // Turkish 'I's.
upperforlower[0x131] = 'I'; upperforlower[0x131] = 'I';
lowerforupper[0x130] = 'i'; lowerforupper[0x130] = 'i';
islowermap[0x131] = true;
isuppermap[0x130] = true;
} }
}; };