Commit Graph

14 Commits

Author SHA1 Message Date
Jaye Evins d1ee78e58a Fix incorrect font sizes (#321)
Recently, when chasing the font size differences between the wayland and xcb Qt backends, I ended up normalizing on the wayland sizing when bypassing the backend's font metrics calculation (#272).  Unfortunately, the wayland backend was not rendering the font sizes correctly, and it was a mistake to duplicate its behavior. 

* Assume a virtual DPI of 72 pixels/in instead of 96 when compulting font size
  - Based on testing, this produces the correct font size
  - Updated reference labels.
* No longer need to scale fonts when importing glabels-3 files.
  - The glabels-3 font sizes were correct afterall!  (#306)
  - No longer need to compensate for scale factor in unit tests when importing glabels-3 files.
2026-03-27 15:47:46 -04:00
Jaye Evins 993e1e460d Tweaks to glabels-3 text object compatability. (#306)
This commit partially addresses issues in #296.  Due to the fact that glabels-3
and glabels-4 use different underlying technologies for rendering text, a
pixel-perfect import can probably never be fully achieved.

This commit focuses on small adjustments to imported text objects to approximate
the visual appearance of these objects.

- glabels-3 rendered text at 75% of stated font size, compensate by adjusting
  font size of imported object.
- Text boxes behave differently in glabels-4 than in glabels-3.  In glabels-4,
  text boxes must be of a fixed size, so compensate when a variable sized
  box (when w=0 and/or h=0) is detected and fix the size to the natural text
  size.
- In glabels-3, the fixed margin size (3pt) was not used in the text baseline
  calculations.  Compensate by adjusting vertical position of imported text
  object.
2026-02-05 18:45:18 -05:00
Jaye Evins 4b16b0900b Update copyright notices for 2026. (#280) 2026-01-13 19:19:42 -05:00
Jaye Evins 1c902230fe Big-Ugly Style Update (#278)
* Bulk replaced tabs with spaces
* Bulk removed trailing whitespace from lines
* Replaced c-style comments with c++-style comments in file banners
* Replace nested namespace definitions with single concise definitions (C++17), this keeps the indentation more manageable
* Cleanup ordering and spacing of include directives
* Bulk renaming of header file extensions from '.h' to '.hpp'.
* Update CODING-STYLE.md
* Update target_compile_features from cxx_std_11 to cxx_std_20.
* Refresh .clang-format file.  Still needs a lot of tweaking.
2026-01-07 19:43:34 -05:00
Jaye Evins 742b80fc47 Use canonical file paths for filenames in model (#275) 2026-01-02 13:34:44 -05:00
Jaye Evins 8c8e447336 Pointer cleanup (#242)
- Made greater use of smart pointers, eliminating many instances of manual memory management
- Do not use pointers at all for many non-polymorphic classes
- Assorted other code cleanup
2025-10-31 16:11:28 -04:00
Jim Lieb be567f90eb Update Qt dependency from QT 5.6 to QT 5.15 (#162)
* Update QT5 references 5.6 -> 5.15

Builds and runs but now needs deprecated -> current updates.

Signed-off-by: Jim Lieb <lieb@sea-troll.net>

* Update build instructions for Fedora 35 particulars

Signed-off-by: Jim Lieb <lieb@sea-troll.net>

* Replace deprecated QtString::sprintf with QtString::arg

This was deprecated some revisions prior to 5.15.

Signed-off-by: Jim Lieb <lieb@sea-troll.net>

* Replace deprecated QtString::SkipEmptyParts with Qt::SkipEmptyParts

Builds now with 5.15

Signed-off-by: Jim Lieb <lieb@sea-troll.net>

* Replace deprecated QPrinter::setPageMargins with 5.15 version

Signed-off-by: Jim Lieb <lieb@sea-troll.net>

* Replace deprecated QImage::byteCount() with QImage::sizeInBytes()

This could be problematic if qsizetype differs from int

Signed-off-by: Jim Lieb <lieb@sea-troll.net>

* Replace deprecated endl with QT::endl

Signed-off-by: Jim Lieb <lieb@sea-troll.net>

* Replace deprecated QMatrix with QTransform

Signed-off-by: Jim Lieb <lieb@sea-troll.net>

---------

Signed-off-by: Jim Lieb <lieb@sea-troll.net>
2025-04-28 22:16:28 -04:00
Jaye Evins f8efe3aafa Update all occurrences of my name with my legal name. 2025-04-08 18:47:02 -04:00
gitlost 6bc0cb8443 Remove XmlLabel png render tests, too system dependent 2019-08-29 08:10:27 +01:00
gitlost 7e44bbdc06 New FileUtil::makeRelativeIfInDir func; label parser_3 barcode map; unit tests 2019-08-26 03:00:32 +01:00
gitlost e8daa8aa48 Fix readImageFile to set mSvg, use in drawShadow also 2019-08-23 09:27:14 +01:00
gitlost 010879fa71 Add root to images search path, readImageFile svg; unit tests 2019-08-21 15:04:52 +01:00
gitlost 2444cacb74 UserVariables branch merge 2019-08-21 03:37:56 +01:00
gitlost 850c62ddd0 Make lockAspectRatio (sizeAspectCheck) per-object (#63)
* Make lockAspectRatio (sizeAspectCheck) per-object
* Added unit tests for XmlLabelCreator and XmlLabelParser.
2019-07-13 22:18:30 -04:00