Index: branches/wmf/1.18wmf1/extensions/WebFonts/resources/ext.webfonts.js |
— | — | @@ -167,6 +167,18 @@ |
168 | 168 | * It also apply the font from cookie, if any. |
169 | 169 | */ |
170 | 170 | setup: function() { |
| 171 | + // Blacklist some browsers that are known to have issues with font rendering |
| 172 | + if ( navigator.appName === 'Microsoft Internet Explorer' ) { |
| 173 | + var ua = navigator.userAgent; |
| 174 | + if ( /MSIE 6/i.test( ua ) ) { |
| 175 | + // IE6 has not font fallbacks |
| 176 | + return; |
| 177 | + } else if ( /MSIE 8/i.test( ua ) && /Windows NT 5.1/i.test( ua ) ) { |
| 178 | + // IE8 on XP has occasional gibberish bug |
| 179 | + return; |
| 180 | + } |
| 181 | + } |
| 182 | + |
171 | 183 | var config = []; |
172 | 184 | var languages = mw.webfonts.config.languages; |
173 | 185 | var requested = [mw.config.get( 'wgUserVariant' ), mw.config.get( 'wgContentLanguage' ), mw.config.get( 'wgUserLanguage' )]; |
— | — | @@ -262,12 +274,11 @@ |
263 | 275 | var haveSchemes = false; |
264 | 276 | // Build font dropdown |
265 | 277 | var $fontsMenu = $( '<ul>' ).attr( 'id', 'webfonts-fontsmenu' ); |
266 | | - $fontsMenu.delegate( 'input:radio', 'change', function( e ) { |
| 278 | + $fontsMenu.delegate( 'input:radio', 'click', function( ) { |
267 | 279 | mw.webfonts.set( $(this).val() ); |
268 | 280 | } ); |
269 | 281 | for ( var scheme in config ) { |
270 | | - var $fontLink = $( '<input type="radio" />' ) |
271 | | - .attr( 'name', 'font' ) |
| 282 | + var $fontLink = $( '<input type="radio" name="font" />' ) |
272 | 283 | .attr( 'id', fontID( config[scheme] ) ) |
273 | 284 | .val( config[scheme] ); |
274 | 285 | |
— | — | @@ -292,8 +303,7 @@ |
293 | 304 | return null; |
294 | 305 | } |
295 | 306 | |
296 | | - var $resetLink = $( '<input type="radio" />' ) |
297 | | - .attr( 'name', 'font' ) |
| 307 | + var $resetLink = $( '<input type="radio" name="font"/>' ) |
298 | 308 | .attr( 'value', 'webfont-none' ) |
299 | 309 | .attr( 'id', 'webfont-none' ) |
300 | 310 | .click( function( e ) { |
Index: branches/wmf/1.18wmf1/extensions/WebFonts/resources/ext.webfonts.fontlist.js |
— | — | @@ -358,10 +358,10 @@ |
359 | 359 | bpy: [ "Lohit Bengali" ], |
360 | 360 | cdo: [ "Charis SIL" ], |
361 | 361 | fa: [ "Iranian Sans" ], |
362 | | - gu: [ "Lohit Gujarati", "Samyak Gujarati" ], |
| 362 | + gu: [ "Lohit Gujarati" ], |
363 | 363 | hbo: [ "Taamey Frank CLM" ], |
364 | 364 | he: [ "Miriam CLM", "Taamey Frank CLM" ], |
365 | | - hi: [ "Lohit Devanagari", "Samyak Devanagari" ], |
| 365 | + hi: [ "Lohit Devanagari" ], |
366 | 366 | km: [ "KhmerOSbattambang", "KhmerOSsiemreap", "KhmerOS", "KhmerOSbokor", |
367 | 367 | "KhmerOSmuollight", "KhmerOSmuol", "KhmerOSmuolpali", |
368 | 368 | "KhmerOSfreehand", "KhmerOSfasthand" ], |
— | — | @@ -370,12 +370,12 @@ |
371 | 371 | gom: [ "Lohit Devanagari" ], |
372 | 372 | mai: [ "Lohit Devanagari" ], |
373 | 373 | ml: [ "AnjaliOldLipi", "Meera", "RaghuMalayalam" ], |
374 | | - mr: [ "Lohit Devanagari", "Samyak Devanagari" ], |
| 374 | + mr: [ "Lohit Devanagari" ], |
375 | 375 | my: [ "Masterpiece Uni Sans", "Padauk-Regular", "Myanmar3", "Yunghkio" ], |
376 | 376 | ne: [ "Lohit Devanagari", "Madan" ], |
377 | 377 | or: [ "Lohit Oriya" , "Utkal" ], |
378 | 378 | pa: [ "Lohit Punjabi", "Saab" ], |
379 | | - sa: [ "Lohit Devanagari", "Samyak Devanagari" ], |
| 379 | + sa: [ "Lohit Devanagari" ], |
380 | 380 | saz: [ "Pagul" ], |
381 | 381 | ta: [ "Lohit Tamil", "Thendral", "Thenee" ], |
382 | 382 | te: [ "Lohit Telugu", "Pothana2000", "Vemana2000" ], |