At the moment there are several ways to use non-system fonts on a website. We will focus on the two least complicated, least expensive systems, Google Web Fonts and @font-face rule, though we have not ruled out other paying methods such as Typekit, Fonts.com webfonts, Fontdeck, Webtype, WebINK or Fontspring for future posts. They offer high quality typefaces and deserve to be considered.
It’s important to be aware that webfonts can generate inadequate visualizations on operating systems that have subpixel rendering turned off, such as Windows XP, or represented differently depending on the browser. For these reasons, another important point of this post is to facilitate the choice of a series of fonts, out of the hundreds available, whose technical and visual characteristics make them more readable and compatible with the wide variety of devices, browsers and operating systems that are out there.
Basically, there are two implementation models:
1. Web font embedding services
2. Embedding fonts using @font-face rule
Web font embedding services
Google Web Fonts (GWF) or Typekit are systems which allow the use of fonts hosted on their servers. GWF is free to use, does not require you to have an account and has no limit on traffic or domains as in the case of Typekit, which sets the cost of the service according to the number of domains in which the font is used or the site’s monthly traffic. One of the most valued characteristics of GWF is the option to download a desktop version of the fonts for use in the mockup phase of projects.
Implementation
Using them is really quick and simple:
1. You choose a font. You can add it to your collection or use “quick-use” to generate the code and options for that font.
2. Copy and paste the code generated into your <Head>
<head>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine">
</head>
3. The font is now accessible in your CSS code
body {
font-family: 'Tangerine', serif;
font-size: 48px;
}
Here you can consult a extended manual for styles, script subsets and using multiple fonts.
Top recommended fonts from Google Web Fonts
You will find many criticisms of the quality of GWF’s fonts and the amateurish nature of many of these typefaces. Google fonts is a collaborative open source project but many people think there should be a higher level of quality control.
- Open Sans
- Josefin Slab
- Arvo
- Lato
- Vollkorn
- Abril Fatface
- Ubuntu
- PT Sans + PT Serif
- Old Standard TT
- Droid Sans
Embedding fonts using @font-face declaration
In this case fonts are hosted on the user’s server independently of external services. @font-face was a deprecated CSS2 rule that has been re-introduced in CSS3 specifications and is supported by nearly all modern browsers.
A webfont is a customized font to be used for @font-face embedding in formats supported by the different browers like TTF, WOFF, EOT and SVG file.
There are many fonts available for @font-face embedding but we are going to give a selection of the webfonts available on FONTSQUIRREL, which are free to use and include a prepackaged @font-face kits with the required formats, CSS and HTML code. Fontsquirrel also offers the fantastic “@Font-Face Generator” tool, which can convert your desktop font into the appropriate format so you can use it as a webfont.
Implementation of webfonts with @font-face declaration
1. Select your favorite font in Fontsquirrel.
2. Download the @font-face kit and test the sample code in stylesheet.css and demo.html files. All the font formats must be uploaded to your server.
@font-face {
font-family: 'ChunkFiveRegular';
src: url('Chunkfive-webfont.eot');
src: url('Chunkfive-webfont.eot?#iefix') format('embedded-opentype'),
url('Chunkfive-webfont.woff') format('woff'),
url('Chunkfive-webfont.ttf') format('truetype'),
url('Chunkfive-webfont.svg#ChunkFiveRegular') format('svg');
font-weight: normal;
font-style: normal;
}
Top recommended fonts from FontSquirrel
- Anivers
- Junction
- Fertigo
- Aller
- Audimat
- Delicious
- Prociono
- Fontin
- Fontin-Sans
- Chunkfive
























