Specifying Downloadable Fonts

The CSS2 standard allows you to specify a font file from your site that can be downloaded and used by your web page. This is done by specifying the @font-face command to associate the font file with a font-family name. For example:

@font-face {font-family: myfont; src:url(myfont.ttf);}

In the above example the font from the myfont.ttf file on the server will be associated with the font name myfont which can then be used within the font declarations in your other stylesheet commands.

Note that while this is part of the CSS2 specification it is not supported by all current web browsers and so will not produce the desired result in all browsers.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow