forked from mirror/openmw-tes3mp
Use question mark for not found glyphs in the font
This commit is contained in:
parent
cefa20bfb9
commit
85c9871178
1 changed files with 15 additions and 3 deletions
|
@ -265,18 +265,30 @@ namespace MWGui
|
||||||
cursorCode->addAttribute("bearing", MyGUI::utility::toString(data[i].kerning) + " "
|
cursorCode->addAttribute("bearing", MyGUI::utility::toString(data[i].kerning) + " "
|
||||||
+ MyGUI::utility::toString((fontSize-data[i].ascent)));
|
+ MyGUI::utility::toString((fontSize-data[i].ascent)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Question mark, use for NotDefined marker (used for glyphs not existing in the font)
|
||||||
|
if (i == 63)
|
||||||
|
{
|
||||||
|
MyGUI::xml::ElementPtr cursorCode = codes->createChild("Code");
|
||||||
|
cursorCode->addAttribute("index", MyGUI::FontCodeType::NotDefined);
|
||||||
|
cursorCode->addAttribute("coord", MyGUI::utility::toString(x1) + " "
|
||||||
|
+ MyGUI::utility::toString(y1) + " "
|
||||||
|
+ MyGUI::utility::toString(w) + " "
|
||||||
|
+ MyGUI::utility::toString(h));
|
||||||
|
cursorCode->addAttribute("advance", data[i].width);
|
||||||
|
cursorCode->addAttribute("bearing", MyGUI::utility::toString(data[i].kerning) + " "
|
||||||
|
+ MyGUI::utility::toString((fontSize-data[i].ascent)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// These are required as well, but the fonts don't provide them
|
// These are required as well, but the fonts don't provide them
|
||||||
for (int i=0; i<3; ++i)
|
for (int i=0; i<2; ++i)
|
||||||
{
|
{
|
||||||
MyGUI::FontCodeType::Enum type;
|
MyGUI::FontCodeType::Enum type;
|
||||||
if(i == 0)
|
if(i == 0)
|
||||||
type = MyGUI::FontCodeType::Selected;
|
type = MyGUI::FontCodeType::Selected;
|
||||||
else if (i == 1)
|
else if (i == 1)
|
||||||
type = MyGUI::FontCodeType::SelectedBack;
|
type = MyGUI::FontCodeType::SelectedBack;
|
||||||
else if (i == 2)
|
|
||||||
type = MyGUI::FontCodeType::NotDefined;
|
|
||||||
|
|
||||||
MyGUI::xml::ElementPtr cursorCode = codes->createChild("Code");
|
MyGUI::xml::ElementPtr cursorCode = codes->createChild("Code");
|
||||||
cursorCode->addAttribute("index", type);
|
cursorCode->addAttribute("index", type);
|
||||||
|
|
Loading…
Reference in a new issue