With https://bugs.kde.org/attachment.cgi?id=160749 (attachment from bug 473026), edit the bottom-right text shape and reduce the inline-size (to about 33pt), the bottommost 2 lines will disappear and the text shape bounding box will include only the first 2 lines (wrapped into 4 lines). This can be reproduced with nightly 5dce46d2f6, so this is not a regression from the fix to bug 473026.
Git commit 59137b2c8b99ce94fbc66dd86389fccbf8f14138 by Wolthera van Hövell tot Westerflier. Committed on 09/08/2023 at 14:05. Pushed by woltherav into branch 'master'. Stablize the outline code a little. The outline code sometimes gives bad results, so by making the operation less complex, we'll get better results and less trouble with the shape not drawing. M +2 -2 libs/flake/text/KoSvgTextChunkShape.cpp https://invent.kde.org/graphics/krita/-/commit/59137b2c8b99ce94fbc66dd86389fccbf8f14138
So basically, when I was testing this, it seemed that the shape-select/default tool knew what the proper outline is, and converting to path seemed to work. So the outline was occasionally wrong. I still get 'flickers' where Krita will also complain about "KoRTree::insert boundingBox isNull setting size to QSizeF(0, 0)", which I initially thought was related, but no matter how late I put 'clearAssociatedOutlines' in the textLayout code, the flickers would happen, so my current theory is that they're caused by the combo of (parsing svg and populating the kotextshape) + (text layout), which means that direct editing of the inline-size property and having that emit shapeChanged() signal might be a good next step, but I guess I'll get to that during phase 1.
Git commit 50038dbd400c57ae8a2df068cd13fb3403a95530 by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier. Committed on 09/08/2023 at 14:16. Pushed by woltherav into branch 'krita/5.2'. Stablize the outline code a little. The outline code sometimes gives bad results, so by making the operation less complex, we'll get better results and less trouble with the shape not drawing. (cherry picked from commit 59137b2c8b99ce94fbc66dd86389fccbf8f14138) M +2 -2 libs/flake/text/KoSvgTextChunkShape.cpp https://invent.kde.org/graphics/krita/-/commit/50038dbd400c57ae8a2df068cd13fb3403a95530
(In reply to wolthera from comment #2) > I still get 'flickers' where Krita will also complain about "KoRTree::insert > boundingBox isNull setting size to QSizeF(0, 0)", which I initially thought > was related, but no matter how late I put 'clearAssociatedOutlines' in the > textLayout code, the flickers would happen, so my current theory is that > they're caused by the combo of (parsing svg and populating the kotextshape) > + (text layout), which means that direct editing of the inline-size property > and having that emit shapeChanged() signal might be a good next step, but I > guess I'll get to that during phase 1. I know what causes this, it's that SvgParser::addToGroup (called from SvgParser::parseTextElement) uses KoShapeGroupCommand which triggers the update/repaint of the shape, combined with how the shape update compressor works, and this results in the shape sometimes being painted when the shape is still empty. I asked Dmitry about this some time ago but it didn't went far.