[Webkit-unassigned] [Bug 16548] REGRESSION(r28810): Font style and sizes are weird for Japanese text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 23 13:32:19 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=16548





------- Comment #14 from mitz at webkit.org  2007-12-23 13:32 PDT -------
I have been looking at how IE behaves on different language versions of
Windows. Using two UTF-8 encoded HTML files with no locale metadata and no
style information, one containing text from MSN in Chinese and the other
containing text from Google search results in Japanese, I have observed the
following:

* On the English and Chinese (cn) installs
  - Chinese was rendered using a single "Chinese"-looking font (probably
Simsun).
  - Japanese was rendered using a mixture of two fonts, the "Chinese" font for
some character and a "Japanese" font (probably MS PGothic) for others.

* On the Japanese install
  - Chinese was rendered using a mixture of two fonts, a "Chinese" one and a
"Japanese" one.
  - Japanese was rendered using a single "Japanese" font.

* On the Chinese (zh_HK) install
  - Japanese looked like on the (cn) install.
  - Chinese used mostly the "Chinese" font but a few characters were rendered
using a "Japanese"-looking font.

I have not tested it, but IE might perform better when it can infer the
language from the encoding or metadata.

Font fallback in WebKit is per-character and cannot be specific to a document,
so I think ideas that involve context or metadata are not the right answer.

The use of code pages on Windows is what leads to the "mixed fonts" behavior. I
think the whole notion of code page should be avoided in WebKit, just like on
the Mac.

The other thing that helps on the Mac is that font fallback tries to maintain
font traits, so for example even though the google.co.jp style sheet does not
specify any font family that has CJK characters on Leopard, since fallback is
from a sans-serif font, the system hands back a "Japanese"-looking font.

As far as I could tell, Windows font fallback mechanisms do not try to match
traits. However, it might still be possible to at least fall back on the
appropriate font for the installed language by using the registry keys that GDI
uses for its internal font fallback.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list