Bug 392471

Summary: Krita text tool does not respect empty lines
Product: [Applications] krita Reporter: Tyson Tan <tysontanx>
Component: Tool/TextAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: acc4commissions, halla
Priority: NOR    
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Krita text tool does not respect empty lines

Description Tyson Tan 2018-03-29 02:39:23 UTC
Created attachment 111716 [details]
Krita text tool does not respect empty lines

krita-4.1.0-pre-alpha-ddc6882-x86_64.appimage

Krita text tool does not respect empty lines, or lines with spaces only.
Comment 1 Halla Rempt 2018-04-02 18:12:38 UTC
*** Bug 392646 has been marked as a duplicate of this bug. ***
Comment 2 Dmitry Kazakov 2018-04-03 13:32:43 UTC
Git commit ae3c2cfbd1bcb015ef0c2e7d095a995bc5bff747 by Dmitry Kazakov.
Committed on 03/04/2018 at 13:32.
Pushed by dkazakov into branch 'master'.

Let Text Shape have empty lines

SVG does not support adding relative offset for empty tags (and
mere spaces are considered as just "nothing" in xml), so if we
want to represent empty lines, we should just change the offset
of the lines with sane data.

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

https://commits.kde.org/krita/ae3c2cfbd1bcb015ef0c2e7d095a995bc5bff747
Comment 3 Tyson Tan 2018-04-03 13:57:09 UTC
Thank you Dmitry!

Yeah I was suspecting this to be a SVG compliance induced issue as well. SVG is just too restraint for text in artwork. I think Krita might be better off keeping its own text info format inside .kra files, only convert Krita text to SVG text for export/copy.
Comment 4 Dmitry Kazakov 2018-04-07 13:44:50 UTC
Git commit ea60cd8a930334fc544284034bc5c4d797b3e94b by Dmitry Kazakov.
Committed on 07/04/2018 at 13:28.
Pushed by dkazakov into branch 'krita/4.0'.

Let Text Shape have empty lines

SVG does not support adding relative offset for empty tags (and
mere spaces are considered as just "nothing" in xml), so if we
want to represent empty lines, we should just change the offset
of the lines with sane data.

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

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