Bug 117386 - EXPORT SVG Text spacing not preserved by SVG export filter
Summary: EXPORT SVG Text spacing not preserved by SVG export filter
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, filter:svg, regression
Depends on:
Blocks: SVG-Save
  Show dependency treegraph
 
Reported: 2018-05-02 12:06 UTC by Florian Reisinger
Modified: 2025-11-07 03:13 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Top left: Exported SVG Bottom left: Corrected SVG ight: Draw preview (154.14 KB, image/png)
2018-05-02 12:08 UTC, Florian Reisinger
Details
Draw example file (page 2) (37.06 KB, application/vnd.oasis.opendocument.graphics)
2018-06-08 04:58 UTC, Florian Reisinger
Details
SVG export with LO 3.6.7.2 (5.59 KB, image/svg+xml)
2023-11-07 12:52 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Reisinger 2018-05-02 12:06:44 UTC
Description:
See attached files (my first bug report for a long time, unable to see "upload attachment")

On page 2 of the attached fodg file there is a rectangle with rounded corners with the text "GUI". It has a custom spacing of 100pt, which is lost on SVG export

Steps to Reproduce:
Open file (or create one with a custom line spacing)

Actual Results:  
Line spacing not preserved

Expected Results:
Line spacing exported (SVG supports it)


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
Comment 1 Florian Reisinger 2018-05-02 12:08:27 UTC
Created attachment 141835 [details]
Top left: Exported SVG Bottom left: Corrected SVG ight: Draw preview

Added attachment
Comment 2 Florian Reisinger 2018-05-02 12:10:06 UTC
Same result with:

Version: 6.1.0.0.alpha1 (x64)
Build-ID: cb47f0d320994e001bc38dc2ee9b7d957b15e6ab
CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; 
Gebietsschema: de-AT (de_AT); Calc: CL
Comment 3 Buovjaga 2018-06-07 17:38:33 UTC
You only attached a screenshot, please attach test files.
Comment 4 Florian Reisinger 2018-06-08 04:58:09 UTC
Created attachment 142606 [details]
Draw example file (page 2)

Page 2 of this file is the example file...
Comment 5 Buovjaga 2018-06-08 11:58:07 UTC
Repro, already in 4.3.0 (Win), but not yet in 3.6.7

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 67aaa98600269e6b8fa631146c3649a261369471
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on June 7th 2018

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 6 Buovjaga 2018-07-10 20:25:55 UTC
Bibisected with Linux 43all to range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=5b195fbcf7a441aeb193f6abd08b877e580938e0...7c4d3ea6ba4d42b4dda5148a00c8c411b5d7703d

It has several SVG export commits from Thorsten.

Adding Cc: to Thorsten Behrens
Comment 7 QA Administrators 2019-12-04 04:20:38 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2021-12-04 04:42:16 UTC Comment hidden (obsolete)
Comment 9 Gabor Kelemen (Collabora) 2022-06-02 17:51:58 UTC
Still bad in:

Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: 754eb1541a6ca709f78afbc7fb2b75f626562dcc
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded
Comment 10 Stéphane Guillou (stragu) 2023-07-12 16:57:13 UTC
Same in recent master build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 77fca616e0bd79e0b405fd0b3543cf8e94e15df3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 11 Stéphane Guillou (stragu) 2023-11-07 12:52:03 UTC
Created attachment 190701 [details]
SVG export with LO 3.6.7.2

Before the regression, the three letters would each have their fixed x position:

     <g fill="rgb(53,211,50)" stroke="none">
      <text x="5676" y="19928">G</text>
      <text x="11778" y="19928">U</text>
      <text x="17652" y="19928">I</text></g>

In a recent trunk build, they are grouped in a single text element:

        <text class="SVGTextShape"><tspan class="TextParagraph"><tspan class="TextPosition" x="5678" y="19927"><tspan font-family="Franklin Gothic Demi, sans-serif" font-size="5292px" font-weight="400" fill="rgb(53,211,50)" stroke="none" style="white-space: pre">GUI</tspan></tspan></tspan></text>

Our filter could maybe use the attribute "letter-spacing"?
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/letter-spacing

For example, replace the above with:

        <text class="SVGTextShape"><tspan class="TextParagraph"><tspan class="TextPosition" x="5678" y="19927" letter-spacing="1500"><tspan font-family="Franklin Gothic Demi, sans-serif" font-size="5292px" font-weight="400" fill="rgb(53,211,50)" stroke="none" style="white-space: pre">GUI</tspan></tspan></tspan></text>
Comment 12 QA Administrators 2025-11-07 03:13:40 UTC
Dear Florian Reisinger,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug