diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2023-12-29 11:52:28 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2023-12-29 11:52:28 -0800 |
commit | bd2179d8aa37e6088f20faae08fd6564a33e18c1 (patch) | |
tree | 9775eb972fa69ca272f681a4186ce508d9c4c494 /source_edit.lua | |
parent | 6601c9fad87fb8b06df442c964486c8050fec3ac (diff) | |
download | text.love-bd2179d8aa37e6088f20faae08fd6564a33e18c1.tar.gz |
bugfix
scenario: run without config file, quit, run again expected: font size remains the same on second run Before this commit it was increasing on each run. It turns out the font height that you pass into love.graphics.newFont() is not the result of font:getHeight().
Diffstat (limited to 'source_edit.lua')
-rw-r--r-- | source_edit.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source_edit.lua b/source_edit.lua index 9414ee4..8032278 100644 --- a/source_edit.lua +++ b/source_edit.lua @@ -25,7 +25,7 @@ Same_point_distance = 4 -- pixel distance at which two points are considered th edit = {} -- run in both tests and a real run -function edit.initialize_state(top, left, right, font, line_height) -- currently always draws to bottom of screen +function edit.initialize_state(top, left, right, font, font_height, line_height) -- currently always draws to bottom of screen local result = { -- a line is either text or a drawing -- a text is a table with: @@ -572,6 +572,7 @@ function edit.initialize_test_state() Test_margin_left, App.screen.width - Test_margin_right, love.graphics.getFont(), + 14, 15) -- line height end |