Bug 114941 - SVG insert: Font width or spacing is incorrect (depending on zoom level)
Summary: SVG insert: Font width or spacing is incorrect (depending on zoom level)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:svg
Depends on:
Blocks: SVG-Import Zoom
  Show dependency treegraph
 
Reported: 2018-01-10 08:25 UTC by James Harkins
Modified: 2023-07-14 00:21 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
SVG which displays incorrectly when imported into Writer (427.67 KB, image/svg+xml)
2018-01-10 08:25 UTC, James Harkins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Harkins 2018-01-10 08:25:04 UTC
Created attachment 139007 [details]
SVG which displays incorrectly when imported into Writer

I have an SVG file, exported by LibreOffice Draw. It contains a number of text boxes with borders, containing text using the Inconsolata[1] monospaced font.

In my original ODG file, the boxes completely enclose the text. The SVG display is identical to the ODG in Inkscape and Firefox.

If I import this SVG into an empty Writer document, in some of the text boxes, the text now spills over past the right border. One of two possibilities: either the boxes' width has shrunk while the text did not, or the text width/spacing expanded while the boxes remained the same. Either way, it's not accurate scaling.

I originally saw the issue in LO 5.1.6. I retested importing the original SVG into LO Writer 5.4.4, same issue.

I'm attaching the specific SVG, created in LO Draw 5.1.6. I tried to create a more minimal-example SVG in 5.4.4, but it seems SVG export is broken in this version (the box around the text exported incorrectly). I also tried to export only the text from Draw, and add the box in Inkscape, but that SVG did not reproduce the problem. So for now, I will have to use the original file.
Comment 1 Buovjaga 2018-02-11 11:45:53 UTC
I confirm. It is seen in f.ex. the topmost box. I noticed it depends on the zoom level. Check quickly with Ctrl-scrollwheel.

Please also attach the original Draw file.

Version 3.3 displays the SVG as a total mess.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: c6a23023150c164a19236139fa413d43006ce21c
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on February 11th 2018

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 2 QA Administrators 2019-02-12 03:42:47 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2021-02-12 04:14:49 UTC Comment hidden (obsolete)
Comment 4 V Stuart Foote 2022-12-07 18:46:36 UTC
The text run "PATTERN STRING" still pass out of their on graphic bounding box by a character or so, and exact position between the characters and the box outline shift slightly during zoom in or out. 

Also "spaces" in the comma separated runs are collapsed.  But fidelity is very high.

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 5 Stéphane Guillou (stragu) 2023-07-12 21:32:46 UTC
With the example SVG, I see the text spilling out of the boxes also in Firefox.
James reported that the SVG export was problematic, but we never got the original ODG so won't be able to test the export part.

I do however see the varying amount of spilling depending on zoom levels, so we can keep this open for that issue.

The zoom-dependent issue is gone after breaking.

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