about summary refs log tree commit diff stats
path: root/run.lua
diff options
context:
space:
mode:
Diffstat (limited to 'run.lua')
-rw-r--r--run.lua8
1 files changed, 2 insertions, 6 deletions
diff --git a/run.lua b/run.lua
index 049362e..6da1c59 100644
--- a/run.lua
+++ b/run.lua
@@ -197,10 +197,6 @@ function run.key_release(key, scancode)
   return edit.key_release(Editor_state, key, scancode)
 end
 
--- use this sparingly
-function to_text(s)
-  if Text_cache[s] == nil then
-    Text_cache[s] = App.newText(love.graphics.getFont(), s)
-  end
-  return Text_cache[s]
+function width(s)
+  return love.graphics.getFont():getWidth(s)
 end