Skip to content
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

Text placement in ImageWriter #177

Open
tytouf opened this issue Oct 5, 2022 · 2 comments
Open

Text placement in ImageWriter #177

tytouf opened this issue Oct 5, 2022 · 2 comments

Comments

@tytouf
Copy link

tytouf commented Oct 5, 2022

I believe text is incorrectly located in barcode when using ImageWriter as of 0.14.0. This is mainly due to a wrong computation of text height which is a very common problem due to the fact that total height for a font is different from the height of rendered glyphs for most of the ascii characters.

Attached is a proposed patch to place text correctly. Note that because most of the time a barcode is followed by a text with capital letters, the blank space at the bottom is more that 1mm (which would be nice to set as an option). It should be closer to 1mm when using letters that goes below the font baseline ('p', 'q', etc).

text_placement.patch.txt

@WhyNotHugo
Copy link
Owner

There have been changes to how text is aligned and how it's size is calculated since 0.14. Do you still have the same issue on main?

See #165 for discussion on this.

@tytouf
Copy link
Author

tytouf commented Oct 12, 2022

I didn't test with the source but it should be equivalent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants