On Thu, Jul 16, 2009 at 4:12 PM, Amir E. Aharoniamir.aharoni@gmail.com wrote:
Bug 2361 is very closely related, but it is only about the Tamil Wikipedia. It should be available everywhere.
I've generalized the bug report (maybe I should have opened a new one instead, oh well) and commented. Reproducing comment here in case anyone has comments:
There are potentially serious issues with including zillions of web fonts that may or may not be needed. Some of them are big downloads, and WebKit refuses to lay out text until the font is downloaded. If a local font has the characters, that would be greatly preferable.
Would font-family: sans-serif, mycustomfont; mean "use mycustomfont, but only if the characters aren't available in the default local font"? The CSS 3 Fonts spec says it should, but CSS 2.1 seems vague; does it work in practice, and if so, in what browsers? In particular, do browsers download the font unnecessarily? Do they support unicode-range (I'm guessing IE doesn't)?
In an ideal world, it *should* be safe to have some custom font-families defined, and do something like this on all wikis:
html { font-family: sans-serif, Wikimedia-custom-font; } #p-lang { font-family: sans-serif; /* avoid downloading custom fonts just for interlanguage links */ }
I don't know if that would work in the real world without unpleasant side effects.
If we can use unicode-range effectively, then we can just deliver existing free fonts. If it's not, then we should combine the ones we need into a single file, so that browsers don't have to download a bunch of files in a row to figure out which one has the characters they actually need.
A lot depends on browser implementation here. If some browser doesn't support falling back on a character-by-character basis, then it will be a lot more painful to support this effectively. In fact I guess it would be impossible, for that browser, to automatically use web fonts without screwing up people's choice of default fonts for some of the text. Is anyone willing to test out IE, Firefox 3.5, and the appropriate Safari version to see how they behave?