• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Installing new fonts

Jake Bunce

XenForo moderator
Staff member
#4
I think I found it in this file:

js/tinymce/themes/xenforo/editor_template.js

Code:
				theme_xenforo_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva",
 
#7
I think I found it in this file:

js/tinymce/themes/xenforo/editor_template.js

Code:
				theme_xenforo_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva",
Well, I found it where to modify, but Dev Team need to add it to be default style option. It's not easy to add custom font.
 

Kerby

Active member
#12
Sure, here my explanation:

Remove Fonts

js/tinymce/themes/xenforo/editor_template.js

search following part in the file:
Code:
theme_xenforo_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva",

and remove all fonts you don't want. i wanted only Arial and Helvetica (and if one has no Helvetica, switch to Arial, sans-serif, should do it automatically on Windows, but just to be sure ;)) So the part is now:
Code:
theme_xenforo_fonts : "Arial=arial,helvetica,sans-serif;Helvetica=helvetica,arial,sans-serif",


Change Fonttitle
You can change fonttitle by editing first part of a font-entry like i want to title "Arial" to "Custom Font":
"Arial=arial,helvetica,sans-serif"
-> "Custom Font=arial,helvetica,sans-serif"

After the "=" you can define which fonts should taken in which priority order, like you would do in CSS/HTML.