Bug 156151 - PRINTING: Chinese characters rendering overlaps when no printer configured
Summary: PRINTING: Chinese characters rendering overlaps when no printer configured
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.5.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:24.2.0 target:7.5.6 target:7.6...
Keywords:
: 156152 156381 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-07-04 03:58 UTC by Peng Wu
Modified: 2023-07-19 18:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The LibreOffice Writer document for testing (9.06 KB, application/vnd.oasis.opendocument.text)
2023-07-04 03:58 UTC, Peng Wu
Details
The PDF file with no printer configured (14.08 KB, application/pdf)
2023-07-04 04:04 UTC, Peng Wu
Details
The PDF file with PDF export (14.04 KB, application/pdf)
2023-07-04 04:09 UTC, Peng Wu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Wu 2023-07-04 03:58:34 UTC
Created attachment 188197 [details]
The LibreOffice Writer document for testing

Description of problem:

When no printer configured in Fedora Workstation 38, Choose "Print to File...".
The PDF file shows Chinese characters overlapping.

How reproducible:

Open the LibreOffice Writer document without printer configured in Fedora Workstation 38.
Click "Print..." menu item, choose "Print to File...", then save the PDF.

Steps to Reproduce:
1. Open the LibreOffice Writer document in the attachment
2. Click "Print..." menu item, choose "Print to File...", then save the PDF.
3. Open the PDF file with evince

Actual results:
The Chinese characters overlap in the PDF file.

Expected results:
The Chinese characters should not overlap in the PDF file.

Additional info:
The document seems display correctly in the screen.

Use "Export as PDF..." menu item, the PDF file seems correct.

Maybe this is related with Noto CJK Variable Fonts.

URL: https://bugzilla.redhat.com/show_bug.cgi?id=2183904
Comment 1 Peng Wu 2023-07-04 04:04:56 UTC
Created attachment 188198 [details]
The PDF file with no printer configured
Comment 2 Peng Wu 2023-07-04 04:09:49 UTC
Created attachment 188199 [details]
The PDF file with PDF export
Comment 3 ⁨خالد حسني⁩ 2023-07-04 17:59:44 UTC
*** Bug 156152 has been marked as a duplicate of this bug. ***
Comment 4 Commit Notification 2023-07-04 18:16:01 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

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

tdf#156151: Take PDF DPI into account when outputting Type 3 glyphs

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 5 ⁨خالد حسني⁩ 2023-07-04 18:19:06 UTC
(In reply to Peng Wu from comment #0)
> 
> Maybe this is related with Noto CJK Variable Fonts.

It is related indeed. When we embed a variable font in PDF, we currently embed it as a Type 3 font and draw the glyphs as PDF paths, but the drawing code was assuming a fix DPI which is true for PDF export and not for printing where the DPI depends on the printer settings.
Comment 6 Commit Notification 2023-07-04 23:21:44 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#156151: Take PDF DPI into account when outputting Type 3 glyphs

It will be available in 7.5.6.

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 7 Commit Notification 2023-07-04 23:21:47 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#156151: Take PDF DPI into account when outputting Type 3 glyphs

It will be available in 7.6.0.0.beta2.

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 8 Peng Wu 2023-07-05 08:03:23 UTC
Thanks for the quick fix!
Comment 9 ⁨خالد حسني⁩ 2023-07-19 18:04:30 UTC
*** Bug 156381 has been marked as a duplicate of this bug. ***