You are here

Fonts

Submitted by Peter on Mon, 2010-09-20 18:10

Fonts test. A page showing some fonts that might work in your browser using CSS @font-face.

Adding a font to CSS

The following example uses a font named Sniglet, a 58.24 KB download. The following CSS code is the way you add the font if you have the font on your Web site. The example is a true type font and there are other font types that work.

<style type="text/css">
@font-face
  {
  font-family: Sniglet;
  src: url('/system/files/Sniglet.ttf') format("truetype");
  }
</style>

This is the way you test the font.

%lt;p style="font-family: Sniglet;">Test of the Sniglet font face.</p>

Sniglet

Sniglet is a free font from www.theleagueofmoveabletype.com/sniglet. The following tests may work in your Web browser. If they do, you will see round fat letters as shown in the following image.
Sample of Sniglet font

Test of the Sniglet font face at the default size

Test of the Sniglet font face.
abcdefghijklmnopqrstuvwzyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789 -=`~!@#$%^&*()_+
{}[]|\:";',.?/

Test of the Sniglet font face at the xx-large size

Test of the Sniglet font face at the xx-large size.
abcdefghijklmnopqrstuvwzyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789 -=`~!@#$%^&*()_+
{}[]|\:";',.?/

Test of the Sniglet font face at the xx-large size with a line height 1.2em

Test of the Sniglet font face at the xx-large size with a line height 1.2em.
abcdefghijklmnopqrstuvwzyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789 -=`~!@#$%^&*()_+
{}[]|\:";',.?/

License

Check the license for any font you want to use on your Web site. Most fonts have a license of some sort. Old licenses do not mention the use on the Web. New licenses often mention the Web and require a separate payment or a special attribution method.

Hosting

If you host a font on your Web site, the leeches will use the font on their Web site but point their CSS back to your Web site so you will pay for the download charges instead of them. You could fight the leeches by frequently changing the directory you use for the downloads and using other tricks.

Available fonts

There are lots of fonts you can use. Try to use fonts with an OFL (SIL Open Font License). The first example is the default font for this page. The next examples are specific fonts. If a specific font is not different from the default, either the specific font is your default or the specific font is not on your computer.

Default

This is the default font for this web page based on the supplied CSS.
abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

serif

This is the default test font if you do not specify anything else. This font is a serif font, a font with those little tips at the end of each line.
abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

sans-serif

This is the default sans serif font if your computer does not have Arial or any of the other sans serif fonts.
abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Arial

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Calibri

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Century Schoolbook

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Chicago

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

DejaVu Mono

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

DejaVu Sans

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

DejaVu Serif

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Geneva

Geneva is a sans serif font originally similar to the popular Helvetica. Only available on some Apple products. Use Helvetica, Arial, and sans-serif as the alternatives.
abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Georgia

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Helvetica

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Lucida Grande

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Lucida Sans Unicode

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Monaco

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

New Century Schoolbook

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

New York

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

OCRA

This font is used for optical character recognition and is available for download on Ubuntu 11.4.
abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Purisa

Purisa is a decorative font similar to handwriting and is available on Ubuntu 11.4.
abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Puritan

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Tahoma

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Times Roman

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

URW Chancery L

This is a script font similar to handwriting and is available on Ubuntu 11.4.
abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Verdana

abcdefghijklmnopqrstuvwzyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 -=`~!@#$%^&*()_+{}[]|\:";',.?/©

Further reading