Bug 104828 - Several proportional characters shifted to the left within vertical text when they are upright
Summary: Several proportional characters shifted to the left within vertical text when...
Status: RESOLVED DUPLICATE of bug 105650
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering CJK
  Show dependency treegraph
 
Reported: 2016-12-21 05:15 UTC by Volga
Modified: 2020-10-09 05:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot from Firefox (85.46 KB, image/png)
2016-12-27 20:07 UTC, Volga
Details
Test font (3.06 MB, application/x-7z-compressed)
2017-01-24 09:32 UTC, Volga
Details
Test font (3.06 MB, application/x-7z-compressed)
2017-01-24 09:38 UTC, Volga
Details
Test file (9.28 KB, application/vnd.oasis.opendocument.text)
2017-01-24 09:44 UTC, Volga
Details
Screenshot (6.41 KB, image/png)
2017-01-24 09:58 UTC, Volga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2016-12-21 05:15:10 UTC
Description:
Recently I got Tangut N4694 font from http://ccamc.co/fonts.php to test vertical Tangut text. On LODev 5.4.0 alpha0 I found several Tangut Components shifted to left, because some of them are not em-width.

This is reproduced only with OpenGL enabled, because when I disabled OpenGL, the text orientation are failed.

Steps to Reproduce:
1. Open attachment 128899 [details] with LODev 5.4.0 alpha0
2. Replacing the font face as Tangut N4694

Actual Results:  
See attachment 129800 [details] (with OpenGL) and attachment 129801 [details] (without OpenGL).

Expected Results:
When you use Tangut N4694 font, several proportional characters within Tangut Components range should be centered within vertical texts.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Android 4.3; Mobile; rv:50.0) Gecko/50.0 Firefox/50.0
Comment 1 Volga 2016-12-27 20:07:59 UTC
Created attachment 129971 [details]
Screenshot from Firefox

Firefox set an good example for how upright characters performanced within vertical layout. To reproduce this, I copied all the characters from attachment 128899 [details].
Comment 2 Volga 2017-01-15 18:27:58 UTC
Mark Hung, WDYT?
Comment 3 Mark Hung 2017-01-16 11:25:37 UTC
Confirm that characters of Tangut script are shifted to the left in vertical layout when OpenGL enabled. u+18801 might be the most obvious one. Note my video card is blacklisted, so I have checked "Ignore OpenGL blacklist".


Version:5.3.0.1 (x64)
Build ID:3b800451b1d0c48045de03b5b3c7bbbac87f20d9
CPU Thread:8; OS Version:Windows 6.19; UI Render:GL; Layout Engine: new;
Locale: zh-TW (zh_TW); Calc: single
Comment 4 ⁨خالد حسني⁩ 2017-01-16 17:09:28 UTC
I can’t download the font (404 error) but the screenshot on the website shows only horizontal text, are you sure the fonts supports vertical layout (has vertical glyph metrics and so on)?
Comment 5 Volga 2017-01-17 02:19:02 UTC
(In reply to Khaled Hosny from comment #4)
> I can’t download the font (404 error) but the screenshot on the website
> shows only horizontal text, are you sure the fonts supports vertical layout
> (has vertical glyph metrics and so on)?

You can try to get the font from attachment 130486 [details]. If you have problem for this font, you can contact the author from here: http://ccamc.co/introduction.php
Comment 6 ⁨خالد حسني⁩ 2017-01-17 10:49:48 UTC
(In reply to Volga from comment #5)
> (In reply to Khaled Hosny from comment #4)
> > I can’t download the font (404 error) but the screenshot on the website
> > shows only horizontal text, are you sure the fonts supports vertical layout
> > (has vertical glyph metrics and so on)?
> 
> You can try to get the font from attachment 130486 [details]. If you have
> problem for this font, you can contact the author from here:
> http://ccamc.co/introduction.php

The font lacks vertical metrics tables (vmtx, vhea) or any OpenType features, so it is not unreasonable for the font not to work well with vertical text.

AFAIC, this is not a bug, but any one is free to come up with a reasonable patch to fix this.
Comment 7 Volga 2017-01-17 12:32:26 UTC
(In reply to Khaled Hosny from comment #6)
> (In reply to Volga from comment #5)
> > (In reply to Khaled Hosny from comment #4)
> > > I can’t download the font (404 error) but the screenshot on the website
> > > shows only horizontal text, are you sure the fonts supports vertical layout
> > > (has vertical glyph metrics and so on)?
> > 
> > You can try to get the font from attachment 130486 [details]. If you have
> > problem for this font, you can contact the author from here:
> > http://ccamc.co/introduction.php
> 
> The font lacks vertical metrics tables (vmtx, vhea) or any OpenType
> features, so it is not unreasonable for the font not to work well with
> vertical text.
> 
> AFAIC, this is not a bug, but any one is free to come up with a reasonable
> patch to fix this.

I understand, but why does Firefox work well at this point? (comment 1)
Comment 8 ⁨خالد حسني⁩ 2017-01-17 13:24:18 UTC
(In reply to Volga from comment #7)
> I understand, but why does Firefox work well at this point? (comment 1)

No idea, want to find out? May be they are doing something more clever than us.
Comment 9 Volga 2017-01-17 14:24:16 UTC
(In reply to Khaled Hosny from comment #8)
> (In reply to Volga from comment #7)
> > I understand, but why does Firefox work well at this point? (comment 1)
> 
> No idea, want to find out? May be they are doing something more clever than
> us.

Let’s find it out. First, you open CodePen in Firefox, and click New Pen button, then copy the following codes into there:

<div style="font-family: Tangut N4694; font-size: 2em">
<p>𗀀𗀂𗀇𗀈𗀊𗀌𗀍𗀐𗀔𗀘𗀙𗀚𗀛𗀝𗀞𗀟𗀠𗀡𗀥𗀫𗀯𗀸𗀹𗀻𗀽𗀾𗀿𗁀𗁂𗁃𗁅𗁆𗁉𗁊𗁋𗁍𗁏𗁑𗁕𗁜𗁝𗁟𗁡𗁢𗁣𗁤𗁦𗁧𗁫𗁬𗁭𗁮𗁴𗁶𗁷𗁺𗁽𗁿</p>
<p>𘠀𘠁𘠃𘠈𘠊𘠋𘠐𘠒𘠔𘠕𘠙𘠚𘠛𘠞𘠠𘠡𘠣𘠤𘠧𘠨𘠪𘠫𘠬𘠭𘠮𘠲𘠳𘠵𘠶𘠼𘡀𘡂𘡃𘡄𘡅𘡈𘡉𘡊𘡋𘡍𘡎𘡒𘡓𘡔𘡖𘡗𘡘𘡚𘡛𘡜𘡡𘡢𘡣𘡤𘡦𘡩𘡪𘡫𘡮𘡯𘡰𘡱𘡵𘡷𘡸𘡽</p>
<p>𖿠</p>
</div>
<div style="font-family: Tangut N4694; font-size: 2em; writing-mode: vertical-rl; text-orientation: upright">
<p>𗀀𗀂𗀇𗀈𗀊𗀌𗀍𗀐𗀔𗀘𗀙𗀚𗀛𗀝𗀞𗀟𗀠𗀡𗀥𗀫𗀯𗀸𗀹𗀻𗀽𗀾𗀿𗁀𗁂𗁃𗁅𗁆𗁉𗁊𗁋𗁍𗁏𗁑𗁕𗁜𗁝𗁟𗁡𗁢𗁣𗁤𗁦𗁧𗁫𗁬𗁭𗁮𗁴𗁶𗁷𗁺𗁽𗁿</p>
<p>𘠀𘠁𘠃𘠈𘠊𘠋𘠐𘠒𘠔𘠕𘠙𘠚𘠛𘠞𘠠𘠡𘠣𘠤𘠧𘠨𘠪𘠫𘠬𘠭𘠮𘠲𘠳𘠵𘠶𘠼𘡀𘡂𘡃𘡄𘡅𘡈𘡉𘡊𘡋𘡍𘡎𘡒𘡓𘡔𘡖𘡗𘡘𘡚𘡛𘡜𘡡𘡢𘡣𘡤𘡦𘡩𘡪𘡫𘡮𘡯𘡰𘡱𘡵𘡷𘡸𘡽</p>
<p>𖿠</p>
</div>

Then you will see so many glyphs looks proportional in horizontal writing, but they looks centered within em-box when they displaying in vertical writing. That is what they should looks like. I think LibreOffice ꜱʜᴏᴜʟᴅ follow this practice.
Comment 10 Volga 2017-01-17 14:51:16 UTC
You can also try Tangut Yinchuan[1] font on Firefox, just replacing font family property.

Ref:
[1] http://www.babelstone.co.uk/Fonts/Yinchuan.html
Comment 11 Volga 2017-01-18 03:30:46 UTC Comment hidden (obsolete)
Comment 12 Volga 2017-01-18 03:37:31 UTC
Here is an example for how does such glyphs should looks like when they are upright in vertical writing, I think this is suitable for Tangut N4694.

https://drafts.csswg.org/css-writing-modes-3/#valdef-text-orientation-upright
Comment 13 Volga 2017-01-21 09:52:29 UTC
In CSS Writing Modes Level 3 section 6.3 there is an example of how upright glyph should be aligned within vertical text, you can see it in a green box, which is indicate as “Vertical baseline of an upright glyph”.

https://drafts.csswg.org/css-writing-modes-3/#line-orientation
Comment 14 Volga 2017-01-24 09:32:11 UTC
Created attachment 130652 [details]
Test font
Comment 15 Volga 2017-01-24 09:38:21 UTC
Created attachment 130653 [details]
Test font
Comment 16 Volga 2017-01-24 09:44:32 UTC
Created attachment 130654 [details]
Test file

I have found another situation when I try to use attachment 130653 [details] in Writer, in this case Latin characters looks upright and they shifted to the left.
Comment 17 Volga 2017-01-24 09:58:19 UTC
Created attachment 130655 [details]
Screenshot

Screenshot for attachment 130654 [details].
Comment 18 Volga 2017-01-26 04:45:55 UTC
What happened if you intergrate HarfBuzz 1.3.4? This version has some improves for vertical layout.
Comment 19 Volga 2017-02-13 22:42:53 UTC
(In reply to Khaled Hosny from comment #8)
> No idea, want to find out? May be they are doing something more clever than
> us.
Now I think bug 105650 has more detailed information for this, so close this bug.

*** This bug has been marked as a duplicate of bug 105650 ***
Comment 20 oliver 2020-04-22 08:41:22 UTC Comment hidden (spam)
Comment 21 Miranada 2020-10-09 05:47:14 UTC Comment hidden (spam)