August 3, 201115 yr Hi guys Was hoping for some input with a problem I'm having with @fontface and firefox. Every other browser is rendering my site using the desired font, but firefox jumps to the next one in the font-family list (century-gothic in this case). It works fine on my machine at home but hen I ftp'd everything over to the remote server it stops working. Here is the @fontface code in the css for non IE browsers: @font-face { font-family: "avangeli"; src : url("../fonts/AVANGELI.ttf") format("truetype"), url("../fonts/AVANGELI.svg#AVANGELI") format("svg"); } And then I call it in the body css tag: html, body { background : #000 url('../images/lightsBackgroundSat.jpg') no-repeat fixed; background-size : 100% 720px; padding : 10px 50px 0 50px; font-family : "avangeli", century-gothic, sans-serif; font-weight : lighter; color : #ffffff; min-width : 1000px; } I have had this problem, and solved it, once before. That time the src url's were wrong. This time I'm completely stumped, and rather tired! Here is the sites url too: www.cryhopecryfury.co.uk Any help would be greatly appreciated!
August 3, 201115 yr I get a 404 error when I go to the font file on your server, so it looks like you just haven't uploaded the TTF to that location. According to your stylesheet it should be here: http://www.cryhopecryfury.co.uk/fonts/avangeli.ttf
August 3, 201115 yr Author I get a 404 error when I go to the font file on your server, so it looks like you just haven't uploaded the TTF to that location. According to your stylesheet it should be here: http://www.cryhopecryfury.co.uk/fonts/avangeli.ttf If you type the name of the font in capitals in the url the 404 error doesn't come up, as such :here if you look at the stylesheet code you will see the src calls the font file using capitals, which is the format of the actual ttf filename ('AVANGELI.ttf').
August 3, 201115 yr where are your .eot and .woff? also I believe you need a comma after your first line: src:url("../fonts/AVANGELI.ttf") format("truetype"), url("../fonts/AVANGELI.svg#AVANGELI") format("svg"); Just reread what you have in your OP, with a comma, but in your main.css you have @font-face { font-family: "avangeli"; src:url("../fonts/AVANGELI.ttf") format("truetype") url("../fonts/AVANGELI.svg#AVANGELI") format("svg"); } Edited August 3, 201115 yr by zed
August 3, 201115 yr Permissions? Server font support? I had to enable support for font file types on my host.
August 3, 201115 yr Author Thanks for the replies! I decided to re-visit font squirrel and download a new kit. Having followed the original css code it supplies more truly things seem to be working now! Thanks again guys!
Create an account or sign in to comment