Bug 69282 - [chromium] some Japanese punctuation displayed wrong in vertical writing in Chromium Linux
Summary: [chromium] some Japanese punctuation displayed wrong in vertical writing in C...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-03 12:39 PDT by Xiaomei Ji
Modified: 2013-04-12 07:03 PDT (History)
6 users (show)

See Also:


Attachments
snapshot (83.33 KB, image/gif)
2011-10-03 16:52 PDT, Xiaomei Ji
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xiaomei Ji 2011-10-03 12:39:00 PDT
open https://dl.dropbox.com/u/141502/EPUB/a_scandal_in_bohemia-CHGOV.html.
looking for "『" and "《", they should be rotated clockwise 90° when used in vertical text.

See http://en.wikipedia.org/wiki/Japanese_punctuation for detail.

Guess it is related to item 2 in https://bugs.webkit.org/show_bug.cgi?id=50365#c29.
Comment 1 Xiaomei Ji 2011-10-03 16:52:07 PDT
Created attachment 109550 [details]
snapshot
Comment 2 Kent Tamura 2011-10-03 17:47:17 PDT
Does the font contain vertical glyphs for those characters?
Comment 3 Kenichi Ishibashi 2011-10-03 19:47:14 PDT
What font are you using for v-jserif (if you set up for it) and serif?
Comment 4 Koan-Sin Tan 2011-10-04 06:07:58 PDT
As Kent and Kenichi mentioned, it should be the problem of freely available fonts. The page displayed correctly on my Ubuntu when I use Hiragino Mincho ProN came with Mac OS X.
Comment 5 Xiaomei Ji 2011-12-12 15:56:37 PST
If there is no vert table in the font, but there is Unicode corresponding vertical presentation form in the font, can we introduce a fallback mapping table so that those glyphs can be displayed?
Comment 6 Koan-Sin Tan 2011-12-12 18:31:11 PST
(In reply to comment #5)
> If there is no vert table in the font, but there is Unicode corresponding vertical presentation form in the font, can we introduce a fallback mapping table so that those glyphs can be displayed?

There are two kinds of relevant tables/features. 
 1.  ‘vhea’/ ‘vmtx’ to provide vertical metrics
 2.  ‘vert’ or ‘vrt2’ GSUB features for mapping horizontal punctuations to vertical ones

It seems you are talking about 2. Yes, we can retrieve 'vert' or 'vrt2'  from a font with good font. But I think this should be a platform independent function instead of a Chromium specific one.
Comment 7 Xiaomei Ji 2012-03-01 12:36:54 PST
(In reply to comment #6)
> (In reply to comment #5)
> > If there is no vert table in the font, but there is Unicode corresponding vertical presentation form in the font, can we introduce a fallback mapping table so that those glyphs can be displayed?
> 
> There are two kinds of relevant tables/features. 
>  1.  ‘vhea’/ ‘vmtx’ to provide vertical metrics
>  2.  ‘vert’ or ‘vrt2’ GSUB features for mapping horizontal punctuations to vertical ones
> 
> It seems you are talking about 2. Yes, we can retrieve 'vert' or 'vrt2'  from a font with good font. But I think this should be a platform independent function instead of a Chromium specific one.

I agree.
Comment 8 Koji Ishii 2012-05-02 23:22:15 PDT
From the description in bug 80072, I understand this bug is a feature request to synthesize vertical alternate glyphs when the font doesn't have one. It'd be helpful if title and/or description makes the point clearer.

(In reply to comment #6)
> (In reply to comment #5)
> > If there is no vert table in the font, but there is Unicode corresponding vertical presentation form in the font, can we introduce a fallback mapping table so that those glyphs can be displayed?
> 
> There are two kinds of relevant tables/features. 
>  1.  ‘vhea’/ ‘vmtx’ to provide vertical metrics
>  2.  ‘vert’ or ‘vrt2’ GSUB features for mapping horizontal punctuations to vertical ones
> 
> It seems you are talking about 2. Yes, we can retrieve 'vert' or 'vrt2'  from a font with good font.

Unfortunately, no, it doesn't work. 'vert' is just a mapping table from a glyph ID to another glyph ID. The font must have corresponding glyphs to map to.

It is somewhat possible to synthesize vertical alternate glyphs, but it's a lot more work than you think:
1. Identify code points to rotate in vertical flow, and rotate them, or use VERTICAL PRESENTATION FORMS if available.
2. There are some code points that need shifting; e.g., U+3001 IDEOGRAPHIC COMMA. Technically speaking, you can identify such code points, get bounding box, and make shift.
3. There are some code points that uses different glyphs; e.g., U+301C WAVE DASH or U+3300 SQUARE APAATO. I don't think you can synthesize them.

You could find such a list in "Glyphs Changes for Vertial Orientation" section at http://www.unicode.org/reports/tr50 (note that the spec is still under development at this point)

So, that says, it's a good amount of work, and you can only get low-quality results for 2, and still can't get 3.

I'm not very familiar with the situation of East Asian fonts on Linux these days, but I guess it's getting better and you could find at least a few fonts that have 'vert' table. If that's the case, I would recommend not to fix this bug but wait for other fonts to support 'vert'. If you're looking for Japanese fonts, I think IPA Mincho is a good free font.

If that's not the case -- i.e., there's really not a good fonts on Linux and there's no hope to improve in near future -- I think you should demonstrate the importance to synthesize vertical alternate glyphs even if its quality isn't good.
Comment 9 Koji Ishii 2012-05-03 01:02:15 PDT
Note that synthesizing may work better for Chinese, because many of 2/3 are Japanese specific. But still, I believe, it's better to fix fonts rather than synthesizing.