mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-09 13:14:02 +02:00
Merge pull request #4633 from Laserlicht/xbrz_fix
fix xbrz font fallback
This commit is contained in:
commit
8a18d92a8e
@ -96,7 +96,7 @@ size_t CTrueTypeFont::getGlyphWidth(const char *data) const
|
|||||||
size_t CTrueTypeFont::getStringWidth(const std::string & data) const
|
size_t CTrueTypeFont::getStringWidth(const std::string & data) const
|
||||||
{
|
{
|
||||||
if (fallbackFont && fallbackFont->canRepresentString(data))
|
if (fallbackFont && fallbackFont->canRepresentString(data))
|
||||||
return fallbackFont->getStringWidth(data) / getScalingFactor();
|
return fallbackFont->getStringWidth(data);
|
||||||
|
|
||||||
int width;
|
int width;
|
||||||
TTF_SizeUTF8(font.get(), data.c_str(), &width, nullptr);
|
TTF_SizeUTF8(font.get(), data.c_str(), &width, nullptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user