Bug 114002 - Unicode Hentaigana does not rotate in vertical layout
Summary: Unicode Hentaigana does not rotate in vertical layout
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha1+
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: CJK Vertical-Text
  Show dependency treegraph
 
Reported: 2017-11-23 08:49 UTC by Volga
Modified: 2023-06-20 10:47 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (9.13 KB, application/vnd.oasis.opendocument.text)
2017-11-23 08:54 UTC, Volga
Details
My snapshot (68.56 KB, image/png)
2017-11-23 08:54 UTC, Volga
Details
hentai kana (290.63 KB, image/png)
2017-11-24 00:37 UTC, Junichi Matsukawa
Details
My snapshot (2) (34.22 KB, image/png)
2017-12-14 05:04 UTC, Volga
Details
I use the samminh.otf. LoWriter 6.2.2.1(x64) (181.04 KB, image/png)
2019-03-22 02:01 UTC, Junichi Matsukawa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2017-11-23 08:49:53 UTC
Description:
When Hentaigana chatacters (U+1B00-U+1B12F) displaying in vertical layout, all of them failed to rotate as Hiragana and Katakana. 

Steps to Reproduce:
1. Open Writer
2. Insert -> Text Box
3. Copying texts from https://en.wikipedia.org/wiki/Hentaigana and paste into text box
4. Select the who text, set the font face as "BabelStone Han"
5. Click "Text direction from top to bottom"

Actual Results:  
After vertical layout enabled, Hentaigana chatacters do not rotate.

Expected Results:
According to the Unicode Standard, their vertical orientation properties are U, so they should be upright in vertical text layout.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.0.0.0.alpha1+ (x64)
Build ID: a0ebba3d8855fee0bcec04a10137ae3a4f9f0e77
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-11-22_05:59:17
Locale: zh-CN (zh_CN); Calc: group threaded

BabelStone Han available at http://babelstone.co.uk


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Comment 1 Volga 2017-11-23 08:54:13 UTC
Created attachment 137935 [details]
Test file
Comment 2 Volga 2017-11-23 08:54:44 UTC
Created attachment 137936 [details]
My snapshot
Comment 3 Junichi Matsukawa 2017-11-24 00:37:44 UTC
Created attachment 137953 [details]
hentai kana

Reproduced it.

I use font UniHentaiKana-Regular.otf.

https://wakufactory.jp/densho/font/hentai/

バージョン: 6.0.0.0.alpha1
Build ID: c1d1f859b268f650143d48f294999cda0fa57350
CPU threads: 4; OS: Windows 10.0; UI render: default; 
ロケール: ja-JP (ja_JP); Calc: CL
Comment 4 Volga 2017-11-28 12:56:03 UTC
Recent version of ICU support all new characters introduced in Unicode 10.0, including 285 new hentaigana characters. So LibreOffice need to upgrade ICU to get needed properties.

http://blog.unicode.org/2017/11/icu-60-released.html
Comment 5 Adolfo Jayme Barrientos 2017-11-29 21:02:53 UTC
LibreOffice already has the most recent ICU version, 60.1. See https://cgit.freedesktop.org/libreoffice/core/commit/?id=9206a08ada00e8762c4a634f242bd566028964bb
Comment 6 Volga 2017-11-30 07:27:24 UTC
Still reproduce in:

Version: 6.0.0.0.beta1 (x64)
Build ID:97471ab4eb4db4c487195658631696bb3238656c
CPU 线程:4; 操作系统:Windows 10.0; UI 渲染:默认; 
Locale: zh-CN (zh_CN); Calc: group threaded

So what's wrong with it?
Comment 7 Tomofumi Yagi 2017-12-02 13:34:42 UTC
(In reply to Volga from comment #6)
> Still reproduce in:
> 
> Version: 6.0.0.0.beta1 (x64)
> Build ID:97471ab4eb4db4c487195658631696bb3238656c
> CPU 线程:4; 操作系统:Windows 10.0; UI 渲染:默认; 
> Locale: zh-CN (zh_CN); Calc: group threaded
> 
> So what's wrong with it?

Hi Volga,
Your fonts possibly doesn't have vertical mode(starting with '@').
If so, those characters would rotate like alphabetical characters.

https://opengrok.libreoffice.org/xref/core/vcl/win/gdi/salfont.cxx#825
Comment 8 Volga 2017-12-04 14:24:55 UTC
Hi Tomofumi,

I got WadaLabMaruGo and HanaMinA font for test, all of them including Hentaigana now, but they are all failed in this case.

https://osdn.net/projects/jis2004/wiki/FrontPage
https://zh.osdn.net/projects/hanazono-font/releases/
Comment 9 Volga 2017-12-04 14:34:45 UTC
I have updated BabelStone Han to the latest version (10.0.1, released in 2017-10-28), the font is already added support for vertical layout since version 9.0.2 (2017-03-12), but the font still failed for test.
Comment 10 Volga 2017-12-07 06:02:00 UTC
Still reproduce in
Version: 6.1.0.0.alpha0+ (x64)
Build ID: 1d8cb97fea57b81a1ab151b88c2180e646bd401b
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-12-07_02:07:17
Locale: zh-CN (zh_CN); Calc: group threaded
Comment 11 Volga 2017-12-08 16:08:43 UTC Comment hidden (obsolete)
Comment 12 Volga 2017-12-08 16:48:43 UTC
See: https://en.wikipedia.org/wiki/Unicode_block
Comment 13 Mark Hung 2017-12-08 22:15:38 UTC
(In reply to Volga from comment #11)
> I think I know what’s wrong with it. Currently. LibreOffice can handle text
> orientation even if the font does not has support for vertical layout
> (notably, for Dingbats and Letterlike symbols, since bug 108302). However,
> if the character is encoded out of Basic Multilingual Plane, the orientation
> will be failed. This problem not only affect Hentaigana, but also affect
> Tangut (bug 111444), CJK Ideograph ExtB+ (bug 107488). This is a problem for
> how does LO handle character orientation for such characters.

I guess the actual issue is that we don't know how we should initialize font properly. In Windows we prepend @ to the font name to indicate it is for vertical writing and set font Escapement and font Orientation to the text orientation ( i.e. 270 for vertical writing ). Somehow that works for most characters in SMP but not for BMP, but that might be a coincidence. It might also be font dependent so that the characters work correctly even they are in SMP. Maybe we can create some test with EXT-B characters and render them in HanaMinB ( assume the font is implemented correctly for EXTB characters ) to verify our assumption. If we can differ the characters, then we can set the orientation correctly for those characters.
Comment 14 Volga 2017-12-12 10:47:45 UTC
(In reply to Mark Hung from comment #13)
> Maybe we can create some test with EXT-B characters and render them
> in HanaMinB ( assume the font is implemented correctly for EXTB characters )
> to verify our assumption. If we can differ the characters, then we can set
> the orientation correctly for those characters.
Yeah, attachment 132891 [details] is already ready for the test.
Comment 15 Volga 2017-12-14 05:04:04 UTC
Created attachment 138435 [details]
My snapshot (2)

With UniHentaiKana-Regular.otf Hentaigana characters started working as expected in LODev 6.0 Beta2+ channel, however the character shifted to the right, and combining dakuten failed to work.

Version: 6.0.0.0.beta2+ (x64)
Build ID: b030bf19e29f031b0a640dd92c38d654785f1a99
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:libreoffice-6-0, Time: 2017-12-12_05:03:02
Locale: zh-CN (zh_CN); Calc: group threaded
Comment 16 QA Administrators 2018-12-15 03:56:26 UTC Comment hidden (obsolete)
Comment 17 Junichi Matsukawa 2019-03-22 01:58:58 UTC
Did not reproduce.

I used the samminh.otf.

http://www.akenotsuki.com/eyeben/fonts/sammin.html

+---------------------------------------------------------------------
|
| 三番明朝H 1.102(2017/10/18版)
| 配布URL: http://www.akenotsuki.com/eyeben/fonts/sammin.html
|
+---------------------------------------------------------------------

バージョン: 6.2.2.1 (x64)
Build ID: fcd633fb1bf21b0a99c9acb3ad6e526437947b01
CPU threads: 4; OS:Windows 10.0; UI render: GL; VCL: win; 
ロケール: ja-JP (ja_JP); UIの言語: ja-JP
Calc: threaded
Comment 18 Junichi Matsukawa 2019-03-22 02:01:40 UTC
Created attachment 150163 [details]
I use the samminh.otf. LoWriter 6.2.2.1(x64)

I use the samminh.otf. LoWriter 6.2.2.1(x64)
Comment 19 Volga 2019-08-25 12:06:52 UTC
I discovered the following commit:

https://cgit.freedesktop.org/libreoffice/core/commit/vcl/source/gdi/scrptrun.cxx?id=476525277727fe1550ff77f0d9979604ac74d00f
Don’t split HarfBuzz runs for Japanese text

So what happened if you add Hentaigana into there?
Comment 20 QA Administrators 2021-08-25 03:53:11 UTC Comment hidden (obsolete)
Comment 21 Volga 2021-08-27 08:20:01 UTC
OK, this cannot be reproduced with

Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: threaded
Comment 22 ⁨خالد حسني⁩ 2023-06-20 10:47:13 UTC
No longer reproducible.