(Please excuse my example of Comic Sans neue, just something I had laying about)
You have to add them all separate, look at the following code. Each one has a different 'font-weight' and has a new font file (light
, regular
and bold
).
Each font file has a different font-size which means that if you want to add all of them, you'll have to add them all this way (for each one you want).
@font-face {
font-family: 'Comic Neue';
src: url('../fonts/ComicNeue-Light.eot'); /* IE9 Compat Modes */
src: url('../fonts/ComicNeue-Light.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/ComicNeue-Light.woff') format('woff'), /* Modern Browsers */
url('../fonts/ComicNeue-Light.ttf') format('truetype'); /* Safari, Android, iOS */
font-weight: 100;
}
@font-face {
font-family: 'Comic Neue';
src: url('../fonts/ComicNeue-Regular.eot'); /* IE9 Compat Modes */
src: url('../fonts/ComicNeue-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/ComicNeue-Regular.woff') format('woff'), /* Modern Browsers */
url('../fonts/ComicNeue-Regular.ttf') format('truetype'); /* Safari, Android, iOS */
font-weight: 300;
}
@font-face {
font-family: 'Comic Neue';
src: url('../fonts/ComicNeue-Bold.eot'); /* IE9 Compat Modes */
src: url('../fonts/ComicNeue-Bold.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/ComicNeue-Bold.woff') format('woff'), /* Modern Browsers */
url('../fonts/ComicNeue-Bold.ttf') format('truetype'); /* Safari, Android, iOS */
font-weight: 700;
}
Calling it is simple after, in your CSS:
p {
font-family: 'Comic Neue', sans-serif;
font-weight: 300; /*or 100/700*/
}
Obviously, you'd replace this with Open Sans
and the Open Sans
font files.