Bug 135427 - eps import with text has completely bogus inter-letter spacing
Summary: eps import with text has completely bogus inter-letter spacing
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.2.7.2 release
Hardware: All All
: medium normal
Assignee: Samuel Thibault
URL:
Whiteboard: target:7.1.0 target:7.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-04 02:24 UTC by Samuel Thibault
Modified: 2020-08-05 08:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
reproducer .eps file (26.61 KB, image/x-eps)
2020-08-04 02:25 UTC, Samuel Thibault
Details
Bogus output (103.42 KB, image/png)
2020-08-04 02:27 UTC, Samuel Thibault
Details
Proper output (96.33 KB, image/png)
2020-08-04 02:28 UTC, Samuel Thibault
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Thibault 2020-08-04 02:24:49 UTC
Description:
When importing a .eps image file containing text and the pstoedit tool is installed, the result is horrible because the inter-letter spacing is completely bogus.

Steps to Reproduce:
1. Create a new document
2. Insert->Image, select a .eps file containing text

Actual Results:
The image gets inserted, but the letter of the text inside the image are completely ill-placed.

Expected Results:
The letters of the text should be spaced according to the font, so words can be read normally.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Purging from my system the pstoedit tool avoids the issue (I'm then getting a rasterized output, lower quality but proper text spacing).

I have been having the issue since ages, libreoffice 4.2, I also tried 6.0.7.3, 6.1.6.3, 6.2.8.2, 6.3.6.2, 6.3.4.2, 7.0.0 rc2, with the same result.

I have dug the issue and found that libreoffice should just pass -nfw to the pstoedit tool, as actually documented by pstoedit itself. I will submit a merge request doing this.
Comment 1 Samuel Thibault 2020-08-04 02:25:51 UTC
Created attachment 163920 [details]
reproducer .eps file

This is the .eps file I used in my tests.
Comment 2 Samuel Thibault 2020-08-04 02:27:21 UTC
Created attachment 163921 [details]
Bogus output

This is the bogus output I am getting with various versions of libreoffice. Notice how letters even step on each other, in "simgrid" the 'm', 'g', and 'r' are completely collapsed.
Comment 3 Samuel Thibault 2020-08-04 02:28:10 UTC
Created attachment 163922 [details]
Proper output

This is the proper output when passing the -nfw option to pstoedit.
Comment 4 Samuel Thibault 2020-08-04 02:41:29 UTC
I have submitted a patch proposal on https://gerrit.libreoffice.org/c/core/+/100035
Comment 5 Commit Notification 2020-08-04 09:38:33 UTC
Samuel Thibault committed a patch related to this issue.
It has been pushed to "master":

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

tdf#135427 Make pstoedit delegate letter placement to us

It will be available in 7.1.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 6 Commit Notification 2020-08-05 08:24:43 UTC
Samuel Thibault committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/2d73afe9a0166f926ca97fd82d3673f7a2d05827

tdf#135427 Make pstoedit delegate letter placement to us

It will be available in 7.0.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.