btw. Be aware of internationalization issues: not to say that fonts are usually tied to a (group of) alphabets. Even digits can be affected by the language info of the context they live.
See [1]: this is the standard English Wikipedia signup screen, and [2]: with ?uselang=zh-cn added. [1] http://imagebin.org/275031 [2] http://imagebin.org/275032 -Liangent On Mon, Oct 28, 2013, S Page <sp...@wikimedia.org> wrote: > On Sun, Oct 27, 2013 at 11:11 PM, Faidon Liambotis <fai...@wikimedia.org > >wrote: > > > On Mon, Oct 28, 2013 at 01:32:30PM +1100, Tim Starling wrote: > > > >> Yes, we should prefer to use free software. We should also strive to > >> ensure that our support for users on non-free platforms is optimal, as > >> long as that doesn't negatively impact on users of free platforms. So > >> I don't think it is a problem to specify non-free fonts in font lists. > >> > > > > It's a bit more complicated than that. Linux distros ship with fontconfig > > (which is used by Cairo, which in turn is used by at least Firefox). > > Fontconfig aliases fonts via a set of rules and the default rules map > > popular non-free fonts to their free metric equivalents, or generics. > e.g. > > $ fc-match Helvetica > > n019003l.pfb: "Nimbus Sans L" "Regular" > > ... > > > > This effectively means that, for Linux, having the free fonts at the end > > of the CSS font selection is probably[1] a no-op: the browser will never > > fallback via the CSS, but match the first font on the list to an > equivalent > > found on the system via fontconfig's fallback mechanisms. > > Almost. fontconfig will use the first font in the font stack that has a > positive match. "Helvetica Neue" doesn't mean anything (so alone it would > give "Deja Vu Sans"), but the following "Helvetica" has a alias to "Nimbus > Sans L" with binding="same" in /etc/fonts/* , so Firefox uses that. > > > > It will be an educated guess and possibly do the right thing but it won't > > be what the web designer intended. > > > > For the 2012 Login and Create account form redesign, the web designer > (Munaf Assaf and others) intended Helvetica Neue for text and Georgia for > some numbers. fc-match lets free software get close to that intended look. > The right thing happens! (The Login and Create account forms looked good on > my Ubuntu for the time when they specified a font stack.[*]) Free OSes > sometimes improve their supplied fonts and matching rules, so it's possible > they'll later ship something that matches even better. For example Google's > new Roboto is a nice Helvetica Neue. Brave users can make the decision > themselves by hacking /etc/fonts/*. > > This basically strengthens your point: free fonts should be first in the > > list. > > > > Only if the free font looks better. > > [1]: I say "probably", because I vaguely remember the interactions between > > Firefox & fontconfig to be complicated. Maybe they're being smarter -- > > someone should test :) > > > Firefox works this way. It seems my Chromium prefers Nimbus Sans L even for > 'sans serif'; it could be my setup, or > https://code.google.com/p/chromium/issues/detail?id=242046 I would love > to > know what Android tablets do. > > [*] The local improvement to fonts on those forms made them inconsistent > with the rest of MediaWiki, so their font stack was removed. The VectorBeta > feature applies better typography everywhere. It's really nice IMO. > > -- > =S Page Features engineer > _______________________________________________ > Wikitech-l mailing list > Wikitech-l@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/wikitech-l > _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l