Bug 474674 - Text Tool doesn't recognize any white spaces in front of the first line
Summary: Text Tool doesn't recognize any white spaces in front of the first line
Status: RESOLVED NOT A BUG
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 479353 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-19 00:45 UTC by Tyson Tan
Modified: 2024-01-03 12:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Krita New Text Engine doesn't recognize the first white spaces in the first line (90.53 KB, image/png)
2023-09-19 00:45 UTC, Tyson Tan
Details
Krita Text Tool can't recognize white spaces in front of the first line KRA (293.05 KB, application/x-krita)
2023-09-19 00:46 UTC, Tyson Tan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2023-09-19 00:45:28 UTC
Created attachment 161709 [details]
Krita New Text Engine doesn't recognize the first white spaces in the first line

After upgrading to the new text engine, Krita now fails to recognize the first white spaces in the first line of a text shape. 

All white spaces in front of the first line is now ignored. But they work fine starting from the second line.

I used full-width white spaces in the sample, which is widely used in CJK countries. But it is the same for half-width white spaces used in western countries.
Comment 1 Tyson Tan 2023-09-19 00:46:29 UTC
Created attachment 161710 [details]
Krita Text Tool can't recognize white spaces in front of the first line KRA
Comment 2 wolthera 2023-09-19 07:53:16 UTC
Hi Tyson,

Good news, this isn't a bug, but rather that by default we're supossed to 'trim' those first spaces. The other good news is that we'll be making the default that new texts are created with white-space:pre-wrap; , which does not do that. You can add this value to the css in the source view of the text editor to see for yourself.

I suppose the only bad news is that I've already done that in the text cursor branch, but because everyone else is busy with getting 5.2 finished, no one really has time to review and answer my questions, making progress on that slow, but having 5.2 released will probably solve that.
Comment 3 Tyson Tan 2023-09-19 08:37:27 UTC
Thanks for the explanation! :D
Comment 4 wolthera 2024-01-03 12:16:55 UTC
*** Bug 479353 has been marked as a duplicate of this bug. ***