How do I self host fonts in Wordpress

davidjp

New Member
Hello,

I'm building a website and I usually use fonts hosted within the theme or via. 3rd party host plug-ins such as Adobe Typekit or GoogleFonts.

I now want to use a webfont sourced from the font foundry itself, fonts which are not available in the theme or via. 3rd party hosts.

How do I do this? It is just a matter of uploading the font to my ftp and then getting the theme tech support to generate some CSS that points to the font or can I do it myself somehow?

Thanks in advance folks.

D
 
Upload the font files to your server, and in your CSS you use @fontface to declare your fonts. Then you can call the fonts in your CSS as you would any other font;

Code:
body {
font-family: "My Font", sans-serif;
}

Ensure you don't have the fonts installed on your system and then check your site on a couple of devices. If you see the custom font, you're good to go.
 
Back
Top