Bug 161004

Summary: FILEOPEN SVG Text is crammed
Product: LibreOffice Reporter: Gabor Kelemen (allotropia) <kelemeng>
Component: filters and storageAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: stephane.guillou, xiscofauli
Priority: medium Keywords: filter:svg
Version: 7.0.0.3 release   
Hardware: All   
OS: Linux (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 88278    
Attachments: Example SVG from the wild with letters crammed on each other
How it looks in Draw
How it looks under Windows
Firefox ( top left ), Eye of Gnome ( bottom left ), Inkscape 1.2.2 ( Right )

Description Gabor Kelemen (allotropia) 2024-05-09 10:42:17 UTC
Created attachment 194046 [details]
Example SVG from the wild with letters crammed on each other

Attached example SVG file is extracted from the example file on 

https://www.ablebits.com/office-addins-blog/excel-randarray-function-generate-random-numbers/ 

The text is not readable under Linux, but it is under Windows.

1. Open attached image in Draw or insert it into Writer/Calc
-> Text is not readable.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6d5d9eaa61505cebaf3bde4bfc157d8e19fec8de
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

and back to 5.2, in 4.4 not all of the text was visible. Can't make the 5.0 bibisect repo work and there is none for 5.1.
Comment 1 Gabor Kelemen (allotropia) 2024-05-09 10:43:53 UTC
Created attachment 194047 [details]
How it looks in Draw

In the original XLSX it started to look like this when the SVG import from OOXML support was added, but the SVG itself looked bad before.
Comment 2 Xisco Faulí 2024-05-09 10:50:55 UTC
I get a similar result with Firefox, Chrome or Inkscape
Comment 3 Gabor Kelemen (allotropia) 2024-05-09 10:50:58 UTC
Created attachment 194049 [details]
How it looks under Windows

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7a895ec4205659038aa95941b65715fed1a3e7be
CPU threads: 6; OS: Windows 10 (10.0 build 19045); UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default
Comment 4 Xisco Faulí 2024-05-09 10:56:10 UTC
Same issue with Inkscape, it's fine On Windows but not on Linux. I'm wondering whether this is an issue in Cairo ?
Comment 5 Gabor Kelemen (allotropia) 2024-05-09 11:50:51 UTC
It started to look good under Windows in 5.2 with:

https://git.libreoffice.org/core/+/dc3eb865bd10e690dbf80f41277b062ac2253572

author	Xisco Fauli <anistenis@gmail.com>	Fri Dec 11 16:11:03 2015 +0100
committer	Armin Le Grand <Armin.Le.Grand@cib.de>	Thu Dec 17 12:23:38 2015 +0000

tdf#32248 SVG: first attempt to support tspan elements
Comment 6 Xisco Faulí 2024-05-09 11:54:58 UTC
(In reply to Gabor Kelemen (allotropia) from comment #5)
> It started to look good under Windows in 5.2 with:
> 
> https://git.libreoffice.org/core/+/dc3eb865bd10e690dbf80f41277b062ac2253572
> 
> author	Xisco Fauli <anistenis@gmail.com>	Fri Dec 11 16:11:03 2015 +0100
> committer	Armin Le Grand <Armin.Le.Grand@cib.de>	Thu Dec 17 12:23:38 2015
> +0000
> 
> tdf#32248 SVG: first attempt to support tspan elements

Hi Gabor,
That bisection it wrong. In the past LibreOffice had 2 svg filters, one for importing ( filter/source/svg/ )and the other for inserting ( svgio/ ). At some point, the importing one was removed and svgio is used everywhere nowadays. If you want to bisect it with old repositories, you have to use Insert - Image
Comment 7 Gabor Kelemen (allotropia) 2024-05-09 12:04:00 UTC
(In reply to Xisco Faulí from comment #4)
> Same issue with Inkscape, it's fine On Windows but not on Linux. I'm
> wondering whether this is an issue in Cairo ?

I just installed Inkscape on Ubuntu 22.04 from snap, v1.3.2 can show the svg correctly.
Older version 1.1.2 from apt also can show it correctly.

Which version does not work for you?
Comment 8 Xisco Faulí 2024-05-09 12:09:09 UTC
Created attachment 194052 [details]
Firefox ( top left ),  Eye of Gnome ( bottom left ), Inkscape 1.2.2 ( Right )
Comment 9 Gabor Kelemen (allotropia) 2024-05-09 13:14:38 UTC
(In reply to Xisco Faulí from comment #8)
> Created attachment 194052 [details]
> Firefox ( top left ),  Eye of Gnome ( bottom left ), Inkscape 1.2.2 ( Right )

Strange, for me all these display it correctly.

Indeed looks like not only our bug.

I have this cairo version: 

ii  libcairo2:amd64                    1.16.0-5ubuntu2 amd64                Cairo 2D vector graphic>
Comment 10 Xisco Faulí 2024-05-09 13:29:38 UTC
(In reply to Gabor Kelemen (allotropia) from comment #9)
> ii  libcairo2:amd64                    1.16.0-5ubuntu2 amd64               
> Cairo 2D vector graphic>

Mine is 1.16.0-7
Comment 11 Stéphane Guillou (stragu) 2024-05-27 07:22:38 UTC
For me, on Ubuntu 22.04 + GNOME 42.9 + 1.16.0-5ubuntu2:

- Firefox: bad
- Eye of GNOME: bad 
- LO 7.0.0.3 and 24.8 alpha1+: bad
- Chromium: bad, but not as bad (a couple of character run into each other a little)
- Inkscape 1.3.1: bad

On macOS 10.15.7:

- Safari: bad
- LO 24.2.2.2: good (!)