<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>473164</bug_id>
          
          <creation_ts>2023-08-08 17:40:25 +0000</creation_ts>
          <short_desc>Lines missing from bounding box after inline-size wrapping</short_desc>
          <delta_ts>2023-08-09 12:22:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Tool/Text</component>
          <version>git master (please specify the git hash!)</version>
          <rep_platform>Microsoft Windows</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Alvin Wong">alvin</reporter>
          <assigned_to name="Krita Bugs">krita-bugs-null</assigned_to>
          <cc>griffinvalley</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/-/commit/50038dbd400c57ae8a2df068cd13fb3403a95530</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2245274</commentid>
    <comment_count>0</comment_count>
    <who name="Alvin Wong">alvin</who>
    <bug_when>2023-08-08 17:40:25 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2245438</commentid>
    <comment_count>1</comment_count>
    <who name="wolthera">griffinvalley</who>
    <bug_when>2023-08-09 12:09:06 +0000</bug_when>
    <thetext>Git commit 59137b2c8b99ce94fbc66dd86389fccbf8f14138 by Wolthera van Hövell tot Westerflier.
Committed on 09/08/2023 at 14:05.
Pushed by woltherav into branch &apos;master&apos;.

Stablize the outline code a little.

The outline code sometimes gives bad results, so by making the operation
less complex, we&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2245439</commentid>
    <comment_count>2</comment_count>
    <who name="wolthera">griffinvalley</who>
    <bug_when>2023-08-09 12:16:05 +0000</bug_when>
    <thetext>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 &apos;flickers&apos; where Krita will also complain about &quot;KoRTree::insert boundingBox isNull setting size to QSizeF(0, 0)&quot;, which I initially thought was related, but no matter how late I put &apos;clearAssociatedOutlines&apos; in the textLayout code, the flickers would happen, so my current theory is that they&apos;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&apos;ll get to that during phase 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2245442</commentid>
    <comment_count>3</comment_count>
    <who name="wolthera">griffinvalley</who>
    <bug_when>2023-08-09 12:16:46 +0000</bug_when>
    <thetext>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 &apos;krita/5.2&apos;.

Stablize the outline code a little.

The outline code sometimes gives bad results, so by making the operation
less complex, we&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2245447</commentid>
    <comment_count>4</comment_count>
    <who name="Alvin Wong">alvin</who>
    <bug_when>2023-08-09 12:22:56 +0000</bug_when>
    <thetext>(In reply to wolthera from comment #2)
&gt; I still get &apos;flickers&apos; where Krita will also complain about &quot;KoRTree::insert
&gt; boundingBox isNull setting size to QSizeF(0, 0)&quot;, which I initially thought
&gt; was related, but no matter how late I put &apos;clearAssociatedOutlines&apos; in the
&gt; textLayout code, the flickers would happen, so my current theory is that
&gt; they&apos;re caused by the combo of (parsing svg and populating the kotextshape)
&gt; + (text layout), which means that direct editing of the inline-size property
&gt; and having that emit shapeChanged() signal might be a good next step, but I
&gt; guess I&apos;ll get to that during phase 1.

I know what causes this, it&apos;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&apos;t went far.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>