New issue
Advanced search Search tips

Issue 594658 link

Starred by 1 user

Issue metadata

Status: Fixed
Merged: issue 591346
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Hangul Tonemarks are rendered with dotted circle instead of 'to the left of base' (Noto Sans CJK)

Project Member Reported by js...@chromium.org, Mar 14 2016

Issue description

OS: Mac OS 10.11, but likely to be everywhere. However, Chrome on Android (50.0.2661.26) is fine. 

Version: 1. Chrome 49.0.2623.87 
         2. 51.0.2673.0 canary


How to reproduce

1. Install Noto Sans CJK (or Noto Sans KR) at http://www.google.com/get/noto/help/cjk/  (the easiest for Mac/Linux is install the super TTC) 

2. Go to https://ko.wikisource.org/wiki/%ED%9B%88%EB%AF%BC%EC%A0%95%EC%9D%8C%EC%96%B8%ED%95%B4


Actual (the 1st screenshot : Chrome ) : U+302E and U+302F are shown AFTER a base syllable with a dotted circle as if it does not have a base character (and it's a stand-alone combining mark)



Expected (the 2nd screenshot : Firefox) :  U+302E and U+302F are shown to the left of 'base' syllable (it can be either a single code point for modern precomposed syllable between U+AC00 ~ U+D7A8 or a sequence of two or three Hangul Jamos that form a syllable)

Additional Information: This is a regression. It used to work fine. Firefox does not have this problem. 


 
Screen Shot 2016-03-14 at 오후 12.44.41.png
298 KB View Download
Screen Shot 2016-03-14 at 오후 12.44.22.png
243 KB View Download

Comment 1 by js...@chromium.org, Mar 14 2016

Components: Blink>Fonts
After installing Noto Sans CJK (super OTC) or CJK OTC (regular weight) at http://www.google.com/get/noto/help/cjk/, 

the following minimal test can be used:

data:text/html; charset=utf-8, <span style="font-family:Noto Sans CJK KR;">한〮</span>



Comment 2 by js...@chromium.org, Mar 14 2016

Summary: Hangul Tonemarks are rendered with dotted circle instead of 'to the left of base' (Noto Sans CJK) (was: Hangul Tonemarks are not rendered with dotted circle : Noto Sans CJK)

Comment 3 by js...@chromium.org, Mar 14 2016

The rendering of the above minimal test. Note that in the omnibox, U+302E (single dot centered vertically) is rendered correctly (to the left of '한'), but in the contents area, it's rendered with a dotted circle as if there's no base character. 


Screen Shot 2016-03-14 at 오후 12.50.28.png
108 KB View Download

Comment 4 by js...@chromium.org, Mar 14 2016

> in the omnibox, U+302E (single dot centered vertically) is rendered correctly

Well, it's not exactly correct. The spacing is too tight. It uses the Mac OS default font for '한' and only U+302E may have come from Noto Sans CJK

Comment 5 by drott@chromium.org, Mar 15 2016

Mergedinto: 591346
Status: Duplicate (was: Untriaged)
Thanks for the report and test case, we have issues with fallback for combining characters that follow the base, I'll mark this a duplicate of 591346.

Comment 6 by drott@chromium.org, Mar 15 2016

> Additional Information: This is a regression. It used to work fine. Firefox does not have this problem. 

It may have looked acceptable, but I tend to think we incorrectly combined the tone mark and the base from different fonts, compare  issue 504745 .

Comment 7 by js...@chromium.org, Mar 15 2016

> It may have looked acceptable, but I tend to think we incorrectly combined the 
> tone mark and the base from different fonts, compare  issue 504745 .

Hmm.. could that happen even with an explicit font specified (as in a test given in comment 1)?  How about cases where the only font covering U+302E and U+302F is 'Noto Sans CJK' (when an explicit font is not specified) ?  




Comment 8 by js...@chromium.org, Mar 15 2016

Labels: -OS-Mac OS-All

Comment 9 by drott@chromium.org, Mar 15 2016

Owner: drott@chromium.org
Status: Assigned (was: Duplicate)
True, the case in comment #1 is definitely different, I am unmerging this from the fallback issue.  Suspecting an issue with how we handled collections, I tried with the Noto Sans CJK .ttc as well as with the Korean only, single typeface font. But the issue happens in both cases. hb-shape shapes the "한〮" sequence correctly with these fonts. 

Comment 10 by js...@chromium.org, Mar 15 2016

The collection should not be an issue. It should be 'transparent' to Blink. 

Believe me :-) This used to work fine before. I produced a sample image to include in Google Korea Blog post using Chrome multiple times :-)

https://ko.wikisource.org/wiki/%ED%9B%88%EB%AF%BC%EC%A0%95%EC%9D%8C%EC%96%B8%ED%95%B4 is a page I always use to check 'Old Hangul' support (it explicitly specifies Noto Sans CJK KR in their CSS and it used to work fine). 

Perhaps, we should add a layout test using Noto Sans CJK (or a small subset thereof)

Comment 11 by e...@chromium.org, Apr 1 2016

Cc: e...@chromium.org
Owner: kojii@chromium.org
The shaper code correctly handles this but the CJK optimized segmentation in CachingWordShapeIterator breaks it. We need to exclude the combining marks when segmenting.

Kojii, could you take a look? You wrote much of the CJK code path in CachingWordShapeIterator.
Project Member

Comment 12 by bugdroid1@chromium.org, Apr 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a7051b4065ce7dabe0e1ab758396f7e5c770d02d

commit a7051b4065ce7dabe0e1ab758396f7e5c770d02d
Author: kojii <kojii@chromium.org>
Date: Wed Apr 06 16:29:03 2016

Fix Hangul Tone Marks not to delimit in CachingWordShapeIterator

This patch includes two fixes for CachingWordShapeIterator not to
delimit Hangul Tone Marks from base characters.

The first fix is not to delmit non-CJK runs when it encounters CJK
marks.

The second fix is to exclude:
  U+302E HANGUL SINGLE DOT TONE MARK
  U+302F HANGUL DOUBLE DOT TONE MARK
from the isCJKIdeographOrSymbol set. This change makes the Hangul tone
marks consistent with other Hangul characters.

BUG= 594658 

Review URL: https://codereview.chromium.org/1861033003

Cr-Commit-Position: refs/heads/master@{#385475}

[modify] https://crrev.com/a7051b4065ce7dabe0e1ab758396f7e5c770d02d/third_party/WebKit/Source/platform/fonts/Character.h
[modify] https://crrev.com/a7051b4065ce7dabe0e1ab758396f7e5c770d02d/third_party/WebKit/Source/platform/fonts/CharacterPropertyData.cpp
[modify] https://crrev.com/a7051b4065ce7dabe0e1ab758396f7e5c770d02d/third_party/WebKit/Source/platform/fonts/CharacterPropertyDataGenerator.h
[modify] https://crrev.com/a7051b4065ce7dabe0e1ab758396f7e5c770d02d/third_party/WebKit/Source/platform/fonts/CharacterTest.cpp
[modify] https://crrev.com/a7051b4065ce7dabe0e1ab758396f7e5c770d02d/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShapeIterator.h
[modify] https://crrev.com/a7051b4065ce7dabe0e1ab758396f7e5c770d02d/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment