mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-30 01:55:39 +00:00
Enabled linear interpolation for all font rendering regardless of resolution.
This commit is contained in:
parent
d36e64e23a
commit
e8c74450a0
|
@ -66,10 +66,6 @@ void Font::initLibrary()
|
||||||
sLibrary = nullptr;
|
sLibrary = nullptr;
|
||||||
LOG(LogError) << "Couldn't initialize FreeType";
|
LOG(LogError) << "Couldn't initialize FreeType";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Whether to enable linear interpolation for font texture magnification (a size of 90
|
|
||||||
// means approximately 1920x1080).
|
|
||||||
mHighResolution = FONT_SIZE_LARGE > 90;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> Font::getFallbackFontPaths()
|
std::vector<std::string> Font::getFallbackFontPaths()
|
||||||
|
@ -594,9 +590,8 @@ bool Font::FontTexture::findEmpty(const glm::ivec2& size, glm::ivec2& cursor_out
|
||||||
void Font::FontTexture::initTexture()
|
void Font::FontTexture::initTexture()
|
||||||
{
|
{
|
||||||
assert(textureId == 0);
|
assert(textureId == 0);
|
||||||
textureId =
|
textureId = Renderer::getInstance()->createTexture(
|
||||||
Renderer::getInstance()->createTexture(Renderer::TextureType::RED, true, mHighResolution,
|
Renderer::TextureType::RED, true, true, false, textureSize.x, textureSize.y, nullptr);
|
||||||
false, textureSize.x, textureSize.y, nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Font::FontTexture::deinitTexture()
|
void Font::FontTexture::deinitTexture()
|
||||||
|
|
|
@ -175,7 +175,6 @@ private:
|
||||||
int mSize;
|
int mSize;
|
||||||
int mMaxGlyphHeight;
|
int mMaxGlyphHeight;
|
||||||
const std::string mPath;
|
const std::string mPath;
|
||||||
static inline bool mHighResolution {false};
|
|
||||||
|
|
||||||
float getNewlineStartOffset(const std::string& text,
|
float getNewlineStartOffset(const std::string& text,
|
||||||
const unsigned int& charStart,
|
const unsigned int& charStart,
|
||||||
|
|
Loading…
Reference in a new issue