roadlabs / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

Japanese font rendering issue - some characters renders as Chinese #1103

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enter to 'デモアトラスの実行' text in html (or use attached doc)
2. Set font-size to 48px
3. Last two characters rendering is wrong (Chinese instead of Japanese)

See the Pic-OK rendered by Chrome (IE10, Firefox also is OK)

See Pic-CEF  shows last two characters are rendered as Chinese.

It looks that problem has been fixed in chrome but not in CEF.

Tested with CEF1.1.1364.1123 and CEF3.1547.1406 on Windows 7 x64

Attached test document.

Original issue reported on code.google.com by tomaszku...@gmail.com on 9 Oct 2013 at 9:08

Attachments:

GoogleCodeExporter commented 9 years ago
What version of Chrome did you test with? Probably it is newer than the CEF 
version, in which case the issue will likely be fixed in CEF once it uses the 
newer Chromium version.

Original comment by magreenb...@gmail.com on 11 Oct 2013 at 1:36

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm seeing the same problem on CEF 3.1547.1412 on Windows. 

I could only find two related Chromium issues and they seem to have been fixed 
for a long time:
https://code.google.com/p/chromium/issues/detail?id=7160
https://code.google.com/p/chromium/issues/detail?id=140432

Original comment by monch...@gmail.com on 11 Oct 2013 at 5:14

GoogleCodeExporter commented 9 years ago
I was testing latest chrome v30. I also found workaround. You can set in CEF 
settings default font to be Japanese I.e "MS Gothic" on windows and specify 
sans-serif as the latest font in font-style. 

Sent from my iPad

Original comment by tomaszku...@gmail.com on 11 Oct 2013 at 5:23

GoogleCodeExporter commented 9 years ago
This is still unresolved as of CEF 3.2171.1979 for Windows (as well as the 
current dev trunk CEF 3.2271.2001).

This article explains the issues of glyph selection in detail:
http://en.wikipedia.org/wiki/Han_unification

If you open that URL in the cefclient app, you will notice that, in the the 
table of glyphs under the heading "Examples of language independent 
characters", the Chinese and Japanese characters are using the same glyph. In 
regular Chrome, the glyphs are different.

That page uses the lang attribute to select the correct glyph. Examples:
<td lang="zh" xml:lang="zh">今</td>
<td lang="ja" xml:lang="ja">今</td>

In the CEF these lang attributes appear to be ignored. It always displays the 
Chinese glyph even when the lang="ja" markup is used (although it does somehow 
change the glyph for Vietnamese).

However, if I explicitly set the local to "ja":
    settings.locale.str = L"ja";
    settings.locale.length = wcslen(settings.locale.str);

Or use the command line arg --lang=ja, it always uses the Japanese glyphs.

I'm using this as a workaround for now, since I always display my UI in one 
language at a time.
You will also need the ja.pak locales file (and other .pak files for whichever 
locales you support), and make sure settings.pack_loading_disabled is set to 
false.

Original comment by cardan...@gmail.com on 3 Feb 2015 at 4:06

GoogleCodeExporter commented 9 years ago
CEF is transitioning from Google Code to Bitbucket project hosting. If you 
would like to continue receiving notifications on this issue please add 
yourself as a Watcher at the new location: 
https://bitbucket.org/chromiumembedded/cef/issue/1103

Original comment by magreenb...@gmail.com on 14 Mar 2015 at 3:28