Fix initial texture atlas size of fonts with high dpi scales

This commit is contained in:
Sasha Szpakowski
2024-07-06 15:31:11 -03:00
parent 0e517c286a
commit c1fddfe3bc
+2 -1
View File
@@ -71,7 +71,8 @@ Font::Font(love::font::Rasterizer *r, const SamplerState &s)
// largest texture size if no rough match is found.
while (true)
{
if ((shaper->getHeight() * 0.8) * shaper->getHeight() * 30 <= textureWidth * textureHeight)
float dpiscale = r->getDPIScale();
if ((shaper->getHeight() * 0.8 * dpiscale) * shaper->getHeight() * 30 * dpiscale <= textureWidth * textureHeight)
break;
TextureSize nextsize = getNextTextureSize();