Bug 86938 - Inserted SVG image gets mangled: vertical position of text
Summary: Inserted SVG image gets mangled: vertical position of text
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Xisco Faulí
URL:
Whiteboard: target:24.2.0 target:7.6.1
Keywords: filter:svg
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2014-12-02 17:07 UTC by Juang Dse
Modified: 2023-11-07 12:23 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample svg (1.32 KB, image/svg+xml)
2014-12-02 17:07 UTC, Juang Dse
Details
How the SVG renders in multiple programs (18.02 KB, image/png)
2014-12-09 22:59 UTC, Robinson Tryon (qubit)
Details
simplify document (283 bytes, image/svg+xml)
2023-08-14 15:22 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juang Dse 2014-12-02 17:07:21 UTC
Created attachment 110364 [details]
sample svg

The attached simple svg file (showing text below a bar line) gets mangled when inserted into writer via: Insert - Image from file.
Comment 1 Robinson Tryon (qubit) 2014-12-09 22:33:50 UTC
Comment on attachment 110364 [details]
sample svg

Fix attachment MIMEtype
Comment 2 Robinson Tryon (qubit) 2014-12-09 22:44:32 UTC
(In reply to Juang Dse from comment #0)
> The attached simple svg file (showing text below a bar line) gets mangled
> when inserted into writer via: Insert - Image from file.

TESTING with LO 4.4.0.0.beta2 + Ubuntu 14.04

- In FF 34, the sample SVG shows a short line segment and the word "below" horizontally centered below the segment, with some whitespace between the two
- Imported into LO 4.4.0.0.beta2, the SVG has the word "below" centered on the segment, but the two are overlapping with no vertical whitespace inbetween

CONFIRMED

Note: If you open the SVG in Draw, the vertical whitespace exists, but the word is no longer horizontally centered on the line segment.

Status -> NEW
Comment 3 Robinson Tryon (qubit) 2014-12-09 22:59:47 UTC
Created attachment 110655 [details]
How the SVG renders in multiple programs
Comment 4 QA Administrators 2015-12-20 16:20:55 UTC Comment hidden (obsolete)
Comment 5 Juang Dse 2015-12-21 09:06:42 UTC
bug still present in 5.0.4.2/Linux x86_64.
Comment 6 Xisco Faulí 2016-10-08 18:22:40 UTC
This is still reproducible in

Version: 5.3.0.0.alpha0+
Build ID: ae3ec79354f7b4967e736c6a4cd7c08fc52e2b7d
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 7 QA Administrators 2017-10-30 08:33:20 UTC Comment hidden (obsolete)
Comment 8 Juang Dse 2017-10-30 11:06:48 UTC
This bug is still present using

Version: 6.0.0.0.alpha1+
Build ID: d30522e46ca884e9bc74af21711d9537e8118859
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-10-29_23:52:49
Locale: en-US (en_US.UTF-8); Calc: group
Comment 9 Roman Kuznetsov 2018-06-19 10:58:36 UTC
still repro in LibreOffice 6.1 beta 2
Comment 10 QA Administrators 2019-06-20 02:50:48 UTC Comment hidden (obsolete)
Comment 11 Juang Dse 2019-06-20 07:07:35 UTC
bug still exists in

Version: 6.2.4.2
Build ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.utf8); UI-Language: en-US
Calc: threaded
Comment 12 QA Administrators 2021-06-20 03:46:19 UTC Comment hidden (obsolete)
Comment 13 Juang Dse 2021-06-24 07:29:30 UTC
in 3.3, the image appears even more corrupted than with the most recent LO.
Comment 14 Hossein 2021-12-19 20:29:24 UTC
Still reproducible in the latest LibreOffice 7.4 master.

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 6ca94dbd576be7aaa643393e2a9e2ee1c723c357
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 15 Stéphane Guillou (stragu) 2022-11-23 11:05:13 UTC
Also reproduced in:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: deb7bc82de19ea8e20c767fdf21f9ba4feb5e9f0
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

and

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1435c5b12646269e2b5b58ec7d51626dce6505db
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Same in Draw and Writer.
Comment 16 Xisco Faulí 2023-08-14 14:01:53 UTC
The problem is related to baseline-shift="-12"
Comment 17 Xisco Faulí 2023-08-14 15:22:56 UTC
Created attachment 188972 [details]
simplify document
Comment 18 Commit Notification 2023-08-15 01:53:35 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a2b6be8af9be3237efc3ed1244302cf899680e97

tdf#86938: fix calculation of baseline-shift

It will be available in 24.2.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.
Comment 19 BogdanB 2023-08-15 16:15:00 UTC
Verified.

Good in
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6c06c8a2be3d8cbbcb8ab1aaaeb04db95114dfcb
CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Bad in (for comparison)
Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 20 Commit Notification 2023-08-19 09:48:20 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/86d39aec6ab4205955921406d2512d6eab8d3fe8

tdf#86938: fix calculation of baseline-shift

It will be available in 7.6.1.

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.