Bug 93583 - EDITING formatted text on embedded SVG file displayed incorrectly
Summary: EDITING formatted text on embedded SVG file displayed incorrectly
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.4.5.2 release
Hardware: All Linux (All)
: low 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: 2015-08-21 21:41 UTC by Sawik
Modified: 2023-11-27 21:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshots of reported problem (56.82 KB, image/png)
2015-08-21 21:41 UTC, Sawik
Details
SVG file, that works incorrectly (17.36 KB, image/svg+xml)
2015-08-22 18:47 UTC, Sawik
Details
simplify document (deleted)
2023-08-14 11:08 UTC, Xisco Faulí
Details
simplify document (239 bytes, image/svg+xml)
2023-08-14 12:49 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sawik 2015-08-21 21:41:53 UTC
Created attachment 118080 [details]
screenshots of reported problem

SVG file generated by Gnuplot (a plot) displays correctly in inkscape (or risretto) but there are glitches while embedding into LO Draw (screen-shots attached to this report).

When some text has non-default formatting (superscript or italics) is misplaced relatively to rest of the text. Generating a plot without this formatting and thed adding it inside Inkscape does not solve the problem.

For me this bug is quite annoing, becouse I prefer to use vector graphics in order to reduce document file. And if I do this I'm stuck with incorrect formatting (mathematical expressions needs to be written using italics).
Comment 1 Joel Madero 2015-08-21 22:35:54 UTC
Please attach an actual svg instead of a screenshot. Marking as NEEDINFO - once you add it mark as UNCONFIRMED. Thanks
Comment 2 Joel Madero 2015-08-21 22:36:31 UTC
Also this is not a MAJOR bug - please don't overprioritize your own bugs. It being annoying to you is not the objective criteria that we prioritize based on. This is just a normal every day bug. Marking as such.
Comment 3 Sawik 2015-08-22 18:47:31 UTC
Created attachment 118095 [details]
SVG file, that works incorrectly
Comment 4 Sawik 2015-08-22 18:52:28 UTC
Marked unconfirmed as requested.

Sorry for overrating this bug, I'm pretty new here and I had not enough experience to choose proper option.

BTW, I'm quite interesting on the origins of this error.
Comment 5 Joel Madero 2015-08-23 20:16:10 UTC
@Sawik -

Thanks! Confirmed
Ubuntu 15.04 x64
LibreOffice 4.4.5.2 & 5.0.0.5

Setting Component to LibreOffice because it's any component that you insert it into.

Updating version - version is oldest version that demonstrates the issue.

Setting as:
New -
Normal - can prevent high quality work;
Low - This isn't going to impact a ton of users, it's specific to particular types of svg files. Already inserting images are not going to be incredibly common, inserting svg's less common, inserting svg's that have the characteristics of this file, less common.

Please know that these settings don't prevent developers from taking interest, it's just an objective criteria that we use to indicate how many users are affected and how serious the bug is (loss of data, etc..).

One useful thing would be to determine if this is a regression by going through older versions of LibreOffice:

http://downloadarchive.documentfoundation.org/libreoffice/old/
Comment 6 QA Administrators 2017-10-30 08:31:45 UTC Comment hidden (obsolete)
Comment 7 Sawik 2017-10-30 09:43:02 UTC
Bug is still present on version: 5.3.6.1
Build ID: 1:5.3.6~rc1-0ubuntu0.16.04.1~lo0
Comment 8 Roman Kuznetsov 2018-06-19 12:19:26 UTC
still repro in LibreOffice 6.1 beta 2
Comment 9 QA Administrators 2019-06-20 02:50:11 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2021-06-20 03:46:31 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2023-06-21 03:13:53 UTC Comment hidden (obsolete)
Comment 12 Xisco Faulí 2023-08-14 10:45:40 UTC
This issue is mostly fixed after https://cgit.freedesktop.org/libreoffice/core/commit/?id=2795a230464aea3a792e67b5625fce2a0c01d547
The only remaining problem is exponent symbol that is shifted to the right
Comment 13 Xisco Faulí 2023-08-14 11:08:09 UTC
Created attachment 188963 [details]
simplify document
Comment 14 Xisco Faulí 2023-08-14 12:49:32 UTC
The content of attachment 188963 [details] has been deleted
Comment 15 Xisco Faulí 2023-08-14 12:49:47 UTC
Created attachment 188970 [details]
simplify document
Comment 16 Commit Notification 2023-08-15 01:53:32 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5cfd31e505b4d1b4f9d2e21b0f9f8aac22539f47

tdf#93583: use getTextWidth to calculate line's width

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 17 BogdanB 2023-08-15 17:30:15 UTC
Thanks, Sawik for reporting this bug, and Xisco for fixing it.

Verified with
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

Is bad in (for comparison reason)
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 18 Commit Notification 2023-08-16 09:12:49 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/12eb15a9fac58fe2fb5baeeb35f8c43ba21b2e1e

tdf#93583: use getTextWidth to calculate line's width

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.
Comment 19 Sawik 2023-11-27 21:34:21 UTC
Hi All,

thank you for your time and effort in fixing this issue.

It seems to be working correctly now (an exponent is still a little bit off to the right, but i think it's due to the lack of a used font in my system)
Comment 20 Sawik 2023-11-27 21:38:58 UTC
(In reply to Sawik from comment #19)
> Hi All,
> 
> thank you for your time and effort in fixing this issue.
> 
> It seems to be working correctly now (an exponent is still a little bit off
> to the right, but i think it's due to the lack of a used font in my system)

tested on 

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: pl-PL (pl_PL.utf8); UI: en-US
7.6.2-3
Calc: threaded