Right now, mw.webfonts makes two modifications to font-family assignments:
- If the wiki's content language is a webfont language, it adds the webfont to the beginning of the body's font-family declaration.
- Any content that has a language attribute set to a webfont language is given a font-family declaration for that font.
This has the effect of aggressively overriding the user's normal fonts even if their existing fonts include glyphs for all the characters. So for example, if my system already has a font for displaying Arabic, I see the content in that font first and then it switches to the webfont. This has two negative effects:
- The styling unexpectedly changes while I'm reading the text.
- If the webfont includes ASCII glyphs (which is common) ASCII characters will be rendered in the webfont even though the user will normally have many fonts that are more optimized for ASCII (like Arial, Nimbus Sans, etc.)
A better solution would be for mw.webfonts to:
- Add the webfont to the _end_ of the body's font-family declaration
- Don't do anything else
That way the webfont will only be used for filling in missing glyphs rather than aggressively overriding the system fonts.
The exception to this would be if the user chooses a different font from the ULS font-choosing interface, for example OpenDyslexic. In that case it should retain the existing behavior.