Topic on Project:Support desk

The-Psychid (talkcontribs)

I sincerely apologize if this is something that's already brought up; but is there a way I can import fonts directly from my computer to the wiki made with MediaWiki? I haven't made it yet; but I plan on making a wiki dedicated to a future project of mine, once I purchase a new desktop computer after filing my income taxes. Once I make the wiki, I'll upload fonts that are essential to both the wiki itself, and the project it's based on.

The reason why I'm asking this question is because I want to make my custom fonts be available on the wiki, but for all users to see, without having them go through the trouble of downloading those fonts themselves. Is there a way I can upload my custom-made fonts directly from my computer to the Wiki?

Malyacko (talkcontribs)
Ciencia Al Poder (talkcontribs)

In case you want to use your custom-made webfonts, you can try to upload them to the wiki like any other file (but you'll need to configure uploads to accept that kind of file type).

The-Psychid (talkcontribs)

I'm hoping that uploading them will be easier. But if I do, I'll have to make sure that the "file_uploads = On" code is set (through PHP), in order to upload the .ttf files from my computer; is that correct?

Ciencia Al Poder (talkcontribs)

Yes, you need that to upload any file to MediaWiki (also images). If you don't want to allow uploads on your wiki, you can also place the fonts file directly on the server in a folder that's accessible from the web. At the end, you need the font file to be available from a public URL, so it can be downloaded when used from a CSS file.

The-Psychid (talkcontribs)

So I was looking at the "configuring file types" section of the link you've provided, and I want to make sure I'm reading this correctly. Obviously, I'll allow more file types than the given example; but if I wanted to upload my fonts, would I have to put in the following code:

$wgFileExtensions = array( 'ttf' );

Something like that?

Ciencia Al Poder (talkcontribs)

Actually, you'll have to put

$wgFileExtensions[] = 'ttf';

Otherwise ttf will be the only file type allowed to upload.

The-Psychid (talkcontribs)

Well, I do intend to have more file types than just ttf be allowed to be uploaded; I was just giving an example. Still, I'm glad to know that I'm on the right track. Thank you ever so much for your assistance.