about summary refs log tree commit diff stats
path: root/app.lua
diff options
context:
space:
mode:
Diffstat (limited to 'app.lua')
-rw-r--r--app.lua11
1 files changed, 1 insertions, 10 deletions
diff --git a/app.lua b/app.lua
index 816c9af..48ab363 100644
--- a/app.lua
+++ b/app.lua
@@ -219,10 +219,7 @@ function App.newText(font, s)
 end
 
 function App.width(text)
-  if type(text) == 'string' then
-    return love.graphics.getFont():getWidth(text)
-  end
-  return text.text:getWidth()
+  return love.graphics.getFont():getWidth(text)
 end
 
 function App.screen.draw(obj, x,y)
@@ -428,12 +425,6 @@ function App.disable_tests()
   App.screen.print = love.graphics.print
   App.newText = love.graphics.newText
   App.screen.draw = love.graphics.draw
-  App.width = function(text)
-    if type(text) == 'string' then
-      return love.graphics.getFont():getWidth(text)
-    end
-    return text:getWidth()
-  end
   if Current_app == nil or Current_app == 'run' then
     App.open_for_reading = function(filename) return io.open(filename, 'r') end
     App.open_for_writing = function(filename) return io.open(filename, 'w') end