• Blog

    Using alternative, free fonts on the web

    Font SquirrelThere are many different ways to use non standard web fonts in web pages. I’ve tried a lot of these ways in the past and have found that some techniques are better than others. Here’s one way of going about using alternative free fonts in a simple step by step guide. I hope this post will help others by demystifying the process.

    To complete these steps you’ll need an understanding of HTML and CSS and have a site already set up with some <h1></h1> tags and a separate .css file for the layout of your site.

    Font squirrel

    For this example we’re going to change all the h1 elements to League Gothic.

    1. Go to http://www.fontsquirrel.com/fontface
    2. Find League Gothic and click ‘Get Kit’
    3. Open the .zip file and rename it ‘type’
    4. Place it in the root directory of your website
    5. Find the file stylesheet.css (in the file you just renamed ‘type’)
    6. Copy the code from this file into your main .css file
    7. In this css you just copied, make sure all the paths to the fonts are correct by adding /type/ just before all the lines which read League_Gothic-webfont. For example: src: url('/type/League_Gothic-webfont.eot');
    8. Now in your main css file type h1 {font: 'LeagueGothicRegular'}

    Bingo. Now all your <h1></h1> elements are displayed in League Gothic.

    2 Comments

    1. W.B. Wolf says:

      Bravo, Mr. Hooker! I don’t think anyone has explained this process as clearly, and certainly not as succinctly. Thank you!

    Leave a Comment