Steps to generate @font-face web fonts
This is a web font in action. You can use it on any website.
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
- I copy the font files (the contents of the zip) to my web server.
- I copy the block of code above to my CSS file and modify it to point to where the
fonts reside on my web server.
I may have to adjust file permissions to make sure everything works.
- I then can use the font by adding the "font-family" property anywhere in my stylesheet.
- Warning: don't use @font-face too many times, it will slow down your website!