about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-19 04:28:08 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-19 04:28:08 -0700
commit18bb4624b354e20848175c534e610ed6d718c722 (patch)
treeedd32f8dccca6093b7ad7a6f792c987e52c6fc19
parentb63a33dd069c88fabdba60690e4c01e8a210d0be (diff)
downloadtext.love-18bb4624b354e20848175c534e610ed6d718c722.tar.gz
ensure integer coordinates
https://love2d.org/wiki/Text says text can appear blurry otherwise.
I can't tell yet, though.
-rw-r--r--main.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index a23f426..a1410fe 100644
--- a/main.lua
+++ b/main.lua
@@ -109,7 +109,7 @@ function love.draw()
   local y = 0
   for line_index,line in ipairs(Lines) do
     if line_index >= Screen_top_line then
-      y = y+15*Zoom
+      y = math.floor(y+15*Zoom)
       if y > Screen_height then break end
       Screen_bottom_line = line_index
       line.y = y