Use the @ font-face method. http://fontsquirrel.com has many free and free to use resources. You can download the font into your generator and it will provide you with a neat kit with files and instructions for the cross browser.
Here is an example:
@font-face { font-family: 'OpenSansLight'; src: url('fonts/fonts/OpenSans-Light-webfont.eot'); src: url('fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/OpenSans-Light-webfont.woff') format('woff'), url('fonts/OpenSans-Light-webfont.ttf') format('truetype'), url('fonts/OpenSans-Light-webfont.svg#OpenSansLight') format('svg'); font-weight: normal; font-style: normal; }
And then reference this to any element that you want to apply to
<style type="text/css"> div { font-family: OpenSansLight; } </style> <div> This is OpenSansLight! </div>
source share