Bug 411475

Summary: Empty lines in text object not preserved as empty lines because SVG 1.1 doesn't have a concept of lines.
Product: [Applications] krita Reporter: acc4commissions
Component: Tool/TextAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: ghevan, griffinvalley
Priority: NOR    
Version First Reported In: 4.2.5   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: recording of the problem

Description acc4commissions 2019-08-31 14:45:54 UTC
Created attachment 122438 [details]
recording of the problem

SUMMARY


STEPS TO REPRODUCE
1. Make a text and put 2,3 blank lines and save it in the editor.
2. Re-open the editor. Select the whole text.

OBSERVED RESULT
The blank lines are gone, and the line height of the whole text is multiplied.

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: Win7
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 wolthera 2019-09-21 15:11:40 UTC
Yeah, this is caused by the way SVG 1.1 multiline text works, and will probably not be resolved until we have proper SVG 2 multiline text.
Comment 2 acc4commissions 2020-01-16 18:08:15 UTC
Are you sure? As far as I remember it worked in older versions of krita(that has the SVG text tool);
Comment 3 vanyossi 2020-01-17 06:00:16 UTC
Yes we are sure, Svg text editor works with Qt SVG spec which currently is at SVG 1.1, this spec does not have defined line breaks inside a text block. In previous versions you could get around that limitation using the Unicode new line (U+2424) character, but under certain circunstances that glyph caused the SVG render to get confused and loop forever, so we patched that possibility.