Member Offer
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I self host fonts in Wordpress

Discussion in 'Website Design Forum:' started by davidjp, Oct 26, 2016.

  1. davidjp

    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
     
  2. Paul Murray

    Paul Murray Moderator Staff Member

    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.
     
    bigdave and Stationery Direct like this.
  3. davidjp

    davidjp New Member

    Excellent, thanks Paul. I'll have a stab at that today.
     

Share This Page