xxxxxxxxxx
@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
xxxxxxxxxx
@font-face {
// Defining what the font will be called
font-family: thisSpecialFont;
// Linking to the font file
src: url(linkToFontFile.woff);
}
body {
font-family: thisSpecialFont;
}
xxxxxxxxxx
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot') format('eot'),
url('webfont.ttf') format('truetype'),
url('webfont.woff2') format('woff2'),
url('webfont.woff') format('woff');
}
xxxxxxxxxx
@font-face {
font-family: 'open_sansitalic';
src: url('OpenSans-Italic-webfont.eot');
src: url('OpenSans-Italic-webfont.eot?#iefix') format('embedded-opentype'),
url('OpenSans-Italic-webfont.woff2') format('woff2'),
url('OpenSans-Italic-webfont.woff') format('woff'),
url('OpenSans-Italic-webfont.ttf') format('truetype'),
url('OpenSans-Italic-webfont.svg#open_sansitalic') format('svg');
font-weight: normal;
font-style: normal;
}
xxxxxxxxxx
/*set the font name and the url path*/
@font-face {
font-family: customFontName;
src: url(path/to/font/sansation_light.woff);
}
/*add the new font to an element or class, etc*/
p {
font-family: customFontName;
}
.myClass{
font-family: customFontName;
}
xxxxxxxxxx
@font-face {
font-family: "The name of your font for your file";
src: url("The link to your .ttf or .otf file");
}