Bug 389528

Summary: Vector object "frame" crops italic text
Product: [Applications] krita Reporter: kalia24
Component: Layers/VectorAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: griffinvalley, halla
Priority: NOR Keywords: release_blocker, triaged
Version First Reported In: 4.0.0-beta.1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Black "t" is vector layer, brown is rasterized

Description kalia24 2018-01-27 21:53:58 UTC
Created attachment 110160 [details]
Black "t" is vector layer, brown is rasterized

As shows in attached screenshot - text in vector layer (black) is cropped. "t" should look like the brown one (rasterized).
Comment 1 wolthera 2018-01-28 15:38:22 UTC
Confirmed. It seems that what happens is that italics aren't taken into account for the total bounding box size and thus are not part of the refresh rectangle.

To reproduce:

1. Make text, make sure it desn't end on punctuation.
2. Italisize, notice how last letter can sometimes be outside the bounding box.
3. Then take shape select and move about the text.
4. Refresh is only limited to the rectangle, cutting off the tiny bit outisde of the ounding box.
Comment 2 Dmitry Kazakov 2018-03-09 17:35:03 UTC
Git commit f401fa6e16950897daea029d885c0622a26f21fe by Dmitry Kazakov.
Committed on 09/03/2018 at 17:33.
Pushed by dkazakov into branch 'master'.

Workaround Qt's bug in calculating the bounding rect of the glyph in a glyph run

M  +36   -20   libs/flake/text/KoSvgTextShape.cpp

https://commits.kde.org/krita/f401fa6e16950897daea029d885c0622a26f21fe
Comment 3 Halla Rempt 2018-03-17 08:53:31 UTC
Git commit f7787f577faa8c257398e63b7a5cd9b8f3d99c05 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 17/03/2018 at 08:53.
Pushed by rempt into branch 'krita/4.0'.

Workaround Qt's bug in calculating the bounding rect of the glyph in a glyph run
(cherry picked from commit f401fa6e16950897daea029d885c0622a26f21fe)

M  +36   -20   libs/flake/text/KoSvgTextShape.cpp

https://commits.kde.org/krita/f7787f577faa8c257398e63b7a5cd9b8f3d99c05