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.
Created attachment 261410 [details] Screenshot of exported PDF technical drawing from FreeCAD with unmodified qt6-svg
Created attachment 261411 [details] Screenshot of exported PDF technical drawing from FreeCAD with patched qt6-svg
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 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.
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(-)
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.
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.