Bug 391351 - [retro-compatibility] Text scaling issue after opening Krita 3.x *.kra
Summary: [retro-compatibility] Text scaling issue after opening Krita 3.x *.kra
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2018-03-03 20:47 UTC by David REVOY
Modified: 2018-03-17 08:56 UTC (History)
1 user (show)

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


Attachments
[^ screenshot of the scaling issue: 3.x file in 4.0 ] (207.37 KB, image/jpeg)
2018-03-03 20:47 UTC, David REVOY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2018-03-03 20:47:50 UTC
Created attachment 111167 [details]
[^ screenshot of the scaling issue: 3.x file in 4.0 ]

Hi,

I tried to open my old files containing texts with Krita 4.0beta. I saw a big scaling issue (visible on the screenshot in attachment).

To reproduce, I join a zip with the Krita *.kra file and a *.jpg export done with 3.x : https://www.peppercarrot.com/extras/temp/2018-03-03_bug-text-scaling-krita40.zip (7,8MB) ; The font is an open one; Yanone Kaffeesatz and you can download the family here: https://www.dafont.com/yanone-kaffeesatz.font

Note: I'm not expecting a pixel-perfect matching between 3.x and 4.x, but a roughly similar scaling/positioning/size would be great!
Comment 1 Halla Rempt 2018-03-05 10:10:30 UTC
I'm not sure whether this can be fixed, but I'll ask Dmitry to take a look.
Comment 2 Dmitry Kazakov 2018-03-09 11:06:45 UTC
Git commit d270a5706b7cdf1a1d1dfa58a066a63adea58935 by Dmitry Kazakov.
Committed on 09/03/2018 at 11:06.
Pushed by dkazakov into branch 'master'.

Fix loading of Artistic Shape objects saved by Krita 3.x

In Krita 3.x we used hardcoded SVG and Font resolution (90 and 96ppi
correspondingly). So we should resemble that behavior in newer
versions.

M  +2    -0    libs/flake/KoShapeRegistry.cpp
M  +1    -0    libs/flake/svg/SvgGraphicContext.cpp
M  +1    -0    libs/flake/svg/SvgGraphicContext.h
M  +7    -0    libs/flake/svg/SvgParser.cpp
M  +4    -0    libs/flake/svg/SvgParser.h
M  +17   -9    libs/flake/svg/SvgShapeFactory.cpp
M  +1    -4    libs/flake/svg/SvgShapeFactory.h
M  +6    -1    libs/flake/svg/SvgStyleParser.cpp

https://commits.kde.org/krita/d270a5706b7cdf1a1d1dfa58a066a63adea58935
Comment 3 Halla Rempt 2018-03-17 08:56:35 UTC
Git commit 664fbcb72d23356cdf46677a8cc1f770e9c7978e by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 17/03/2018 at 08:54.
Pushed by rempt into branch 'krita/4.0'.

Fix loading of Artistic Shape objects saved by Krita 3.x

In Krita 3.x we used hardcoded SVG and Font resolution (90 and 96ppi
correspondingly). So we should resemble that behavior in newer
versions.
(cherry picked from commit d270a5706b7cdf1a1d1dfa58a066a63adea58935)

M  +2    -0    libs/flake/KoShapeRegistry.cpp
M  +1    -0    libs/flake/svg/SvgGraphicContext.cpp
M  +1    -0    libs/flake/svg/SvgGraphicContext.h
M  +7    -0    libs/flake/svg/SvgParser.cpp
M  +4    -0    libs/flake/svg/SvgParser.h
M  +17   -9    libs/flake/svg/SvgShapeFactory.cpp
M  +1    -4    libs/flake/svg/SvgShapeFactory.h
M  +6    -1    libs/flake/svg/SvgStyleParser.cpp

https://commits.kde.org/krita/664fbcb72d23356cdf46677a8cc1f770e9c7978e