Bug 287659 - graphics/qt6-svg: upstream fix for incorrect text rendering
Summary: graphics/qt6-svg: upstream fix for incorrect text rendering
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-19 17:53 UTC by russo
Modified: 2025-06-22 22:18 UTC (History)
1 user (show)

See Also:
jhale: maintainer-feedback+


Attachments
Add upstream patch for qt6-svg src/svg/qsvggraphics.cpp to address rendering bug (1.73 KB, patch)
2025-06-19 17:53 UTC, russo
no flags Details | Diff
Screenshot of exported PDF technical drawing from FreeCAD with unmodified qt6-svg (14.54 KB, image/png)
2025-06-19 17:54 UTC, russo
no flags Details
Screenshot of exported PDF technical drawing from FreeCAD with patched qt6-svg (14.02 KB, image/png)
2025-06-19 17:55 UTC, russo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description russo 2025-06-19 17:53:46 UTC
Created attachment 261409 [details]
Add upstream patch for qt6-svg src/svg/qsvggraphics.cpp to address rendering bug

When using the port cad/FreeCAD, the TechDraw workbench incorrectly renders SVG text with huge strokes.   This has been diagnosed as a bug in qt6-svg in the FreeCAD issue tracker: https://github.com/FreeCAD/FreeCAD/issues/18881

The fix was put in place by the Qt development team and cherry-picked to the 6.8, 6.9, and 6.10 release branches on 3 June (https://bugreports.qt.io/browse/QTBUG-123817), the same day that 6.9.1 was released.  Thus, the fix won't show up in a released version until the next qt6 release.

The patch is one line and will be rendered obsolete once the next qt6 release comes out and the qt6-svg port gets updated.  In the meantime, applying the attached patch fixes the issue.  I will attach examples of before and after rendering from FreeCAD shortly.
Comment 1 russo 2025-06-19 17:54:40 UTC
Created attachment 261410 [details]
Screenshot of exported PDF technical drawing from FreeCAD with unmodified qt6-svg
Comment 2 russo 2025-06-19 17:55:08 UTC
Created attachment 261411 [details]
Screenshot of exported PDF technical drawing from FreeCAD with patched qt6-svg
Comment 3 russo 2025-06-19 19:31:15 UTC
Comment on attachment 261410 [details]
Screenshot of exported PDF technical drawing from FreeCAD with unmodified qt6-svg

This is a screenshot of a TechDraw export from FreeCAD using the "USLetter_Landscape.svg" template, prior to applying the qt6-svg patch in this issue report.

The text in the title boxes is rendered as paths instead of as text, making it mostly unreadable.
Comment 4 russo 2025-06-19 19:33:45 UTC
Comment on attachment 261411 [details]
Screenshot of exported PDF technical drawing from FreeCAD with patched qt6-svg

This is a screenshot of a PDF document exported from a FreeCAD TechDraw page after having applied the qt6-svg patch in this issue report.  The text is properly rendered.

The same fix corrects the same error when the document is printed.
Comment 5 commit-hook freebsd_committer freebsd_triage 2025-06-22 16:32:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8a55562eb795b27db989f3ef5278c3b20407f06f

commit 8a55562eb795b27db989f3ef5278c3b20407f06f
Author:     Tom Russo <russo@bogodyn.org>
AuthorDate: 2025-06-19 17:44:14 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2025-06-22 16:23:04 +0000

    graphics/qt6-svg: Fix text rendering in FreeCAD

    qt6-svg has a bug that causes some text rendering to display as a path
    instead of as text. The code was fixed upstream:
    https://bugreports.qt.io/browse/QTBUG-123817

    The effect of this bug include that technical drawings from FreeCAD with
    svg templates print or export to PDF with mangled description blocks:
    https://github.com/FreeCAD/FreeCAD/issues/18881

    PR:             287659

 graphics/qt6-svg/Makefile | 4 ++++
 graphics/qt6-svg/distinfo | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)
Comment 6 Jason E. Hale freebsd_committer freebsd_triage 2025-06-22 16:37:31 UTC
Thanks for the detailed report! I reworked this to download the patch. It makes it easier for me to keep track of things between Qt releases.
Comment 7 russo 2025-06-22 22:18:57 UTC
Thank you for patching.  I am not as familiar with the intricacies of ports as I would like to be, and your solution would not have occurred to me.  If this comes up again, I'll try to submit patches that make use of the PATCH_SITES/PATCHFILES technique when it is applicable.