Bug 473026 - Weird bug: last line of text not visible
Summary: Weird bug: last line of text not visible
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (show other bugs)
Version: git master (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-05 08:18 UTC by Alvin Wong
Modified: 2023-08-08 14:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test file (96.45 KB, application/x-krita)
2023-08-05 08:18 UTC, Alvin Wong
Details
Screenshot (8.35 KB, image/png)
2023-08-05 08:19 UTC, Alvin Wong
Details
Screenshot with debugging outlines and stroked text (112.62 KB, image/png)
2023-08-08 06:56 UTC, Alvin Wong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alvin Wong 2023-08-05 08:18:59 UTC
Created attachment 160749 [details]
Test file

In the attached file, the bottom-right text shape does not render the last line.

The corresponding SVG:
```svg
<text text-rendering="auto" fill="#000000" stroke-opacity="0" stroke="#000000"
stroke-width="0" stroke-linecap="square" stroke-linejoin="bevel"
letter-spacing="0" text-anchor="end" word-spacing="0"
style="inline-size: 100;text-align: start;text-align-last: auto;
font-family: Noto Sans;font-size: 8;white-space: pre-wrap;
"><tspan>===Testing 1
</tspan><tspan>==Testing 2
</tspan><tspan>=Testing 3
</tspan><tspan>Testing 4</tspan></text>
```
Comment 1 Alvin Wong 2023-08-05 08:19:36 UTC
Created attachment 160750 [details]
Screenshot
Comment 2 wolthera 2023-08-05 09:18:12 UTC
I can reproduce. There must be something odd in the painting-section, because convert-to-path does work. Maybe dmitry's "am I inside the relevant tiles"-code is somehow not recognizing this last set of glyphs?
Comment 3 Alvin Wong 2023-08-08 06:56:54 UTC
Created attachment 160822 [details]
Screenshot with debugging outlines and stroked text

The stroke is painted, just the fill is missing...
Comment 4 wolthera 2023-08-08 14:05:31 UTC
Git commit c29c1f3fc04ace7091b6b3e2d764e6a798d5ef4a by Wolthera van Hövell tot Westerflier.
Committed on 08/08/2023 at 16:05.
Pushed by woltherav into branch 'master'.

Fix fill not painting because it was not using the boundingRect.

It is strange that this happened at all, but the only difference between
fill and stroke was that one was using the bounding rect instead of the
path, so at least they're consistent now.

M  +3    -1    libs/flake/text/KoSvgTextShape.cpp

https://invent.kde.org/graphics/krita/-/commit/c29c1f3fc04ace7091b6b3e2d764e6a798d5ef4a
Comment 5 wolthera 2023-08-08 14:06:05 UTC
Git commit 61f6504490d7c86c38360d00aa73f5f05ed8fc28 by Wolthera van Hövell, on behalf of Wolthera van Hövell tot Westerflier.
Committed on 08/08/2023 at 16:06.
Pushed by woltherav into branch 'krita/5.2'.

Fix fill not painting because it was not using the boundingRect.

It is strange that this happened at all, but the only difference between
fill and stroke was that one was using the bounding rect instead of the
path, so at least they're consistent now.


(cherry picked from commit c29c1f3fc04ace7091b6b3e2d764e6a798d5ef4a)

M  +3    -1    libs/flake/text/KoSvgTextShape.cpp

https://invent.kde.org/graphics/krita/-/commit/61f6504490d7c86c38360d00aa73f5f05ed8fc28