Bug 100936 - Incorrect glyph orientation of Tangut script on vertical layout mode
Summary: Incorrect glyph orientation of Tangut script on vertical layout mode
Status: RESOLVED DUPLICATE of bug 111444
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.1.4.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on: HarfBuzz
Blocks: Font-Rendering Vertical-Text
  Show dependency treegraph
 
Reported: 2016-07-15 15:48 UTC by Volga
Modified: 2017-08-07 16:14 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
You can see what I have seen on LO 5.1.4 when I insert vertical Tangut text (72.69 KB, image/png)
2016-07-15 15:48 UTC, Volga
Details
Vertical Tangut test file (11.36 KB, application/vnd.oasis.opendocument.text)
2016-10-26 07:29 UTC, Volga
Details
This is what I have seen on LO 5.2.2 (101.40 KB, image/png)
2016-10-26 07:30 UTC, Volga
Details
Test vertical Tangut with frame (13.76 KB, application/vnd.oasis.opendocument.text)
2016-11-21 04:12 UTC, Volga
Details
2nd screenshot (104.21 KB, image/png)
2016-11-21 04:13 UTC, Volga
Details
sample Tangut script document with rotated Unicode 9.0 glyphs (117.32 KB, image/png)
2016-11-27 18:42 UTC, V Stuart Foote
Details
sample Tangut text as paragraphs in a new 4 colum RTL vertical page (11.23 KB, application/vnd.oasis.opendocument.text)
2016-11-28 04:14 UTC, V Stuart Foote
Details
BableStone Tangut Wenhai in vertical layout being clipped on right edge (59.76 KB, image/png)
2016-12-17 18:02 UTC, V Stuart Foote
Details
Screenshot from 5.4.0 alpha0 (128.33 KB, image/png)
2016-12-20 07:42 UTC, Volga
Details
Screenshot from 5.4.0 alpha0 (2) (127.31 KB, image/png)
2016-12-20 07:51 UTC, Volga
Details
Screenshot from LO 5.3.2.0.0 (103.79 KB, image/png)
2017-03-28 09:59 UTC, Volga
Details
Test file used on LODev 5.4.0 beta2 (106.41 KB, application/x-zip-compressed)
2017-06-20 07:09 UTC, Volga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2016-07-15 15:48:57 UTC
Created attachment 126226 [details]
You can see what I have seen on LO 5.1.4 when I insert vertical Tangut text

The Tangut script was introduced in Unicode last month, but its orientation looks incorrect in LibreOffice. When I opened LO Writer, insert a text box, put Tangut characters, I found every glyphs rotated 90° when I switched to vertical layout mode. 

Every Tangut characters should be upright in vertical text, if you need materials now, you can see: https://commons.wikimedia.org/wiki/Category:Tangut_script

I used BabelStone Tangut Wenhai font to render Tangut text: http://www.babelstone.co.uk/Fonts/Wenhai.html

Version: 5.1.4.2 (x64)
Build ID: f99d75f39f1c57ebdd7ffc5f42867c12031db97a
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
Locale: zh-CN (zh_CN)
Comment 1 Khaled Hosny 2016-10-23 21:06:37 UTC
Please attach the document used in the screenshot (preferably with the fonts embedded, or provide a link to get suitable fonts).
Comment 2 Volga 2016-10-26 07:29:03 UTC
Created attachment 128274 [details]
Vertical Tangut test file

OK I upload a document with some Tangut characters, the problem looks the same as LO 5.1.4.
Comment 3 Volga 2016-10-26 07:30:30 UTC
Created attachment 128275 [details]
This is what I have seen on LO 5.2.2
Comment 4 Khaled Hosny 2016-10-26 15:42:15 UTC
To fix this we need to first upgrade to ICU 58 as we currently use ICU 57 which does not support Unicode 9.0 and we end up not recognizing the script of Tangut characters.

http://blog.unicode.org/2016/10/icu-58-released.html
Comment 5 Commit Notification 2016-11-04 21:49:24 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5b389c32eb3928c59387c2d6d48667632d7e9206

tdf#100936: Add Tangut to vertical scripts

It will be available in 5.3.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 6 Volga 2016-11-18 10:34:33 UTC
This problem appearing to me again when I get the latest build yesterday.
Comment 7 Volga 2016-11-21 04:10:50 UTC
This problem appearing to me again even if I use a frame.

Version: 5.3.0.0.alpha1+
Build ID: 02ec51c7e0bf9320b32ec73233ecaaf160448776
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-11-20_23:12:18
Locale: zh-CN (zh_CN); Calc: group
Comment 8 Volga 2016-11-21 04:12:29 UTC
Created attachment 128899 [details]
Test vertical Tangut with frame
Comment 9 Volga 2016-11-21 04:13:28 UTC
Created attachment 128900 [details]
2nd screenshot
Comment 10 Khaled Hosny 2016-11-21 18:09:53 UTC
Can’t reproduce, they look upright here (on Linux and Windows).
Comment 11 Volga 2016-11-22 08:18:23 UTC
@Buovjaga

Can you reproduce this?
Comment 12 Buovjaga 2016-11-23 11:41:54 UTC
(In reply to Volga from comment #11)
> @Buovjaga
> 
> Can you reproduce this?

I could try, if you told me where to get the font BabelStone Tangut Wenhai. BabelStone homepage gives 404 not found for it..
Comment 13 Khaled Hosny 2016-11-23 13:25:18 UTC
(In reply to Buovjaga from comment #12)
> (In reply to Volga from comment #11)
> > @Buovjaga
> > 
> > Can you reproduce this?
> 
> I could try, if you told me where to get the font BabelStone Tangut Wenhai.
> BabelStone homepage gives 404 not found for it..

I think you will need to find a different font (https://twitter.com/KhaledGhetas/status/800762150956384256), or Volga can send you his copy.
Comment 14 Volga 2016-11-23 13:53:54 UTC
(In reply to Buovjaga from comment #12)
> (In reply to Volga from comment #11)
> > @Buovjaga
> > 
> > Can you reproduce this?
> 
> I could try, if you told me where to get the font BabelStone Tangut Wenhai.
> BabelStone homepage gives 404 not found for it..

Wow, I am also surprised that BabelStone homepage gives 404. I guess you can get it from Internet Archive.

https://web.archive.org/web/2/www.babelstone.co.uk/Fonts/Wenhai.html
Comment 15 Volga 2016-11-25 03:21:57 UTC
Version: 5.3.0.0.beta1
Build ID: 690f553ecb3efd19143acbf01f3af4e289e94536
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
Locale: zh-CN (zh_CN); Calc: group
Comment 16 Volga 2016-11-25 15:43:22 UTC
(In reply to Volga from comment #15)
> Version: 5.3.0.0.beta1

This version does not see the effect.
Comment 17 Volga 2016-11-27 17:22:56 UTC
 Can anyone else confirm this on 5.3.0 beta1?
Comment 18 V Stuart Foote 2016-11-27 18:42:54 UTC
Created attachment 129052 [details]
sample Tangut script document with rotated Unicode 9.0 glyphs

(In reply to Volga from comment #17)
>  Can anyone else confirm this on 5.3.0 beta1?

Yes it is working correctly at 5.3.0beta1. See attached screen clip...

I'll send Andrew West at BableStone a note asking his thoughts about support for Tangut and status of his Tangut Wenhai font.
Comment 19 Volga 2016-11-28 02:03:55 UTC
(In reply to V Stuart Foote from comment #18)
> Created attachment 129052 [details]
> sample Tangut script document with rotated Unicode 9.0 glyphs
> 
> (In reply to Volga from comment #17)
> >  Can anyone else confirm this on 5.3.0 beta1?
> 
> Yes it is working correctly at 5.3.0beta1. See attached screen clip...
> 
> I'll send Andrew West at BableStone a note asking his thoughts about support
> for Tangut and status of his Tangut Wenhai font.

What happened if you close OGL?
Comment 20 V Stuart Foote 2016-11-28 04:14:24 UTC
Created attachment 129058 [details]
sample Tangut text as paragraphs in a new 4 colum RTL vertical page

(In reply to Volga from comment #19)
> 
> What happened if you close OGL?

That's odd, with OpenGL _disabled_ the vertical text is not rotated in either the original attachment 128274 [details] document's RTL vertical Text Frame--or with the same paragraphs copied into a multi-column RTL page in a new 5.4.0.0aplpha0+ document (attached).

Enable OpenGL and either document renders correctly.

Sample document attached uses the BableStone Tangut Wenhai (Version 1.002 May 21, 2016).

On Windows 10 Pro 64-bit (1607) en-US with
Version: 5.4.0.0.alpha0+
Build ID: 9691cea443a74885b3f81c602efdd3345de1e3f9
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-11-24_14:26:28
Locale: en-US (en_US); Calc: CL

@Khaled?
Comment 21 Volga 2016-11-28 11:47:51 UTC
(In reply to V Stuart Foote from comment #20)
> Created attachment 129058 [details]
> sample Tangut text as paragraphs in a new 4 colum RTL vertical page

OK I can see the effect, but all glyphs are clipped.
Comment 22 Volga 2016-12-10 03:54:09 UTC
(In reply to Buovjaga from comment #12)
> (In reply to Volga from comment #11)
> > @Buovjaga
> > 
> > Can you reproduce this?
> 
> I could try, if you told me where to get the font BabelStone Tangut Wenhai.
> BabelStone homepage gives 404 not found for it..

You can also get fonts from here: http://ccamc.co/fonts.php
Comment 23 Volga 2016-12-17 17:09:34 UTC
What happened if you try to intergrate Harfbuzz 1.3.4?
Comment 24 Khaled Hosny 2016-12-17 17:36:02 UTC
(In reply to Volga from comment #23)
> What happened if you try to intergrate Harfbuzz 1.3.4?

I need to first be able to reproduce the issue (which I don’t), simply upgrading to newer HarfBuzz version will not do much.
Comment 25 V Stuart Foote 2016-12-17 18:02:20 UTC
Created attachment 129726 [details]
BableStone Tangut Wenhai in vertical layout being clipped on right edge

Attached a clip of Tangut Wenhai in vertical layout. Right edge of each glyph is being clipped.

However, IIUC while we have already moved to ICU 58 [1], the BableStone Tangut Wenhai did not have the vertical header table (vhea) and vertical metrics table (vmtx) defined.

One of the reasons that Andrew West took it down (the other being he'd only prepared glyphs for about half of the script defined at Unicode 9.0).

When a valid ttf/otf font for Tangut script is available, beleive it should function in vertical layout as any other CJK font.

Otherwise this is not valid, back to resolved fixed.

=-ref-=
[1] https://cgit.freedesktop.org/libreoffice/core/commit/?id=3e42714c76b1347babfdea0564009d8d82a83af4
Comment 26 Volga 2016-12-18 03:55:02 UTC
(In reply to V Stuart Foote from comment #25)
> When a valid ttf/otf font for Tangut script is available, beleive it should
> function in vertical layout as any other CJK font.

Don’t worry, you can also get it from http://ccamc.co/fonts.php
Comment 27 Volga 2016-12-19 14:21:23 UTC
(In reply to V Stuart Foote from comment #25)
> However, IIUC while we have already moved to ICU 58 [1], the BableStone
> Tangut Wenhai did not have the vertical header table (vhea) and vertical
> metrics table (vmtx) defined.
Yeah, I hope I can get the expected results with newer build.
Comment 28 Volga 2016-12-20 07:42:31 UTC
Created attachment 129800 [details]
Screenshot from 5.4.0 alpha0

(In reply to V Stuart Foote from comment #25)
> When a valid ttf/otf font for Tangut script is available, beleive it should
> function in vertical layout as any other CJK font.

OK, it works for me after I open the file with LODev 5.4.0 alpha0, and I enabled OpenGL. But the initial characters always clipped, and when I disabled OpenGL, they are sideways.

To get better effect, I got Tangut N4694 font from comment 26.

Version: 5.4.0.0.alpha0+
Build ID: 2e9c02feca732f6dd012ccbe5d7c6853c64075a5
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-12-20_00:19:54
Locale: zh-CN (zh_CN); Calc: group

Version: 5.4.0.0.alpha0+
Build ID: 2e9c02feca732f6dd012ccbe5d7c6853c64075a5
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-12-20_00:19:54
Locale: zh-CN (zh_CN); Calc: group
Comment 29 Volga 2016-12-20 07:51:51 UTC
Created attachment 129801 [details]
Screenshot from 5.4.0 alpha0 (2)

This is what I have seen when I disabled OpenGL. BTW if you have any problem about this font you can contact the author: http://ccamc.co/introduction.php
Comment 30 Volga 2017-03-28 09:59:31 UTC
Created attachment 132210 [details]
Screenshot from LO 5.3.2.0.0

This problem appearing again on LO 5.3.2.0.0 even if I enabled OpenGL.

Version: 5.3.2.0.0+ (x64)
Build ID: c8f0a37ff804e6329b21a4b7bfabb0667263c6e5
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
Locale: zh-CN (zh_CN); Calc: group

STR:
1. Open attachment 128274 [details]
2. Change font for all texts to Tangut Yinchuan

Then they still sideways in vertical texts.

P.S. You can get the font from here:
http://www.babelstone.co.uk/Fonts/Yinchuan.html
Comment 31 Volga 2017-03-30 03:53:57 UTC
*** Bug 105012 has been marked as a duplicate of this bug. ***
Comment 32 Volga 2017-03-30 09:13:52 UTC
(In reply to Volga from comment #30)
> Created attachment 132210 [details]
> Screenshot from LO 5.3.2.0.0
> 
> This problem appearing again on LO 5.3.2.0.0 even if I enabled OpenGL.
> 
> Version: 5.3.2.0.0+ (x64)
> Build ID: c8f0a37ff804e6329b21a4b7bfabb0667263c6e5
> CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
> Locale: zh-CN (zh_CN); Calc: group
> 
> STR:
> 1. Open attachment 128274 [details]
> 2. Change font for all texts to Tangut Yinchuan
> 
> Then they still sideways in vertical texts.
> 
> P.S. You can get the font from here:
> http://www.babelstone.co.uk/Fonts/Yinchuan.html

LO 5.3.2.1 performanced the same.
Comment 33 Volga 2017-04-02 14:43:52 UTC
LO 5.3.2.2 still failed.

Version: 5.3.2.2 (x64)
Build ID: 6cd4f1ef626f15116896b1d8e1398b56da0d0ee1
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: zh-CN (zh_CN); Calc: group
Comment 34 Volga 2017-05-27 05:00:52 UTC
Still reproducable with LODev 5.4 beta1 with Tangut Yinchuan font v9.001, which announced "Also added support for vertical text layout." by the author. Maybe we need to reduce the dependency of GDI on Windows.

Version: 5.4.0.0.beta1 (x64)
Build ID: 8672113ead4e403c55e31b1d9a3d1e0f3b299577
CPU threads: 4; OS: Windows 6.19; UI render: default; 
Locale: zh-CN (zh_CN); Calc: group

http://www.babelstone.co.uk/Fonts/Yinchuan.html
Comment 35 Volga 2017-06-20 07:09:02 UTC
Created attachment 134153 [details]
Test file used on LODev 5.4.0 beta2

Tangut orientation still failed with LO 5.4 beta2, test wirh Tangut Yinchuan.

Version: 5.4.0.0.beta2 (x64)
Build ID:3cc1cdd8ee50f144e5514da51800a08119754d8f
CPU threads: 4; OS: Windows 6.19; UI render: 默认; 
Locale: zh-CN (zh_CN); Calc: group
Comment 36 V Stuart Foote 2017-08-07 16:14:48 UTC
Assume the intended MOVED was to bug 111444 setting this duplicate.

*** This bug has been marked as a duplicate of bug 111444 ***