Remove love.graphics.setFont([<file>,] <size>) shorthand, idiom is now love.graphics.newFont([<file>,] <size>):set()

This makes sure that setFont doesn't create any fonts.
This commit is contained in:
Bart van Strien
2011-12-13 18:51:24 +01:00
parent d5d2e7b5ae
commit 9682ebecf9
6 changed files with 23 additions and 81 deletions
+2 -10
View File
@@ -1252,17 +1252,9 @@ do
return love.graphics.newFont1(font, size or 12)
end
love.graphics.setFont = function(font, size)
if type(font) == "number" or not font then
size = font
font = vera_ttf
end
return love.graphics.setFont1(font, size or 12)
end
love.graphics.print = function (...)
if not love.graphics.getFont() then
love.graphics.setFont(12)
love.graphics.newFont(12):set()
end
love.graphics.print1(...)
love.graphics.print = love.graphics.print1
@@ -1270,7 +1262,7 @@ do
love.graphics.printf = function (...)
if not love.graphics.getFont() then
love.graphics.setFont(12)
love.graphics.newFont(12):set()
end
love.graphics.printf1(...)
love.graphics.printf = love.graphics.printf1