From 53ad5a3152a032c40ba3d5af8c36e6fb0b4c713c Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 9 May 2022 20:12:08 +0200 Subject: [PATCH] Fixed an issue where the texture buffer sometimes couldn't fit Chinese characters. --- es-core/src/resources/Font.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/es-core/src/resources/Font.cpp b/es-core/src/resources/Font.cpp index 4b9bcca81..15efaf2f5 100644 --- a/es-core/src/resources/Font.cpp +++ b/es-core/src/resources/Font.cpp @@ -156,10 +156,10 @@ Font::FontTexture::FontTexture(const int mSize) if (screenSizeModifier < 0.45f) extraTextureSize += 4; - // It's not entirely clear if the 20 and 8 constants are correct, but they seem to provide + // It's not entirely clear if the 20 and 16 constants are correct, but they seem to provide // a texture buffer large enough to hold the fonts. This logic is obviously a hack though // and needs to be properly reviewed and improved. - textureSize = glm::ivec2 {mSize * (20 + extraTextureSize), mSize * (8 + extraTextureSize / 2)}; + textureSize = glm::ivec2 {mSize * (20 + extraTextureSize), mSize * (16 + extraTextureSize / 2)}; // Make sure the size is not unreasonably large (which may be caused by a mistake in the // theme configuration).