http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99464
Revision: 99464
Author: santhosh
Date: 2011-10-11 05:15:43 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
Fix Bug 31337 - Android 2.3.x does not respect local() syntax. So dont use it.
Anyway Android is not going to have the fonts in local.
Modified Paths:
--------------
trunk/extensions/WebFonts/js/webfonts.js
Modified: trunk/extensions/WebFonts/js/webfonts.js
===================================================================
--- trunk/extensions/WebFonts/js/webfonts.js 2011-10-11 04:07:51 UTC (rev
99463)
+++ trunk/extensions/WebFonts/js/webfonts.js 2011-10-11 05:15:43 UTC (rev
99464)
@@ -125,9 +125,15 @@
if ( 'eot' in fontconfig ) {
styleString += "\tsrc:
url('"+base+fontconfig.eot+"');\n";
}
- //If the font is present locally, use it.
- styleString += "\tsrc: local('"+fontfamily+"'),";
-
+ styleString += "\tsrc: ";
+ // If the font is present locally, use it.
+ var ua = navigator.userAgent;
+ if( ua.match( /Android 2.3/ ) == null ) {
+ // Android 2.3.x does not respect local()
syntax.
+ //
http://code.google.com/p/android/issues/detail?id=10609
+ styleString += "local('"+fontfamily+"'),";
+ }
+
if ( 'woff' in fontconfig ) {
styleString +=
"\t\turl('"+base+fontconfig.woff+"') format('woff'),";
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs