mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Add another french morrowind font workaround (Fixes #1447)
This commit is contained in:
parent
1bab74a98d
commit
e796fa2313
@ -258,12 +258,16 @@ namespace MWGui
|
|||||||
code->addAttribute("bearing", MyGUI::utility::toString(data[i].kerning) + " "
|
code->addAttribute("bearing", MyGUI::utility::toString(data[i].kerning) + " "
|
||||||
+ MyGUI::utility::toString((fontSize-data[i].ascent)));
|
+ MyGUI::utility::toString((fontSize-data[i].ascent)));
|
||||||
|
|
||||||
// More hacks! The french game uses U+2019, which is nowhere to be found in
|
// More hacks! The french game uses several win1252 characters that are not included
|
||||||
// the CP437 encoding of the font. Fall back to 39 (regular apostrophe)
|
// in the cp437 encoding of the font. Fall back to similar available characters.
|
||||||
if (i == 39 && mEncoding == ToUTF8::CP437)
|
// Same for U+2013
|
||||||
|
std::map<int, int> additional;
|
||||||
|
additional[39] = 0x2019; // apostrophe
|
||||||
|
additional[45] = 0x2013; // dash
|
||||||
|
if (additional.find(i) != additional.end() && mEncoding == ToUTF8::CP437)
|
||||||
{
|
{
|
||||||
MyGUI::xml::ElementPtr code = codes->createChild("Code");
|
MyGUI::xml::ElementPtr code = codes->createChild("Code");
|
||||||
code->addAttribute("index", 0x2019);
|
code->addAttribute("index", additional[i]);
|
||||||
code->addAttribute("coord", MyGUI::utility::toString(x1) + " "
|
code->addAttribute("coord", MyGUI::utility::toString(x1) + " "
|
||||||
+ MyGUI::utility::toString(y1) + " "
|
+ MyGUI::utility::toString(y1) + " "
|
||||||
+ MyGUI::utility::toString(w) + " "
|
+ MyGUI::utility::toString(w) + " "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user