[Webkit-unassigned] [Bug 71110] Add per-script font preferences support in overridePreference
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 1 01:20:30 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=71110
--- Comment #5 from Matt Falkenhagen <falken at chromium.org> 2011-11-01 01:20:30 PST ---
(In reply to comment #3)
Thanks for the review.
> (From update of attachment 112849 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=112849&action=review
>
> > Tools/ChangeLog:9
> > + // Set standard font for USCRIPT_ARABIC to Ahem.
> > + overridePreference("WebKitStandardFontMap", [ "2", "Ahem" ]);
>
> I assume 2 is USCRIPT_ARABIC? It would be nice if we could pass in strings (e.g., "arabic") instead of magic numbers. For example, what if a port doesn't use ICU (it looks like wince and brewmp don't use icu)?
I've changed it to be a four-letter script name like "Arab", "Hans". So, the other ports will need a mapping of these script names to script code since they can't use ICU directly. Regardless of the port, WebKit settings uses UScriptCode from ICU for per-script fonts, so I think this makes sense for overridePreference.
>
> > Tools/DumpRenderTree/chromium/WebPreferences.h:52
> > + // Map of UScriptCode to font such as USCRIPT_ARABIC
> > + // to "My Arabic Font".
> > + WebKit::WebString standardFontMap[USCRIPT_CODE_LIMIT];
>
> Can we use a HashMap instead of a statically allocated array?
I've changed it to a HashMap.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list