about summary refs log tree commit diff stats
path: root/source.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-04-02 09:22:32 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-04-02 09:22:32 -0700
commit3547c18db6b9d508fb5c2399c124e33f4cc8c488 (patch)
treeefec742d0c0a10017b1af35ae1a586077ee0cb05 /source.lua
parent3bdaf97baab7fd03c53a91ebd11bf359ab97a5d3 (diff)
parent29f1687f3c6a494eb67029acbeefbf11571bbe2c (diff)
downloadview.love-3547c18db6b9d508fb5c2399c124e33f4cc8c488.tar.gz
Merge lines.love
Diffstat (limited to 'source.lua')
-rw-r--r--source.lua12
1 files changed, 1 insertions, 11 deletions
diff --git a/source.lua b/source.lua
index 9452e6b..c70f125 100644
--- a/source.lua
+++ b/source.lua
@@ -162,13 +162,11 @@ end
 function source.initialize_default_settings()
   local font_height = 20
   love.graphics.setFont(love.graphics.newFont(font_height))
-  local em = App.newText(love.graphics.getFont(), 'm')
-  source.initialize_window_geometry(App.width(em))
+  source.initialize_window_geometry(App.width('m'))
   Editor_state = edit.initialize_state(Margin_top, Margin_left, App.screen.width-Margin_right)
   Editor_state.filename = 'run.lua'
   Editor_state.font_height = font_height
   Editor_state.line_height = math.floor(font_height*1.3)
-  Editor_state.em = em
 end
 
 function source.initialize_window_geometry(em_width)
@@ -418,11 +416,3 @@ function source.key_release(key, scancode)
     return log_browser.keychord_press(Log_browser_state, chordkey, scancode)
   end
 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]
-end