Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/107829


Change subject: Reverse the font stack with Autonym font
......................................................................

Reverse the font stack with Autonym font

All browsers try 'Autonym' first and then fallback font
if the font stack is 'Autonym', sans-serif

But they differ in the way they interpret a font stack like
sans-serif, 'Autonym'

* Chrome and IE uses generic families at the end no matter whether it is given
  at the beginning of font stack. So 'Autonym' font will be downloaded always.
  But that is only about download. While rendering, Chrome uses system fonts
  first and then Autonym font. But experiments shows that it does not resolve
  the fallback chain, just uses one font for sans-serif and uses 'Autonym' font
  as second font. So usually Latin glyphs get rendered from system fonts and
  non-latin fonts rendered from Autonym font.

* FF also downloads Autonym font always. But while rendering it resolves the
  full fallback chain. Non-latin text also get rendered using system font and
  Autonym font is used only when system does not have font.

So this patch does not make any difference for font download. But we improve
the bad rendering of webfonts in old Windows browsers. Since they start using
system font for latin languages, at least they look better.

Refer: https://www.mediawiki.org/wiki/Universal_Language_Selector/WebFonts

Change-Id: I99b3b4938d8fcb6cd5d67f7bbceb5f6443e98451
---
M resources/css/ext.uls.webfonts.css
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/29/107829/1

diff --git a/resources/css/ext.uls.webfonts.css 
b/resources/css/ext.uls.webfonts.css
index eb348f9..05b6dc2 100644
--- a/resources/css/ext.uls.webfonts.css
+++ b/resources/css/ext.uls.webfonts.css
@@ -1,4 +1,4 @@
 #p-lang li.interlanguage-link,
 .autonym { /* provide autonym class for simplifying the Autonym font usage */
-       font-family: 'Autonym', sans-serif;
+       font-family: sans-serif, 'Autonym';
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/107829
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99b3b4938d8fcb6cd5d67f7bbceb5f6443e98451
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to