diff options
-rw-r--r-- | main.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main.lua b/main.lua index 0164a7a..a15ab41 100644 --- a/main.lua +++ b/main.lua @@ -128,6 +128,13 @@ function App.resize(w, h) Last_resize_time = App.getTime() end +function initialize_font_settings(font_height) + Editor_state.font_height = font_height + love.graphics.setFont(love.graphics.newFont(Editor_state.font_height)) + Editor_state.line_height = math.floor(font_height*1.3) + Editor_state.em = App.newText(love.graphics.getFont(), 'm') +end + function App.filedropped(file) -- first make sure to save edits on any existing file if Editor_state.next_save then |