With the font stored in the font folder (for example: fontFolder ), you should use the @ font-face generator to automatically force the user to download the font so that it will be displayed wherever you specify the site. Below, fontFolder represents the directory (folder) in which font files live, and fontName represents the font name (sits inside fontFolder ). If you have .eot.tff.woff and .svg font options stored in fontFolder , you can copy the code below to the beginning of the stylesheet and replace fontFolder with your own directory name and replace fontName with your font name:
@font-face { font-family: "fontName"; src: url('fontFolder/fontName.eot'); src: url('fontFolder/fontName.eot?#iefix') format('embedded-opentype'), url('fontFolder/fontName.woff') format('woff'), url('fontFolder/fontName.ttf') format('truetype'), url('fontFolder/fontName.svg')format('svg'); }
When you're ready to use your font, just use its name:
h1 { font-family: yourFont; }
source share