[umbrello] [Bug 452879] SVG export text often stretches beyond rectangle (class diagram)
https://bugs.kde.org/show_bug.cgi?id=452879 --- Comment #9 from 1234ab --- librsvg, which EOG uses, plans to implement support: https://gitlab.gnome.org/GNOME/librsvg/-/issues/838 here is the related thing from the qt side: https://bugreports.qt.io/browse/QTBUG-79042 (they only claim to support tinysvg 1.2, while these need 1.1 and the full version) gwenview (and kolourpaint) depend on libqt5svg (which I assume means that they use it for svg import) and gimp if I found correctly seems to use a custom script https://github.com/GNOME/gimp/blob/708f075f804caa5cbd11cae2f85f3726456aedcb/plug-ins/common/file-svg.c -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 452879] SVG export text often stretches beyond rectangle (class diagram)
https://bugs.kde.org/show_bug.cgi?id=452879 --- Comment #8 from 1234ab --- adding to the compatibility list, this svg file that I posted on 2022-04-24 18:52 UTC, the one that I modified by hand and added 2 textLengths and lengthAdjusts, works well in: LibreOffice, Falkon, FIrefox, Inkscape doesn't work (shows as if I didn't do any modifications): Gnome Image Viewer (eye of gnome is the real name? dunno), Gwenview, KolourPaint (whatever that is), GIMP so it seems like applications supporting these properties is a hit or miss, though I think it's still worth thinking about also about LibreOffice: it literally displays them in different lengths based on how much I zoom in, and there's like at least 20-30% length difference XD; however with these properties it always has the correct length -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 452879] SVG export text often stretches beyond rectangle (class diagram)
https://bugs.kde.org/show_bug.cgi?id=452879 --- Comment #7 from 1234ab --- after quite a bit of clicking, I found the method we'd need to override, though it doesn't seem easy https://code.woboq.org/qt5/qtsvg/src/svg/qsvggenerator.cpp.html#_ZN15QSvgPaintEngine12drawTextItemERK7QPointFRK9QTextItem in this method we could add the 2 tags (textLength and lenghAdjust), and the actual length could be gotten like this: https://code.woboq.org/qt5/qtbase/src/gui/painting/qpainter.cpp.html#6492 (`ti.width`), though maybe it needs to be transformed somehow -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 452879] SVG export text often stretches beyond rectangle (class diagram)
https://bugs.kde.org/show_bug.cgi?id=452879 --- Comment #6 from 1234ab --- Created attachment 148345 --> https://bugs.kde.org/attachment.cgi?id=148345&action=edit lengthAdjust property in Firefox and gnome image viewer -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 452879] SVG export text often stretches beyond rectangle (class diagram)
https://bugs.kde.org/show_bug.cgi?id=452879 --- Comment #5 from 1234ab --- Created attachment 148344 --> https://bugs.kde.org/attachment.cgi?id=148344&action=edit Trying out the lengthAdjust property, svg format Here I tried out that property, added it to 2 text elements: to "KEY_DOWN: const int" and to the hMeter method (the longest). The first one should now be exactly the same size as the underline, and the second should fit into the box I tried this with the Gnome image viewer (it didn't work), and Firefox (it did work) I'll attach screenshots also, it looks like something is very different from how it looks on KDE, idk what (it looks like even noto sans is available here too) -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 452879] SVG export text often stretches beyond rectangle (class diagram)
https://bugs.kde.org/show_bug.cgi?id=452879 --- Comment #4 from 1234ab --- I think I found something useful, https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/lengthAdjust I'll try to experiment with it, if I can get it to work -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 452879] SVG export text often stretches beyond rectangle (class diagram)
https://bugs.kde.org/show_bug.cgi?id=452879 --- Comment #3 from 1234ab --- But with all of the apps I looked at (except maybe Gimp, it looks like everything fits there, and except Krita, there it reaaally doesn't fit, like a third of the text is outside), e.g. Console::hMeter's last 2 characters are outside it's a shame, because otherwise svg's are much better then rasterizing them (select text, high resolution, etc.) related: https://bugs.kde.org/show_bug.cgi?id=349234 so I don't know what settings (inside an svg) are available to solve this, I don't think it's a great idea to make the box longer (it looks pretty good this way, it's exactly the same as the png export version) it would also probably be a bad idea to make the text 1 point smaller when exported with svg, because of the same reason the best would probably be something like making the letters take up 3-4% less space horizontally in the svg export (while staying the same font and size), but probably there isn't a way to do that in svg, idk -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 452879] SVG export text often stretches beyond rectangle (class diagram)
https://bugs.kde.org/show_bug.cgi?id=452879 --- Comment #2 from 1234ab --- Created attachment 148310 --> https://bugs.kde.org/attachment.cgi?id=148310&action=edit difference between Inkscape and Gwenview (not a problem this time but may be other times) -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 452879] SVG export text often stretches beyond rectangle (class diagram)
https://bugs.kde.org/show_bug.cgi?id=452879 --- Comment #1 from 1234ab --- Created attachment 148309 --> https://bugs.kde.org/attachment.cgi?id=148309&action=edit svg image, in svg format -- You are receiving this mail because: You are watching all bug changes.