* 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>
Python 2.7 EOL is arriving on 2020-01-01: https://pythonclock.org/
This will allow us to use Python 3 only libraries, like python-barcode,
which can maintain a reduced, simpler codebase, due to only one version
to support.
Closes#371.
Signed-off-by: Romain Porte <microjoe@microjoe.org>
Add Function to Dummy Printer for Clearing Buffer
If you are using the dummy printer, you may want to use the printer
again after sending the output to a physical printer.
This method empties the list of the output buffer.
* add a method to check barcode code format
ensure that the code to print is compatible with the ESC/POS formats and
also automatically check this format before printing (barcode() method).
* rewrite test using pytest's parametrize functionality
* add test for the 'check' argument
* update authors list
The feature use_coverage of hypothesis caused the failing tests, because
the printer_file_test is sensitive to the coverage analysis of
hypothesis.
Fixed by disabling use_coverage for the crashing tests
hypothesis introduced a regression in 3.29.0 (or at least changed
behaviour). Until I have found the problem I will pin it to the last
working version.
Also two tests should be prevented from failing when they are slow.
This was tested on ZJ-5890 with success. By default centering is
deactivated for backward compatibility. Trying to center a QR code in
native mode will raise an exception as we do not know ATM if the native
rendering is centered by default or not.
* Added basic tests for center feature
* Check image size before centering
* Ensure QR codes have a border large enough
(The QR code spec requires a border at least 4*box_size thick but we can't
just set border=16 because that results in a QR code more than 255px tall
and I'm not yet ready to use fullimage() as a backend for it)
This fix was originally commited by Stephan Sokolow on 2014-05-22
* Let the user print stuff using qr example
* fix tests
jaconv is available for more Python-versions and seems to be more
professional. Apart from that I added jaconv to the test-requirements
but not the requirements. (If the katakana-stuff really works we can
later add it as a real dependency)