Using Google Fonts Offline

Find the font you want to use and find the Google recommended link to use (in the "Standard" tab).  e.g.


<link href='http://fonts.googleapis.com/css?family=VT323' rel='stylesheet' type='text/css'>

Enter the URL portion into your browser and get the resulting css, e.g.


http://fonts.googleapis.com/css?family=VT323

gives:


@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  src: local('VT323'), local('VT323-Regular'), url(http://themes.googleusercontent.com/static/fonts/vt323/v4/LfMzj2MWAZU6qzlnp1MNbg.woff) format('woff');
}

Copy the URL portion and put it in your browser to download it, e.g.:


http://themes.googleusercontent.com/static/fonts/vt323/v4/LfMzj2MWAZU6qzlnp1MNbg.woff

causes this file to be downloaded:


LfMzj2MWAZU6qzlnp1MNbg.woff

Store the file on the local web server.

Now modify the default css with the new url to the font and add it to the TOP of your css file or page, e.g.


@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  src: local('VT323'), local('VT323-Regular'), url(fonts/LfMzj2MWAZU6qzlnp1MNbg.woff) format('woff');
}

Now you can use if in your styles as normal, e.g.


body {
    font-family: 'VT323', Arial, sans;
    color: #666;
}

 

 

 

 

UK Electronic Designer
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published.