make the generator script output two columns

This commit is contained in:
Lephenixnoir 2019-06-18 19:23:18 -04:00
parent 9bb2fd9b82
commit ecc83c2d0b
2 changed files with 14 additions and 3 deletions

17
gen.py
View File

@ -100,16 +100,27 @@ class Block:
blocks = [ Block(file) for file in files ]
height = sum(b.height() for b in blocks)
result = PIL.Image.new("RGB", (112, height))
left_height = 0
for b in blocks:
left_height += b.height()
if 2 * left_height >= height: break
result = PIL.Image.new("RGB", (2 * 112 + 8, left_height), color=WHITE)
x = 0
y = 0
for b in blocks:
header = b.header()
result.paste(header, (0, y))
result.paste(header, (x, y))
y += header.height
body = b.body()
result.paste(body, (0, y))
result.paste(body, (x, y))
y += body.height
if y >= left_height:
y = 0
x += 112 + 8
result.save("uf5x7.png")

BIN
uf5x7.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB