* Merge software and hardware barcodes to one method
* Fix wrong sw barcode heigh/width
* Add missing param to _sw_barcode call
* Make barcode() smarter, improvements and clean up
* Use param font_size in sw_barcode()
* Update docstrings
* Update barcode examples and docs
* Add --force_software option to CLI
* Attempt to match the sw and hw barcode sizes
* Better approximation to native font size
* Fix docs build
* Update tests at test_function_softbarcode
* Fix exception
* Move image dpi setting to writter_options
* Fix _sw_barcode() docstring param
* Fix wrong default param in docstring
* improve linkage in documentation
---------
Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com>
Co-authored-by: Patrick Kanzler <dev@pkanzler.de>
Actually the hardware barcode implementation is very specific and not
generic enough for just adding a `soft_render=True` argument to it. This
is a first work that can be improved with other commits, maybe for
merging this method in the `barcode` method after some cleanup.
The width, height and text_distance were set using empiric
print-and-retry tests so that the generated barcode looks nice to the
eye (and to the eye of an Android scanner tool.
!WARNING! Printing a barcode that is too large in width will result in
the printer to go crazy trying to print an image that is too large for
it. This may be fixed by raising an exception in the `image` method.