I have searched Internet about my problem but I can't figure this out. Mostly problem people has with @font-face is just file paths. My problem is a font that is outside my domain happens to work well while ones that in my domain doesn't work. Well here's the fonts.css
@font-face {
font-family: "Cantarell";
src: url("http://mysite.com/fonts/Cantarell/Cantarell-Regular.eot") format("embedded-opentype");
src: url("http://mysite.com/fonts/Cantarell/Cantarell-Regular.woff") format("woff"),
url("http://mysite.com/fonts/Cantarell/Cantarell-Regular.otf") format("opentype"),
url("http://mysite.com/fonts/Cantarell/Cantarell-Regular.ttf") format("truetype"),
url("http://mysite.com/fonts/Cantarell/Cantarell-Regular.svg#Cantarell-Regular") format("svg");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "Purisa";
src: url("//db.onlinewebfonts.com/t/35e23faf72946beaae07e9f37976f728.eot");
src: url("//db.onlinewebfonts.com/t/35e23faf72946beaae07e9f37976f728.eot?#iefix") format("embedded-opentype"),
url("//db.onlinewebfonts.com/t/35e23faf72946beaae07e9f37976f728.woff2") format("woff2"),
url("//db.onlinewebfonts.com/t/35e23faf72946beaae07e9f37976f728.woff") format("woff"),
url("//db.onlinewebfonts.com/t/35e23faf72946beaae07e9f37976f728.ttf") format("truetype"),
url("//db.onlinewebfonts.com/t/35e23faf72946beaae07e9f37976f728.svg#Purisa") format("svg");
}
@font-face {
font-family: "Sophia";
src: url("http://mysite.com/fonts/Sophia/Sophia.eot") format("embedded-opentype");
src: url("http://mysite.com/fonts/Sophia/Sophia.woff") format("woff"),
url("http://mysite.com/fonts/Sophia/Sophia.woff2") format("woff2"),
url("http://mysite.com/fonts/Sophia/Sophia.otf") format("opentype"),
url("http://mysite.com/fonts/Sophia/Sophia.ttf") format("truetype"),
url("http://mysite.com/fonts/Sophia/Sophia.svg#Sophia") format("svg");
}
@font-face {
font-family: "Audrey";
src: url("http://mysite.com/fonts/Audrey/Audrey.woff2") format("woff2"),
url("http://mysite.com/fonts/Audrey/Audrey.woff") format("woff"),
url("http://mysite.com/fonts/Audrey/Audrey.otf") format("opentype");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "Qanelas Soft DEMO";
src: url("http://mysite.com/fonts/Qanelas-Soft/Qanelas-Soft.woff2") format("woff2"),
url("http://mysite.com/fonts/Qanelas-Soft/Qanelas-Soft.woff") format("woff"),
url("http://mysite.com/fonts/Qanelas-Soft/Qanelas-Soft.otf") format("opentype");
font-weight: normal;
font-style: normal;
}
And I linked my HTML file with the code above this way:
<link rel="stylesheet" src="./main.css"/>
<link rel="stylesheet" src="./fonts.css"/>
The font that happens to work well is just the Purisa font. I have no clue, I tried the @import fonts.css as well on top of the main.css and it's not even working. Anyone knows how to solve this?