mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
Fixed love.graphics.newFont using the wrong texture format when creating its glyph texture
This commit is contained in:
@@ -71,6 +71,8 @@ Font::Font(love::font::Rasterizer *r, const Image::Filter &filter)
|
||||
try
|
||||
{
|
||||
gd = r->getGlyphData(32);
|
||||
type = (gd->getFormat() == love::font::GlyphData::FORMAT_LUMINANCE_ALPHA) ? FONT_TRUETYPE : FONT_IMAGE;
|
||||
|
||||
loadVolatile();
|
||||
}
|
||||
catch (love::Exception &)
|
||||
@@ -79,7 +81,6 @@ Font::Font(love::font::Rasterizer *r, const Image::Filter &filter)
|
||||
throw;
|
||||
}
|
||||
|
||||
type = (gd->getFormat() == love::font::GlyphData::FORMAT_LUMINANCE_ALPHA) ? FONT_TRUETYPE : FONT_IMAGE;
|
||||
delete gd;
|
||||
|
||||
rasterizer->retain();
|
||||
|
||||
Reference in New Issue
Block a user