From 9b1fb9586591f778d57857535ef170e16810b6ed Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 2 Sep 2022 21:03:19 +0200 Subject: [PATCH] Enabled linear interpolation for font texture minifications. --- es-core/src/resources/Font.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/es-core/src/resources/Font.cpp b/es-core/src/resources/Font.cpp index 191127cff..2bb58add3 100644 --- a/es-core/src/resources/Font.cpp +++ b/es-core/src/resources/Font.cpp @@ -21,6 +21,7 @@ std::map, std::weak_ptr> Font::sFontMap; Font::Font(int size, const std::string& path) : mRenderer {Renderer::getInstance()} , mSize(size) + , mMaxGlyphHeight {0} , mPath(path) { if (mSize < 9) { @@ -32,8 +33,6 @@ Font::Font(int size, const std::string& path) LOG(LogWarning) << "Requested font size too large, changing to maximum supported size"; } - mMaxGlyphHeight = 0; - if (!sLibrary) initLibrary(); @@ -592,7 +591,7 @@ void Font::FontTexture::initTexture() { assert(textureId == 0); textureId = Renderer::getInstance()->createTexture( - Renderer::TextureType::RED, false, false, false, textureSize.x, textureSize.y, nullptr); + Renderer::TextureType::RED, true, false, false, textureSize.x, textureSize.y, nullptr); } void Font::FontTexture::deinitTexture()