Is possible to add new fonts into MyBB?
I have some and I want to add it into my site but I don't know how.
Thanks.
You need to edit editor.js to add new fonts. From line 66:
// Defines an array of fonts to be shown in the font drop down.
this.fonts = new Object();
this.fonts["Arial"] = "Arial";
this.fonts["Courier"] = "Courier";
this.fonts["Impact"] = "Impact";
this.fonts["Tahoma"] = "Tahoma";
this.fonts["Times New Roman"] = "Times New Roman";
this.fonts["Trebuchet MS"] = "Trebuchet MS";
this.fonts["Verdana"] = "Verdana";
Copy the layout of one of those lines and put the name of the font you want to add.
Added this like:
this.fonts["Comic Sans MS"] = "Comic Sans MS";
But it didn't load into the editor template..
Clear your cache, I had to do that to get it to show for me.
Yes. Thanks.
Also.. I can add custom fonts?
Or just Word fonts?
Define what you mean by custom... displaying these added fonts will only work if the browser/computer can interpret the name and actually display that font.
Custom... for me is the font that you download.
I think you can add any font your system supports, can't you?
Yes. I have added some os my downloaded fonts and all worked.
(2009-10-25, 10:51 PM)Skiilz Wrote: [ -> ]Yes. I have added some os my downloaded fonts and all worked.
The problem with a lot of fonts from sites like dafont.com though is not everyone has the font. That's why when browsing the web you don't see many different fonts.