Topic on Project:Support desk

How to use a font with MediaWiki.

6
NeedAGoodUsername (talkcontribs)

Say I want use the font Comic Sans on my wiki. How would I do that?

121.219.52.179 (talkcontribs)

Same as any website, set font-family, most likely on the MediaWiki:Common.css page.

Ciencia Al Poder (talkcontribs)

You need to specify your font with the font-family CSS property (see example see SO question), either on specific parts of text with things like <span style="font-family:'Comic Sans';"></span> or applying it in general like body { font-family:'Comic Sans'; } in one of the stylesheets

NeedAGoodUsername (talkcontribs)

Thanks. Would I just upload the font file like any other file if it's a font I've made?

87.123.2.100 (talkcontribs)

If you want to use it as part of a skin, meaning as default style for something, then it would be best to put it somewhere inside the folder of that skin, meaning inside the skins/<mySkin> folder.

Ciencia Al Poder (talkcontribs)

You should use the @font-face structure in your CSS to refer to that font, as explained in @font-face MDN