Fix width calculation

This commit is contained in:
jaseg 2024-06-22 13:44:33 +02:00
parent 565e0821d9
commit 351ba0a77a

View file

@ -91,8 +91,7 @@ def cli(data, outfile, height, text, font, font_size, bar_width, margin, color,
])
data_encoded = [True, False, True, False, *data_encoded, False, True, True, False, True]
bars = 32/2*3 + 2
width = bars * bar_width
width = len(data_encoded) * bar_width
# 1 px = 0.75 pt
pt_to_mm = lambda pt: pt / 0.75 /dpi * 25.4
font_size = pt_to_mm(font_size)