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

            Bug ID: 429351
           Summary: Copy and paste in editor is losing kerning property
           Product: krita
           Version: nightly build (please specify the git hash!)
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Tool/Text
          Assignee: krita-bugs-n...@kde.org
          Reporter: lucidsunli...@yandex.ru
  Target Milestone: ---

SUMMARY
Kerning property is not carried over, the copy will have kerning enabled
regardless of previous setting and GUI toggle will show it disabled.

STEPS TO REPRODUCE
1. Pick a font with kerning support (e.g. Noto Sans)
1. Create a "Placeholder Text" object
2. Disable kerning (via GUI toggle, or by saving the text and reopening the
editor if on 4.4.1)
3. Select and copy "Placeholder Text"
4. Paste it on new line
5. Compare "Text" between two lines

OBSERVED RESULT
Pasted text have kerning enabled.

EXPECTED RESULT
Pasted text have kerning disabled.

SOFTWARE/OS VERSIONS
Linux: 5.9.8-arch1-1 
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1

ADDITIONAL INFORMATION
Can be reproduced on 4.4.1, but requires some extra steps due to invalid
kerning property handling and lack of GUI toggle, git hashes which fixes that
and add the toggle:
- on master: f837e086a5a4fbcff48b15e044e1684912fa2524
- on krita/4.3: 885641566f182ce316b068bb6d4b015cb0c2a55c

GUI toggle not being active is caused by `QTextCharFormat::fontKerning()` in
`SvgTextEditor::checkFormat()` reporting `false`, despite copy having kerning
enabled.

The copy seems to be using HTML under the hood, and `QTextDocument::toHtml()`
doesn't convert kerning.

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

Reply via email to