Bug 159566

Summary: SVG import: mis-positioned text for specific file
Product: LibreOffice Reporter: Miklos Vajna <vmiklos>
Component: DrawAssignee: Not Assigned <libreoffice-bugs>
Status: VERIFIED FIXED    
Severity: normal CC: xiscofauli
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=156834
Whiteboard: target:24.8.0 target:24.2.1 target:7.6.6
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 88278    
Attachments: Test SVG
LO vs inkscape render result

Description Miklos Vajna 2024-02-05 11:29:57 UTC
Created attachment 192405 [details]
Test SVG

Steps to reproduce:

1) Open the attachment, created in Inkscape

2) Also open the attachment in LO (Draw)

3) Compare the two.

Expected result: the two mostly match

Actual result: at least the "we do this" string has a wrong vertical position. I'm not sure if the root cause is the same, but you can also notice that the big "S" & "K" letters on the left also intersect with the outline of the cube, while they don't in inkscape

Probably not an inkscape bug, because converting the svg to emf using 'convert' on the Linux cmdline then produces an emf that's opened quite good also in LO.
Comment 1 Miklos Vajna 2024-02-05 11:30:14 UTC
Created attachment 192406 [details]
LO vs inkscape render result
Comment 2 Xisco FaulĂ­ 2024-02-05 12:40:14 UTC
The problem is that LibreOffice doesn't support dominant-baseline="central"
Comment 3 Commit Notification 2024-02-05 15:45:05 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#159566: match 'central' dominant-baseline to 'middle'

It will be available in 24.8.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 4 Commit Notification 2024-02-06 07:18:31 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/96cc4fa5c4ba0794ea8febb19c3a6b5b010a8528

tdf#159566: match 'central' dominant-baseline to 'middle'

It will be available in 24.2.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.
Comment 5 Miklos Vajna 2024-02-06 11:20:46 UTC
Works fine, thanks. :-)
Comment 6 Commit Notification 2024-02-06 12:06:07 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/3b19b19c85ca6ff540e475e846c82ce83bc7f503

tdf#159566: match 'central' dominant-baseline to 'middle'

It will be available in 7.6.6.

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.