Bug 429051 - Percentage values in SVG source are inconsistent
Summary: Percentage values in SVG source are inconsistent
Status: ASSIGNED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (other bugs)
Version First Reported In: 4.4.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: wolthera
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-13 09:39 UTC by Awakening
Modified: 2023-01-06 13:56 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Awakening 2020-11-13 09:39:19 UTC
SUMMARY
When setting percentage value in SVG source, and clicking Save multiple times, the converted value seems to be inconsistent with each save, until eventually settling. 
The higher the percentage value, the longer it takes for value to settle. 

STEPS TO REPRODUCE
1. Create a placeholder text object
2. Switch to SVG source
3. Change letter-spacing from 0 to 5%
4. Click Save multiple times

OBSERVED RESULT
Letter spacing changing with each save, until eventually settling (after 11 or so saves).

EXPECTED RESULT
Letter spacing not change after first save.

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
Comment 1 Ahab Greybeard 2020-11-13 19:47:46 UTC
I can confirm this for the Nov 13 4.4.3 alpha (git 235939b) appimage.
Comment 2 wolthera 2023-01-06 13:56:24 UTC
I can still reproduce this one with the rewritten text-layout, which uses CSS3 letter-spacing... which doesn't have percentage, so at heart this is a parsing bug.

I'm going to figure out the precise nature of the parsing bug, but if I'm correct SVG2 switched to CSS3 letter-spacing specifically because percentage based letter-spacing caused trouble, so I *might* remove parsing it altogether if I can't figure it out.