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

Handle new Zint API >= 2.7.0 #186

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Handle new Zint API >= 2.7.0 #186

wants to merge 2 commits into from

Conversation

gitlost
Copy link
Contributor

@gitlost gitlost commented Dec 19, 2022

Add handling of new Zint API >= 2.7.0 for Zint backend and use latest version (2.12.0) by default (fixes #86 and #160, subsumes PR #164).

  • hack "FindLibZint.cmake" to use zint -h to get version; define LIBZINT_VERSION
  • add new API handling in Zint in LIBZINT_VERSION >= 20700 define, leaving 2.6.3 handling unchanged
  • add some new Zint barcodes and adjust style properties of various other Zint barcodes
  • enable check digit handling via Zint option_2
  • add horizontal alignment halign argument to Barcode::ahddText(), QtRenderer::drawText() and DrawingPrimitiveText::DrawingPrimitiveText() and use in QtRenderer::drawText() to cater for Zint EAN/UPC left/right text align of outside digits
  • guard against QT infinite loop bug in QFontMetricsF when point size < ~0.4 (MIN_POINT_SIZE)

to avoid QList ASSERT being triggered in `TestModel::model()`.
version (2.12.0) by default (issues jimevins#86 and jimevins#160, subsumes PR jimevins#164).

 - hack "FindLibZint.cmake" to use `zint -h` to get version;
   define `LIBZINT_VERSION`
 - add new API handling in `Zint` in LIBZINT_VERSION >= 20700 define,
   leaving 2.6.3 handling unchanged
 - add some new Zint barcodes and adjust style properties of various other
   Zint barcodes
 - enable check digit handling via Zint `option_2`
 - add horizontal alignment `halign` argument to `Barcode::addText()`,
   `QtRenderer::drawText()` and `DrawingPrimitiveText::DrawingPrimitiveText()`
   and use in `QtRenderer::drawText()` to cater for Zint EAN/UPC left/right
   text align of outside digits
 - guard against QT infinite loop bug in `QFontMetricsF` when point size
   < ~0.4 (MIN_POINT_SIZE)
@CapnKernel
Copy link

These two patches were exactly what I needed to get glabels-qt to compile in Fedora. Thank you @gitlost!

@fedora-mahdi
Copy link

These two patches were exactly what I needed to get glabels-qt to compile in Fedora. Thank you @gitlost!

@CapnKernel

Could you please detail the commands and environment required to compile glabels-qt in Fedora ?
Through dnf search glabels or flathub the is and old version (3.4 if I remember correctly)

Thanks for your help.

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

Successfully merging this pull request may close these issues.

Incompatibility with zint 2.7.0
3 participants