Bug 144222

Summary: Vertical Japanese character strings are misaligned when exporting PDF.
Product: LibreOffice Reporter: K.F. <pqxjd03266>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aron.budea, franklin, himajin100000, jo3emc, jr4air, shinji.enoki
Priority: medium    
Version: 7.2.0.4 release   
Hardware: x86-64 (AMD64)   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=144378
Whiteboard: target:7.3.0 target:7.2.3
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 83066    
Attachments: Screenshot of the preview and generated PDF in Calc.

Description K.F. 2021-08-31 14:22:54 UTC
Description:
Vertical Japanese character strings are misaligned when exporting PDF.
Horizontal writing and single-byte alphanumeric characters will not cause any misalignment.
I have tested it on Ubuntu 20.04 and Windows 10, and it happens on both of them.
It does not occur in the stable version 7.1.5.2, only in 7.2.0.4.

Steps to Reproduce:
1.Create a new document in LibreOffice Calc.
2.Right-click on a cell and select "セルの書式設定"(Formatting cells...) to open the formatting window.
3.Go to the "配置"(Alignment) tab.
4.Enable the checkboxes for "縦書き"(Vertically stacked) and "日本語縦書きレイアウトモード"(Asian layout mode) in it.
5.Enter a few Japanese characters in the cell with this setting. (At this point, setting a border for the cell will make it easier to see the misalignment of the string.)
6.From the "ファイル"(File) menu, select "PDFとしてエクスポート"(Export as PDF) to export the PDF file.
7.Open the generated PDF.

Actual Results:
The PDF is generated with the vertical Japanese text slightly lower than the preview in Calc.

Expected Results:
It should have been drawn in the correct position, just like the preview in Calc.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
This bug occurs only in 7.2.0.4, even if the document file with the same content is used.
Comment 1 K.F. 2021-08-31 14:31:33 UTC
Created attachment 174674 [details]
Screenshot of the preview and generated PDF in Calc.
Comment 2 Junichi Matsukawa 2021-09-09 00:45:59 UTC
reproduced.

Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL
Comment 3 JO3EMC 2021-09-09 03:32:27 UTC
Reproduced.

Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: default; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL
Comment 4 Shinji Enoki 2021-09-11 17:05:38 UTC
Reproduced in the following environment.

Debian sid
Version: 7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded
Comment 5 Commit Notification 2021-10-21 12:14:13 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

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

tdf#144222 fix pdf export with vertical layout

It will be available in 7.3.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 2021-10-21 15:47:02 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/28dcd1f17a73929c26e490cec929706d3a06b042

tdf#144222 fix pdf export with vertical layout

It will be available in 7.2.3.

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 Kevin Suo 2021-10-31 09:08:10 UTC
*** Bug 145405 has been marked as a duplicate of this bug. ***