Bug 397510

Summary: Visual Bug Using Text Tool With Underline and Subscript
Product: [Applications] krita Reporter: Gequibren <ebregon>
Component: Tool/TextAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: dimula73, eoinoneill1991, halla
Priority: NOR Keywords: investigated, triaged
Version First Reported In: 4.1.1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: 3 lines can be seen to the left of the text box when it has been moved. It is an example of the error that occurs.

Description Gequibren 2018-08-16 07:52:00 UTC
Created attachment 114452 [details]
3 lines can be seen to the left of the text box when it has been moved. It is an example of the error that occurs.

Link to a video where can be seen the bug:
https://www.youtube.com/watch?v=HrSfWxMm8Po
Minute 03:45

When I use the text tool, I write a few lines, I apply underline and subindex on the bottom line ... when I move the text box I can see a visual bug in the underlined line.

Steps to reproduce the error:
1 - Create a text box with the "text" tool.
2 - Write a few lines.
3 - Choose a font such as: Dotum, Batam or Arial.
4 - Applies underline to the lines.
5 - Applies subscript to the letters of the last line.
6 - Move the text box and you will see the bug.

The application does not crash after that. With other font letters seems to work fine. Maybe only fails with some fonts.

The application should move the text box normally and leave it intact in the new position, without generating a visual error where multiple lines are visible.

Krita
  Version: 4.1.1

OS Information
  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 6.1.7601
  Pretty Productname: Windows 7 SP 1 (6.1)
  Product Type: windows
  Product Version: 7sp1

OpenGL Info
  **OpenGL not initialized**
Comment 1 Eoin O'Neill 2018-09-16 04:30:26 UTC
Application Version: Master
Bug Confirmed

Easily reproducible but it may take a few tries. Seems like it doesn't happen with every font. Worked when I switched to Nimbus Sans L.
Comment 2 Dmitry Kazakov 2018-09-26 13:15:51 UTC
Hi, Gequibren and Eoin!

Are you sure that that the bug is still reproducible in master? I cannot reproduce it neither with Nimbus Sans L nor with Arial fonts...

The only trouble I see is that the subscripted part of the text doesn't have color property on it.
Comment 3 Dmitry Kazakov 2018-09-26 16:17:43 UTC
Git commit 933eeca6e8b9f440892f246d09926b8b74d9ce7b by Dmitry Kazakov.
Committed on 26/09/2018 at 16:17.
Pushed by dkazakov into branch 'master'.

Display text color loaded from SVG correctly in the editor

M  +2    -4    libs/flake/text/KoSvgTextShapeMarkupConverter.cpp

https://commits.kde.org/krita/933eeca6e8b9f440892f246d09926b8b74d9ce7b
Comment 4 Dmitry Kazakov 2018-09-26 16:17:43 UTC
Git commit 788d8a1f455437602af933059ce80c6e1db988cc by Dmitry Kazakov.
Committed on 26/09/2018 at 15:47.
Pushed by dkazakov into branch 'master'.

Make foregroud text color style inherit correctly

Now the color of small chunks with a different style is not
rest to black :)

M  +12   -9    libs/flake/text/KoSvgTextShapeMarkupConverter.cpp

https://commits.kde.org/krita/788d8a1f455437602af933059ce80c6e1db988cc
Comment 5 Gequibren 2018-09-26 19:40:52 UTC
Sorry, I don't understand what you mean with "in master" version. My version is 4.1.1.
I tried with Dotum, Batam and Arial letter fonts.
Comment 6 Halla Rempt 2018-09-26 19:51:44 UTC
"master" is the place where we put in all new code. We have a daily build for Linux and Windows of that code: see the nightly builds section of https://krita.org/en/download/krita-desktop/ .
Comment 7 Dmitry Kazakov 2018-10-03 13:41:20 UTC
I will mark the bug as NEEDSINFO for now. If the bug is still present in nightly builds, please mark the bug as REOPENED, so we could notice it. Otherwise, if the bug is gone, just mark it as RESOLVED.

You can find the packages at the following links:

Windows:
https://binary-factory.kde.org/job/Krita_Nightly_Windows_Build/

Linux:
https://binary-factory.kde.org/job/Krita_Nightly_Appimage_Build/
Comment 8 Gequibren 2018-10-03 19:56:25 UTC
Works fine now, thanks ! 
Marked as "RESOLVED".