mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 18:59:57 +00:00
Use case-insensitive font keys, remove debug code
This commit is contained in:
parent
c47a48e25d
commit
8fc3635c2c
1 changed files with 5 additions and 4 deletions
|
@ -219,7 +219,6 @@ namespace Gui
|
||||||
for (const auto& name : mVFS->getRecursiveDirectoryIterator("Fonts/"))
|
for (const auto& name : mVFS->getRecursiveDirectoryIterator("Fonts/"))
|
||||||
{
|
{
|
||||||
std::filesystem::path path = name;
|
std::filesystem::path path = name;
|
||||||
std::cout << name << std::endl;
|
|
||||||
if (Misc::getFileExtension(name) == "omwfont")
|
if (Misc::getFileExtension(name) == "omwfont")
|
||||||
MyGUI::ResourceManager::getInstance().load(path.filename());
|
MyGUI::ResourceManager::getInstance().load(path.filename());
|
||||||
}
|
}
|
||||||
|
@ -625,11 +624,13 @@ namespace Gui
|
||||||
|
|
||||||
std::string FontLoader::getInternalFontName(const std::string& name)
|
std::string FontLoader::getInternalFontName(const std::string& name)
|
||||||
{
|
{
|
||||||
if (name == Settings::Manager::getString("default font", "GUI"))
|
const std::string lowerName = Misc::StringUtils::lowerCase(name);
|
||||||
|
|
||||||
|
if (lowerName == Misc::StringUtils::lowerCase(Settings::Manager::getString("default font", "GUI")))
|
||||||
return "DefaultFont";
|
return "DefaultFont";
|
||||||
if (name == Settings::Manager::getString("scroll font", "GUI"))
|
if (lowerName == Misc::StringUtils::lowerCase(Settings::Manager::getString("scroll font", "GUI")))
|
||||||
return "ScrollFont";
|
return "ScrollFont";
|
||||||
if (name == Settings::Manager::getString("mono font", "GUI"))
|
if (lowerName == Misc::StringUtils::lowerCase(Settings::Manager::getString("mono font", "GUI")))
|
||||||
return "MonoFont";
|
return "MonoFont";
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
|
|
Loading…
Reference in a new issue