consistent height of a-eq a-hp/lp
authorRobin Gareus <robin@gareus.org>
Thu, 14 Jul 2016 14:48:28 +0000 (16:48 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 14 Jul 2016 14:52:43 +0000 (16:52 +0200)
scripts/hplp.lua

index a69fb615331b6ac41284235c89a05e45b16d837d..52597cb18b51d26db7920dba984d3562f2ee528e 100644 (file)
@@ -228,7 +228,7 @@ function render_inline (ctx, w, max_h)
        end
 
        -- calc height of inline display
-       local h = math.ceil (w * 10 / 16) -- use 16:10 aspect
+       local h = 1 | math.ceil (w * 9 / 16) -- use 16:9 aspect, odd number of y pixels
        if (h > max_h) then h = max_h end -- but at most max-height
 
        -- ctx is a http://cairographics.org/ context