How do I install a custom font on an html site?
For example, I was working on a wedding website, and I was finding a lot of nice fonts for that subject, but I can't find the right way to add that font to the server, or to include that font with CSS?
download your font and put in any directory. here i added in fonts directory
<style>
@font-face {
font-family: 'maven_pro_light_300regular';
src: url('fonts/mavenprolight-300-webfont.eot');
src: url('fonts/mavenprolight-300-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/mavenprolight-300-webfont.ttf') format('truetype'),
url('fonts/mavenprolight-300-webfont.woff') format('woff'),
url('fonts/mavenprolight-300-webfont.svg#maven_pro_light_300regular') format('svg');
font-weight: normal;
font-style: normal;
}
</style>
and you can use it by follow example:
<style>
h2{
font-family:maven_pro_light_300regular;
}
</style>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments