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()