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: 98bb1c200c )
Change-Id: I62860f9d62538915628ad21e5d904e56bdcc9430
This commit is contained in:
@@ -358,7 +358,8 @@
|
|||||||
// Remove all current fonts
|
// Remove all current fonts
|
||||||
$fontSelector.find( 'option' ).remove();
|
$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 ) {
|
$.each( fonts, function ( key, font ) {
|
||||||
var $fontOption;
|
var $fontOption;
|
||||||
|
|
||||||
|
|||||||
@@ -62,10 +62,6 @@
|
|||||||
font = repository.defaultFont( language );
|
font = repository.defaultFont( language );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( font === 'system' ) {
|
|
||||||
font = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return font;
|
return font;
|
||||||
},
|
},
|
||||||
exclude: ( function () {
|
exclude: ( function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user