Bug 479353

Summary: Failure to insert multiple spaces into text (also failure to inset tabs) even though they are indicated in the text editor.
Product: [Applications] krita Reporter: john@ridgwaydesign.fsnet.co.uk <johnridgwaydesign>
Component: Tool/TextAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: griffinvalley
Priority: NOR    
Version First Reported In: 5.2.2   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: 1: The desired result.
1. Desired result 2. Rich text 3. svg code 4. resulting text for artwork

Description john@ridgwaydesign.fsnet.co.uk 2024-01-03 11:14:46 UTC
Created attachment 164646 [details]
1: The desired result.

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Using text editor (Rich text mode) to create art for speech balloons and captions.
2. Add extra spaces in text editor. These are added so that the first letter of the caption can be omitted (this will be created on a separate layer and will incorporates drop shadow.
3. 

OBSERVED RESULT While the spaces are clearly indicated in the rich text editor and the in the svg source code, they are not produced in the artwork.


EXPECTED RESULT


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

ADDITIONAL INFORMATION
Comment 1 john@ridgwaydesign.fsnet.co.uk 2024-01-03 11:18:50 UTC
Created attachment 164647 [details]
1. Desired result 2. Rich text 3. svg code 4. resulting text for artwork
Comment 2 wolthera 2024-01-03 12:16:55 UTC
Hi,

This is because the default white-space rule is 'normal', which removes duplicate spaces. This default will be changed in Krita 5.3, where incidentally, we'll also have a more ergonomic text tool overall. You can go into the SVG source editor to add 'white-space:pre-wrap' to the root 'style' attribute if you need spaces right now.

*** This bug has been marked as a duplicate of bug 474674 ***