Bug 392710 - Krita text tool does not respect multiple spaces next to each other
Summary: Krita text tool does not respect multiple spaces next to each other
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-04 12:05 UTC by Tyson Tan
Modified: 2018-10-04 02:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Krita text tool not respecting multiple spaces next to each other (22.27 KB, image/png)
2018-04-04 12:05 UTC, Tyson Tan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2018-04-04 12:05:15 UTC
Created attachment 111815 [details]
Krita text tool not respecting multiple spaces next to each other

krita-4.1.0-pre-alpha-39cc9f9-x86_64.appimage

When there are multiple spaces next to each other in the editor, Krita treat them as one space on canvas output.

I guess this is another SVG compliance induced issue? Using spaces to adjust letter placement is a very common, if not the only way to handle letter spacing in typography, especially when Krita doesn't have the ability to adjust letter spacing at the moment.
Comment 1 Halla Rempt 2018-04-04 12:31:58 UTC
It's probably caused by the fact that the text is now in xml, and xml normalizes spaces to one space.
Comment 2 Dmitry Kazakov 2018-10-02 20:05:30 UTC
Git commit 66127663d6930fcc8581997d977761a9f838ef49 by Dmitry Kazakov.
Committed on 02/10/2018 at 20:05.
Pushed by dkazakov into branch 'master'.

Fix loading of consequent special unicode whitespace characters

To add multiple consequent whitespaces, do the following:

1) Switch to SVG mode
2) Write   (for en-space) or   (for em-space)
   at the place where non-compressible characters should appear.
3) Now you may switch back into rich-text mode if needed, the
   mnemonics will be automatically converted into corresponding
   Unicode characters.

NOTE: non-numeric mnemonics, like   or   are not supported
      (is seems like SVG standard doesn't support that)

M  +3    -3    libs/flake/text/KoSvgTextChunkShape.cpp

https://commits.kde.org/krita/66127663d6930fcc8581997d977761a9f838ef49
Comment 3 Dmitry Kazakov 2018-10-02 20:06:02 UTC
Git commit 548f7522be86e78cdb82f436c39ce14e4ab3c860 by Dmitry Kazakov.
Committed on 02/10/2018 at 20:05.
Pushed by dkazakov into branch 'krita/4.1'.

Fix loading of consequent special unicode whitespace characters

To add multiple consequent whitespaces, do the following:

1) Switch to SVG mode
2) Write   (for en-space) or   (for em-space)
   at the place where non-compressible characters should appear.
3) Now you may switch back into rich-text mode if needed, the
   mnemonics will be automatically converted into corresponding
   Unicode characters.

NOTE: non-numeric mnemonics, like   or   are not supported
      (is seems like SVG standard doesn't support that)

M  +3    -3    libs/flake/text/KoSvgTextChunkShape.cpp

https://commits.kde.org/krita/548f7522be86e78cdb82f436c39ce14e4ab3c860
Comment 4 Tyson Tan 2018-10-04 02:58:36 UTC
(In reply to Dmitry Kazakov from comment #3)
> Git commit 548f7522be86e78cdb82f436c39ce14e4ab3c860 by Dmitry Kazakov.
> Committed on 02/10/2018 at 20:05.
> Pushed by dkazakov into branch 'krita/4.1'.
> 
> Fix loading of consequent special unicode whitespace characters
> 
> To add multiple consequent whitespaces, do the following:
> 
> 1) Switch to SVG mode
> 2) Write   (for en-space) or   (for em-space)
>    at the place where non-compressible characters should appear.
> 3) Now you may switch back into rich-text mode if needed, the
>    mnemonics will be automatically converted into corresponding
>    Unicode characters.
> 
> NOTE: non-numeric mnemonics, like   or   are not supported
>       (is seems like SVG standard doesn't support that)
> 
> M  +3    -3    libs/flake/text/KoSvgTextChunkShape.cpp
> 
> https://commits.kde.org/krita/548f7522be86e78cdb82f436c39ce14e4ab3c860

Thank you Dmitry!

But is it possible to do this without switching to SVG mode and input   ? For one I don't know about this code at all although being a HTML/CSS coder for many years now, we always use   .

I would love to see this implemented in a way that allows user to just input multiple [SPACE] in the Rich Text Editor.