Fix size and text distance
I spotted two problems while writing a program:
- text_distance is not applied if guardbar is on
- the height calculation is not correct (it only accounts for half of the font width), and this caused the images being too short
I fixed the two issues in this PR
Needs rebase
Rebased on latest main
the height calculation is not correct (it only accounts for half of the font width), and this caused the images being too short
Do you have an example that reproduces this problem?
I tried python-barcode create "123456789000" outfile -b ean --text "hello there", and the height is correct, the text fit fully.
Also tried generating a PNG (with pillow installed) with python-barcode create "123456789000" outfile -b ean --text "hello there" --type png. Text also fits fine.
I'll try to get something in the next days. Honestly I don't have the build system ready anymore since it was a small project of mine done 2 years ago, but I'll try to reproduce it with a simple example and write it here