[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.
[umbrello] [Bug 452879] New: SVG export text often stretches beyond rectangle (class diagram)
https://bugs.kde.org/show_bug.cgi?id=452879 Bug ID: 452879 Summary: SVG export text often stretches beyond rectangle (class diagram) Product: umbrello Version: 2.33.2 (KDE releases 20.12.2) Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: exporter Assignee: umbrello-de...@kde.org Reporter: nevenincs...@gmail.com Target Milestone: --- Created attachment 148308 --> https://bugs.kde.org/attachment.cgi?id=148308&action=edit original image (png export, looks like how it should) SUMMARY In the exported SVG image, the text often stretches beyond the box/rectangle, or at least the last letter is on the edge. I think this should be fixed somehow. STEPS TO REPRODUCE 1. the classes I used for screenshots can be found here: https://github.com/4321ba/Gameotry/tree/562dc9e23a6486353624ac7bc52972f148848c6c 2. export as png 3. export as svg OBSERVED RESULT they look very similar, however somehow the text in the svg files is a liittle bit wider, so in the end they all look ugly also I see that different viewers (gwenview, firefox) display fonts slightly differently, but I think that having a larger place left on the right looks much better than when the text just barely doesn't fit EXPECTED RESULT the text fits in the box well I'll attach files SOFTWARE/OS VERSIONS Kubuntu 20.04, using the latest (2.32.2) snap -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 452875] Better document available DPI change setting when exporting image
https://bugs.kde.org/show_bug.cgi?id=452875 --- Comment #1 from 1234ab --- started the PR https://invent.kde.org/sdk/umbrello/-/merge_requests/28 -- You are receiving this mail because: You are watching all bug changes.
[umbrello] [Bug 452875] New: Better document available DPI change setting when exporting image
https://bugs.kde.org/show_bug.cgi?id=452875 Bug ID: 452875 Summary: Better document available DPI change setting when exporting image Product: umbrello Version: 2.33.2 (KDE releases 20.12.2) Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: documentation Assignee: umbrello-de...@kde.org Reporter: nevenincs...@gmail.com Target Milestone: --- SUMMARY Awesome tool! However, when starting to first use it, there were some stuff that are unintuitive, here's one: So I exported the image of a class diagram using the method available [here](https://docs.kde.org/stable5/en/umbrello/umbrello/other-features.html#export-as-png), and it was pretty pixelated, I also found the same option in the right click menu. So I thought about reporting it, but I thought there's no way no one else found it, and sure enough I found [this](https://invent.kde.org/sdk/umbrello/-/commit/3065740d686a49e918b34fc15f004ba40d0584c6) commit, and after that I actually found the "Export diagrams as Pictures" option in the file menu, where I could set the resolution. So I'd suggest to make the option better discoverable I wouldn't think it would be under File section, and I didn't search there at all until I found out that the option is for sure in the code, so it has to be somewhere, maybe I could've searched there sooner, but I was just so sure that I already found the image exporter, and I was looking for options near those, and not away like in another menu Though maybe it does belong more to a general menu (like File) then to the Diagram menu, because it exports all diagrams, instead of just one, so idk. So in my opinion an improvement would be to move it to a more noticeable place, or maybe remove the other one from the right click menu / replace it with the one that can do more, so people don't get confused between the 2 versions (the one with the DPI change and the one without). But if that is too dramatic, I think it would still be very good if the corresponding part of the documentation mentioned (I did read it when I had the problem, so it would have helped at least me) that there's an option for that. I can try to create a PR with that, instead of this: ``` Exporting to an Image You can also export a complete diagram as an image. The only thing you need to do is select the diagram you want to export, and then the option Export as Picture... from the Diagram menu. ``` something like this: ``` Exporting to an Image You can also export a complete diagram as an image. The only thing you need to do is select the diagram you want to export, and then the option Export as Picture... from the Diagram menu. You can also export multiple diagrams at once using the Export Diagrams as Pictures... option from the File menu. With this, you can also set the image resolution, so that the images won't be as blurry. ``` -- You are receiving this mail because: You are watching all bug changes.