Text drawing performance improvements (issue #532)

This commit is contained in:
Alexander Szpakowski
2012-12-15 22:18:40 +01:00
parent 68a895e7c6
commit a8dc813258
3 changed files with 263 additions and 102 deletions
+10 -2
View File
@@ -290,8 +290,16 @@ int w_newFont(lua_State *L)
love::font::Rasterizer *rasterizer = luax_checktype<love::font::Rasterizer>(L, 1, "Rasterizer", FONT_RASTERIZER_T);
// Create the font.
Font *font = instance->newFont(rasterizer, instance->getDefaultImageFilter());
Font *font = NULL;
try
{
// Create the font.
font = instance->newFont(rasterizer, instance->getDefaultImageFilter());
}
catch (love::Exception &e)
{
return luaL_error(L, e.what());
}
if (font == 0)
return luaL_error(L, "Could not load font.");