Bug 95194 - Incorrect glyph orientation when exporting RTL vertical text from Writer to PDF
Summary: Incorrect glyph orientation when exporting RTL vertical text from Writer to PDF
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: Other Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:5.2.0 target:5.1.0.1 target:5.0.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-10-20 11:34 UTC by Mark Hung
Modified: 2016-10-25 19:08 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document (9.29 KB, application/vnd.oasis.opendocument.text)
2015-10-20 11:34 UTC, Mark Hung
Details
Side by side comparison of Writer and exported PDF document (10.68 KB, image/png)
2015-10-20 11:36 UTC, Mark Hung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hung 2015-10-20 11:34:44 UTC
Created attachment 119780 [details]
Sample document

1. Create a new document, enter Chinese text and configure page style so that text direction is RTL vertical ( as in the attached sample document).
2. Export the file to PDF.
3. Text direction in PDF file is incorrect.
Comment 1 Mark Hung 2015-10-20 11:36:32 UTC
Created attachment 119781 [details]
Side by side comparison of Writer and exported PDF document
Comment 2 Mark Hung 2015-10-20 11:40:55 UTC
I've tested 5.0.3.1 and 5.0.2.2. Both of them are affected. On the other hand 4.4.2 seems to work normally.
Comment 3 Buovjaga 2015-10-21 15:15:31 UTC
Repro, but not in 4.3.0.1.

Win 7 Pro 64-bit, Version: 5.0.2.2 (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)

4.3.0.1
Comment 4 raal 2015-10-26 11:58:27 UTC
This seems to have begun at the below commit.
Adding Cc: to tml@collabora.com ; Could you possibly take a look at this one? Thanks
 7f0371ad242095657660bb4862bcdfa4a28b4e2c is the first bad commit
commit 7f0371ad242095657660bb4862bcdfa4a28b4e2c
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Tue Aug 11 23:27:51 2015 -0700

    source 4667db065d34193d99bce82f7e8f3b20a03ecade

    source 4667db065d34193d99bce82f7e8f3b20a03ecade
	
	
	author	Tor Lillqvist <tml@collabora.com>	2015-08-12 05:18:50 (GMT)
committer	Tor Lillqvist <tml@collabora.com>	2015-08-12 06:14:20 (GMT)
commit 4667db065d34193d99bce82f7e8f3b20a03ecade (patch)
Drop SimpleWinLayout


/bibisect-win32-5.1
$ git bisect log
# bad: [d07ec272f151832493f57ce3fde37a429eaf6014] source 233b9b0ec95069b5ce98aab942304459ca7344a8
# good: [c1efd324c6ad448ac9edb030dc9738b9e6899e4d] source ab465b90f6c6da5595393a0ba73f33a1e71a2b65
git bisect start 'd07ec272f151832493f57ce3fde37a429eaf6014' 'c1efd324c6ad448ac9edb030dc9738b9e6899e4d'
# good: [75b0ef076d724d10ed74681ba542db53f088b4ca] source 6dddd1aaf5dd3c54aaf87222712c9147466056f6
git bisect good 75b0ef076d724d10ed74681ba542db53f088b4ca
# bad: [017617b11c14b3ce32a5676bc4a239c45da3b05c] source 209951a8ae71ae38d57457a5a85005be8f46dcdf
git bisect bad 017617b11c14b3ce32a5676bc4a239c45da3b05c
# bad: [8ff0c6f10d7da9af7c3f7e11e30ebdb4ef99a9d6] source c1f456a4d212f6108220bb7c9712d584053c1e1e
git bisect bad 8ff0c6f10d7da9af7c3f7e11e30ebdb4ef99a9d6
# good: [28ee481e27118d6d561b41fdcb401b098c127a0a] source cd47929a6d161a99fb89bc91e776895ca2054b88
git bisect good 28ee481e27118d6d561b41fdcb401b098c127a0a
# good: [7ed47858c0d4e3984ef70c8b724b1230ea989e3e] source e5da350e4dd9b175c2f50cb392b23a805dac9a27
git bisect good 7ed47858c0d4e3984ef70c8b724b1230ea989e3e
# bad: [d5dac70529286a6fe0491652b8af71a975d3dc21] source 94cdcaa4d8db8f03ac9a84dac54357efff3eb123
git bisect bad d5dac70529286a6fe0491652b8af71a975d3dc21
# bad: [cc8ea2a510052475f17e6b97c6446dcf76a6a94b] source e008aebbcf366a64d5870ad3a5df39cac429b81c
git bisect bad cc8ea2a510052475f17e6b97c6446dcf76a6a94b
# good: [231be2c779b1b7f9f1887acc79b33777fff8c065] source cf58196691785d284fcffc653626fcf135c9ba69
git bisect good 231be2c779b1b7f9f1887acc79b33777fff8c065
# bad: [715ed18a4db53ac4d65598a82cb0ee8f059247ea] source 0409f83a5a4f9f86fa69a9431ce5aa07be427455
git bisect bad 715ed18a4db53ac4d65598a82cb0ee8f059247ea
# good: [b51adb834fc032eed77270683e8035d402f6932a] source f6595f0b3389ffeefa10035d915a884b02d26c0e
git bisect good b51adb834fc032eed77270683e8035d402f6932a
# good: [4c1f4b142e3895f02567094986b0b57ad7df0e50] source 1e4b29e1ad16e908f550eae035c3fae8e56831dd
git bisect good 4c1f4b142e3895f02567094986b0b57ad7df0e50
# bad: [7f0371ad242095657660bb4862bcdfa4a28b4e2c] source 4667db065d34193d99bce82f7e8f3b20a03ecade
git bisect bad 7f0371ad242095657660bb4862bcdfa4a28b4e2c
# good: [f8f8bdf24f7fc2f76810d36c4e1ce0e808c9509e] source 695cec87d73d56617e1cdc62621971ab35ac67eb
git bisect good f8f8bdf24f7fc2f76810d36c4e1ce0e808c9509e
# first bad commit: [7f0371ad242095657660bb4862bcdfa4a28b4e2c] source 4667db065d34193d99bce82f7e8f3b20a03ecade
Comment 5 How can I remove my account? 2015-12-01 11:50:05 UTC
This seems to be caused by the UniscribeLayout code not setting the GF_ROTL flag when necessary on the glyph indices like the SimpleWinLayout code did. Check for the use of GetVerticalFlags() in the old code.
Comment 6 Commit Notification 2015-12-01 13:19:49 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7ac763db694a956cb1e4f82477a7f9fe993f1f1a

tdf#95194: We need to set the GF flags in UniscribeLayout::GetNextGlyphs()

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2015-12-01 13:21:40 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=93e20c7fd94cf447572e6a9c95bbad788bf92a1f&h=libreoffice-5-1

tdf#95194: We need to set the GF flags in UniscribeLayout::GetNextGlyphs()

It will be available in 5.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 How can I remove my account? 2015-12-01 14:06:04 UTC
In review for 5.0: https://gerrit.libreoffice.org/#/c/20329/
Comment 9 Robinson Tryon (qubit) 2015-12-14 05:17:42 UTC Comment hidden (obsolete)
Comment 10 Commit Notification 2015-12-16 20:29:19 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f295adc5e5cc11134883a6d7dd50c1c8322c8139&h=libreoffice-5-0

tdf#95194: We need to set the GF flags in UniscribeLayout::GetNextGlyphs()

It will be available in 5.0.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 raal 2016-03-27 06:44:46 UTC
Tor, can this bug be closed?
Comment 12 Michael Meeks 2016-04-08 15:05:16 UTC
Seemingly fixed in 5.2 by the re-introduction of SimpleWinLayout =)