Bug 151674 - svg import of subscript distorted
Summary: svg import of subscript distorted
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.5.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: SVG-Import regression-scaled-glyph-positions
  Show dependency treegraph
 
Reported: 2022-10-21 07:46 UTC by Juang Dse
Modified: 2023-11-22 11:11 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
foo.svg (7.55 KB, image/svg+xml)
2022-10-21 07:47 UTC, Juang Dse
Details
SVG transform: translated & rotated regression (45.17 KB, image/png)
2022-10-21 16:31 UTC, V Stuart Foote
Details
clip of unmodified SVG from 7.4.3, the other had been changed (15.60 KB, image/png)
2022-10-21 16:55 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juang Dse 2022-10-21 07:46:35 UTC
Description:
when importing the attached svg image into writer, the subscript gets distorted

Steps to Reproduce:
1. open new text document
2. insert foo.svg (attached)

Actual Results:
subscript on y-axis gets distorted

Expected Results:
subscript on y-axis not distorted


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: f486d2220d5b51f422c8feca21c831e1c1d143d7
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Juang Dse 2022-10-21 07:47:25 UTC
Created attachment 183183 [details]
foo.svg
Comment 2 V Stuart Foote 2022-10-21 16:31:09 UTC
Created attachment 183191 [details]
SVG transform: translated & rotated regression

confirmed, but uncertain about multiple runs within the same translate & rotate span from the source SVG, intent is to have a "subscript" of reduced height font--at 7.4.3 it only is center aligned, at 7.5.0 the two runs are left aligned but split vertically in the transform.

   <g font-family="'Liberation Sans'" font-style="normal" xml:space="preserve" font-size="13.2" transform="translate(5.9,130.275) rotate(-90,24.5,0)" font-weight="normal">
    <text fill="rgb(38,38,38)" y="-2" x="0 9 18 ">HHH</text>
    <text fill="rgb(38,38,38)" y="-0" font-size="9.24" x="27 29 34 39 44 ">index</text>
   </g>

seems we've changed handling between 7.4 and 7.5 but both do not achieve the subscript look. 

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded


Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: b887d67ff9914100df787bd2036b22bf32456fab
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 3 V Stuart Foote 2022-10-21 16:34:10 UTC
7.4 was wrong, but more wrong at master against 7.5?
Comment 4 V Stuart Foote 2022-10-21 16:55:20 UTC
Created attachment 183192 [details]
clip of unmodified SVG from 7.4.3, the other had been changed

wait, scratch that about the 7.4.3 being center aligned. It is correct and appears as subscript. I'd switched sequence of the text runs but not their y offset.

This is the correct picture at 7.4.3

So just a regression against master/7.5.0a0+
Comment 5 raal 2022-10-22 08:28:37 UTC
This seems to have begun at the below commit.
Adding Cc: to Caolán McNamara; Could you possibly take a look at this one?
Thanks
 5e9e431b4a9bc67357adaf635c34bdfd3ee61321 is the first bad commit
commit 5e9e431b4a9bc67357adaf635c34bdfd3ee61321
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Aug 18 20:45:42 2022 +0200

    source 1fa731d03ba0f22cb9392a578124ea977eaab2e9

https://git.libreoffice.org/core/+/1fa731d03ba0f22cb9392a578124ea977eaab2e9
Comment 6 Caolán McNamara 2022-10-22 20:27:18 UTC
https://gerrit.libreoffice.org/c/core/+/141673/1
Comment 7 Commit Notification 2022-10-23 15:05:40 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/698ba5fcd9f01f8f6e9f300d914d8538ad527219

tdf#151674 rotate text starting point

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.