mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-29 21:56:54 +02:00
fixes #1482, add one pixel spacing for Chinese fonts
This commit is contained in:
parent
1ea9dab30d
commit
eb6ff6b114
@ -340,7 +340,7 @@ void CBitmapHanFont::renderCharacter(SDL_Surface * surface, int characterIndex,
|
||||
colorPutter(dstPixel, color.r, color.g, color.b);
|
||||
}
|
||||
}
|
||||
posX += size;
|
||||
posX += size + 1;
|
||||
}
|
||||
|
||||
void CBitmapHanFont::renderText(SDL_Surface * surface, const std::string & data, const SDL_Color & color, const Point & pos) const
|
||||
@ -373,12 +373,12 @@ CBitmapHanFont::CBitmapHanFont(const JsonNode &config):
|
||||
|
||||
size_t CBitmapHanFont::getLineHeight() const
|
||||
{
|
||||
return size;
|
||||
return size + 1;
|
||||
}
|
||||
|
||||
size_t CBitmapHanFont::getGlyphWidth(const char * data) const
|
||||
{
|
||||
return size;
|
||||
return size + 1;
|
||||
}
|
||||
|
||||
size_t CBitmapHanFont::getCharacterSize(char data) const
|
||||
|
@ -64,9 +64,12 @@ void CModManager::loadMods()
|
||||
for (auto modname : installedMods)
|
||||
{
|
||||
ResourceID resID("Mods/" + modname + "/mod.json");
|
||||
std::string name = *CResourceHandler::get()->getResourceName(resID);
|
||||
auto mod = JsonUtils::JsonFromFile(QString::fromUtf8(name.c_str()));
|
||||
localMods.insert(QString::fromUtf8(modname.c_str()).toLower(), mod);
|
||||
if (CResourceHandler::get()->existsResource(resID))
|
||||
{
|
||||
std::string name = *CResourceHandler::get()->getResourceName(resID);
|
||||
auto mod = JsonUtils::JsonFromFile(QString::fromUtf8(name.c_str()));
|
||||
localMods.insert(QString::fromUtf8(modname.c_str()).toLower(), mod);
|
||||
}
|
||||
}
|
||||
modList->setLocalModList(localMods);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user