mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-04 23:17:41 +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);
|
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
|
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
|
size_t CBitmapHanFont::getLineHeight() const
|
||||||
{
|
{
|
||||||
return size;
|
return size + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t CBitmapHanFont::getGlyphWidth(const char * data) const
|
size_t CBitmapHanFont::getGlyphWidth(const char * data) const
|
||||||
{
|
{
|
||||||
return size;
|
return size + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t CBitmapHanFont::getCharacterSize(char data) const
|
size_t CBitmapHanFont::getCharacterSize(char data) const
|
||||||
|
@ -64,9 +64,12 @@ void CModManager::loadMods()
|
|||||||
for (auto modname : installedMods)
|
for (auto modname : installedMods)
|
||||||
{
|
{
|
||||||
ResourceID resID("Mods/" + modname + "/mod.json");
|
ResourceID resID("Mods/" + modname + "/mod.json");
|
||||||
std::string name = *CResourceHandler::get()->getResourceName(resID);
|
if (CResourceHandler::get()->existsResource(resID))
|
||||||
auto mod = JsonUtils::JsonFromFile(QString::fromUtf8(name.c_str()));
|
{
|
||||||
localMods.insert(QString::fromUtf8(modname.c_str()).toLower(), mod);
|
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);
|
modList->setLocalModList(localMods);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user