My client has passed specific fonts to a site. These are in TTF format.
I'm used to using Google's fonts and there are not any there.
How can I use these fonts in my CSS or HTML?
Publish your fonts on the server. Example raleway-bold.ttf
CSS
@font-face {
font-family: ralewayExtralight;
src: url(raleway-extralight.ttf);
}
@font-face {
font-family: ralewayBold;
src: url(raleway-bold.ttf);
}
.Extralight {
font-family: ralewayExtralight;
}
.Bold {
font-family: ralewayBold;
}
HTML
<p class="Extralight">Estilo de font importada: raleway-extralight.ttf</p>
<p class="Bold">Estilo de font importada: raleway-bold.ttf</p>
Google Chrome:
Firefox:
Opera:
Safari:
InternetExplorer: