2
I’m trying to insert a non-standard font into my html
, but it’s not working. I downloaded the source and put it in a folder /font
inside the briefcase css
. Follows the code:
@font-face {
font-family: sans-pro;
src: url("/font/source-sans-pro/SourceSansPro-Regular.ttf");
}
#header1 {
font-family: sans-pro;
color: red;
}
am using Windows7 and wampserver.
tried both suggestions but no success.
– Fernando William
@Fernandowilliam tries without quotation marks like this
src: url(font/source-sans-pro/SourceSansPro-Regular.ttf);
– M8n
Nothing done, my friend!
– Fernando William
Which browser? Do (cross-browser): @font-face { font-family: 'sans-pro'; src:url(font/source-sans-pro/Sourcesanspro-Regular.eot? #iefix) format('Embedded-opentype'); /For Internet Explorer browsers/ src: local("sans-pro"), url(font/source-sans-pro/Sourcesanspro-Regular.ttf); font-Weight: normal; font-style: normal; } The only thing you need to do is to copy the ttf source in eot format. Use this site for this: https://onlinefontconverter.com/
– Vítor André
André, I’m using Chrome, but after your tip I converted the source on the site indicated, I used the suggested code, I also tested on IE and Mozilla but nothing happened. I thought there might be some error in my code, but when testing with another source (cursive, Rial, times...) works normally.
– Fernando William