-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat Request: Readable text, when using a small size QR images (like 'qr_version': 2) #11
Comments
Hi @loregood ! Thanks for the feedback. I don't have enough time right now for this FR. I will look deep into it later. |
I would also be happy about this FR. :) |
While I have no idea about Pyton and NetBox plugins, I have a ready-made solution. If font_size is specified in the configuration, the fixed font size is used. If no size is specified, then it will be adjusted to the QR code size. configuration.py (Add 'font_size': 12,)
utilities.py (Decision whether as always or fixed font size)
template_content.py (Config forward font_size value)
|
…e is used. If the font_size is not specified or if the value = 0, then the previous dynamic behavior will continue to be executed. Issue netbox-community#11 from the original is related to the topic.
When printing to a label printer with a small size strip (like 2 cm. in width), any text printed after the QR-code is unreadable -- especially if any text is long, like an URI. Since the text size currently also scales with the length of the text.
I'm not sure what the best approach would be, but I think it would be reasonable to assume that the height the QR-code is the limiting factor and then scale all text to fill "inside" the QR-codes height, and just ignore the length of the text. Another option could be to specify QR image size, and font/size independently of each other. Perhaps with a 'font_size': option in PLUGINS_CONFIG? It would be a little more fiddly to get a nice "QR-code and text" image, but you would have more control over the final image.
The text was updated successfully, but these errors were encountered: