Topic on Manual talk:How to make a MediaWiki skin

Nasirkhan (talkcontribs)

What is the recommended way to use a webfont?


I may like to use a font and include that in the skin package. is there any doc available which answers to this question?

I also need to know the steps to use a Google Font or some other font hosted to some other domain.


I asked this same question to the support desk but did not got any reply there: Topic:Wb1rvgucmqffnsws

Jdlrobson (talkcontribs)

I don't really understand the problem here.

There is nothing stopping you from adding an import statement to your LESS file either to a local font file or a foreign domain. What am I not understanding?

e.g.

@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');

body { font-family: 'Open Sans', sans-serif; } 
Nasirkhan (talkcontribs)

Thanks for your reply.

If you read my question again, you will find that I wanted to know the recommended solution, not a solution to use a webfont. As mediawiki is using resource loaded for css and js, i just wanted to know if there is any recommendation set for webfonts.


from now on I will use less to import the fonts, thanks.

Jdlrobson (talkcontribs)

Got it. No. There is no recommendation that I am aware of specific to MediaWiki here. Although be wary of importing from external websites and make sure that's clear on the skin README if you do.