Topic on Project:Support desk

How to change the text font to a Google font that is not included in Mediawiki by default?

2
Atef81 (talkcontribs)

Hi,

Is there a way to change the font to a Google font that is not included in Mediawiki core?

In WordPress, I add the font link to a Google Tag, then add the tag to my pages and control the page sections (e.g. body) to use this font.

Is there a comparable process in Mediawiki to achieve using Google Fonts? Thanks

Ciencia Al Poder (talkcontribs)

You have Manual:Interface/Stylesheets for adding custom CSS code affecting all pages. You can import a new stylesheet provided by google for this font (your code is probably a <link rel="stylesheet"> or <style> tag).

You can place on MediaWiki's stylesheet something like this at the top of the css page:

@import url("http://path/of/the/stylesheet/provided.css")