diff --git a/main.lua b/main.lua index 4815cf0..9515b77 100644 --- a/main.lua +++ b/main.lua @@ -34,8 +34,11 @@ end function renderer.draw_text(font, text, x, y, color) renderer.set_litecolor(color) love.graphics.setFont(font.font) - love.graphics.print(text, x, y) - return x + font.font:getWidth(text) + if pcall(function() love.graphics.print(text, x, y) end) then + return x + font.font:getWidth(text) + else + return x + end end renderer.font = {}