https://bugs.kde.org/show_bug.cgi?id=472829

            Bug ID: 472829
           Summary: White-space at soft wrap opportunity should hang
    Classification: Applications
           Product: krita
           Version: git master (please specify the git hash!)
          Platform: Microsoft Windows
                OS: Microsoft Windows
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Tool/Text
          Assignee: krita-bugs-n...@kde.org
          Reporter: al...@alvinhc.com
                CC: griffinval...@gmail.com
  Target Milestone: ---

With this SVG:
```svg
<text text-rendering="auto" fill="#000000" stroke-opacity="0" stroke="#000000"
stroke-width="0" stroke-linecap="square" stroke-linejoin="bevel"
letter-spacing="0" word-spacing="0" style="inline-size: 84.88;text-align:
start;
text-align-last: auto;font-family: Noto Sans;font-size: 9;
white-space: pre-wrap;"><tspan>Alpha Bravo Charlie Delta Echo</tspan></text>
```

In Krita, the word "Charlie" is soft wrapped onto the second line. However,
there is still enough room on the first line to place the word "Charlie" so the
soft wrap should only happen after it. (See screenshot.)

CSS Text Module Level 3 ยง4.1.2
(https://www.w3.org/TR/css-text-3/#white-space-phase-2) states:

> 4. If there remains any sequence of white space, other space separators,
> and/or preserved tabs at the end of a line [...]:
> - If `white-space` is set to `normal`, `nowrap`, or `pre-line`, the UA
>   must hang this sequence (unconditionally).
> - If `white-space` is set to `pre-wrap`, the UA must (unconditionally)
>   hang this sequence, unless the sequence is followed by a forced line
>   break, in which case it must conditionally hang the sequence instead.
>   It may also visually collapse the character advance widths of any that
>   would otherwise overflow.
> [...]

See also Example 9.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to