0

Wikipedia has changed its font-family for the Languages panel, and it doesn't render very well in Chrome. So I wanted to hard-code in the Custom.css with another font, but I haven't got success.

This is the line I added,

@font-face { font-family: 'Autonym', sans-serif ; font-style: normal; src: local('Arial'); }
fixer1234
  • 27,064
  • 61
  • 75
  • 116
whitenoisedb
  • 297
  • 7
  • 17

1 Answers1

0

Why would font-face work? Add a proper CSS rule editing the page Special:MyPage/common.js, like

$.webfonts.repository.languages.languageCode = ["system", "FontA", "FontB"];

See docs: https://www.mediawiki.org/wiki/Extension:Universal_Language_Selector#Alternate_ways_to_load_fonts

Example URL where to add the setting (for the wiki mediawiki.org; change to your domain): https://mediawiki.org/wiki/Special:MyPage/common.js

Nemo
  • 1,134
  • 3
  • 12
  • 31
  • I must say I'm just a reader of wikipedia. I wanted to change Wikipedia fonts in the Language panel because Chrome doesn't seem to render very well Autonym. I read I should add that font-face line into Custom.css file in my Chrome but doesn't work. – whitenoisedb Jan 18 '14 at 22:26
  • It's not Chrome, it's Windows (if you're having that problem with Linux then it's weird). You have to pick the right font list, I suppose just $.webfonts.repository.languages.en = ["system"]; could work on English wikis. – Nemo Jan 19 '14 at 20:51
  • Thanks for replying! I'll try in Linux, but here's a screenshot, are we talking about the same thing? http://i.imgur.com/J2s5alE.png – whitenoisedb Jan 20 '14 at 03:24
  • Yes we are. :) You can also follow https://github.com/santhoshtr/AutonymFont/issues/38 if you want. – Nemo Jan 20 '14 at 12:17
  • Wow, genius. I didn't know where Special:MyPage/common.js was in the file browser. I only found the Custom.css – whitenoisedb Jan 21 '14 at 17:42