[Webkit-unassigned] [Bug 18085] font-fallback of Chinese characters

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 1 13:01:11 PDT 2008


------- Comment #13 from jshin at chromium.org  2008-10-01 13:01 PDT -------
(In reply to comment #12)
> If FontDescription knows the script, then why do you need to append additional
> families at the style selector level?  Can't you just do the right thing down
> in the platform/ layer?

I think that's better if the goal is just to do what's implemented in the
That is, replace a CSS-generic family (e.g. 'serif') with 'the global generic
font for that css-generic and then per-generic/per-script font. 

However, this change is kinda intermediate step toward resolving bug 10874 and
is rather ugly (and is still work in progress).

What I eventually like to do is to use per-script font "substitution" for CSS
generic family (serif, sans-serif, monospace, etc) rather than the global
(across-language/across-script) generic-to-font family mapping.[1]

Given the following snippet, 
<span lang="ja" style="font-family: sans-serif;">blah blah</span>

sans-serif is currently replaced by the 'global' sans-serif font. My goal is to
replace it with 'sans-serif' font for Japanese. What the current patch does is
in-between (replacing 'sans-serif' with the 'global' sans-serif followed by 'ja
sans-serif').   Actually, 'lang' is not yet honored and as a poor man's lang,
it resorts to inferring the lang from the charset of a document (which does not
always work for the obvious reason). 

 Probably, it can be done more cleanly in fontDataForGenericFamily in
CSSFontSelector.cpp with some changes in |settings|.  Or, if |settings|
remained as it is, it might be possible to do using
|getFontForScriptAndGeneric| (in the patch, it's |getGenericFontForScript|)
that is platform-dependent (or port-dependent). 

BTW,  the first feedback from W3C I18N WG about Chrome was the lack of UI and
preferences for font-selection per-script/unicode block (as found in IE and
Firefox). They strongly believed that a browser needs that. 

Configure bugmail: https://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