html - How to use Custom Fonts using CSS? -
I've found so many articles and tutorials on the net, I've followed some of them but still do not get the desired result Used to be. / P>
I downloaded the font and placed it in my project folder. This is the code I am writing, but this font-style is not changing.
@ font-face {font-family: Montereybold; Src: url (font / Montereybold.ttf); } H1 {font-size: 36px; Font-family: Montereybold; }
Please guide me what I am doing wrong.
Thank you
¿Have you tried to quote the name of the font? Also, upload multiple font formats, for better compatibility.
@ font-face {font-family: 'Montereybold'; Src: url ('font / Montereybold.eot'); / * IE9 Compatable mode * / src: url ('font / Montereybold.eot? #iefix') format ('embedded-opentype'), / * IE6-IE8 * / url ('font / Montereybold.woff') format ( 'Woff'), / * Modern browsers * / url ('font / Montereybold.ttf') format ('truetype'), / * Safari, Android, iOS * / url ('font / Montereybold.svg # Montereybold') format ('Svg'); / * Heritage iOS / Font-Weight: Normal; Font-style: normal; }
Using it:
Font-family: 'MontereyBold';
Dafont.com is a site where you can download a ton of free fonts. You can search for a specific typeface, or search by the type of lettering you want, whether it’s serif or sans serif, hand lettered or grunge style. You can also put in your own phrase to see how it looks in a particular font. A lot of these fonts are very decorative and many are handdrawn, so it’s not always the best place to search for body text fonts. Each selection also tells you whether your download is free for personal or commercial use. The download is easy – you get a zip file with the font file inside. Unzip, install, and you’re ready to go.
ReplyDeleteDafont.com is a site where you can download a ton of free fonts. You can search for a specific typeface, or search by the type of lettering you want, whether it’s serif or sans serif, hand lettered or grunge style. You can also put in your own phrase to see how it looks in a particular font. A lot of these fonts are very decorative and many are handdrawn, so it’s not always the best place to search for body text fonts. Each selection also tells you whether your download is free for personal or commercial use. The download is easy – you get a zip file with the font file inside. Unzip, install, and you’re ready to go.
ReplyDelete