From f23666a15a844c1619798716c43c10e67498bde3 Mon Sep 17 00:00:00 2001 From: Santhosh Thottingal Date: Mon, 27 May 2013 14:39:47 +0530 Subject: [PATCH] Get the saved font using the fontSelector defined in mw.webfonts.setup Also make sure that correct language is passed to the getFont It was wrong in current version - UI language was passed always (introduced in a refactoring to avoid code duplication for content and ui language- commit: 98bb1c200c8c8fe89a2b7ae1442e2354c6a48266 ) Change-Id: I62860f9d62538915628ad21e5d904e56bdcc9430 --- resources/js/ext.uls.displaysettings.js | 3 ++- resources/js/ext.uls.webfonts.js | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index 892ba0a0..f1a69c4a 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -358,7 +358,8 @@ // Remove all current fonts $fontSelector.find( 'option' ).remove(); - savedFont = mw.webfonts.preferences.getFont( this.uiLanguage ); + // Get the saved font using the fontSelector defined in mw.webfonts.setup + savedFont = this.$webfonts.getFont( language ); $.each( fonts, function ( key, font ) { var $fontOption; diff --git a/resources/js/ext.uls.webfonts.js b/resources/js/ext.uls.webfonts.js index 614a4dbf..206f6648 100644 --- a/resources/js/ext.uls.webfonts.js +++ b/resources/js/ext.uls.webfonts.js @@ -62,10 +62,6 @@ font = repository.defaultFont( language ); } - if ( font === 'system' ) { - font = null; - } - return font; }, exclude: ( function () {