Jump to content

font download not working in Firefox


bravo14

Recommended Posts

Hi 

 

I have a font that I need to download via CSS it works fine in Safari, but in the Console in Firefox I get the following error

 

downloadable font: download failed (font-family: "Dancing" style:normal weight:normal stretch:normal src index:0): bad URI or cross-site access not allowed source: http://www.remyweavesandbraids.com/files/fonts/DancingScript-Regular.ttf

 

The css used is as follows

 

 
@font-face {
 font-family: Dancing;
 src: url(../files/fonts/DancingScript-Regular.eot); /* EOT file for IE */
}
@font-face {
 font-family: Dancing;
 src: url(../files/fonts/DancingScript-Regular.ttf); /* TTF file for CSS3 browsers */
 }

 

What do I need to do in order for Firefox to display it properly

Link to comment
https://forums.phpfreaks.com/topic/285536-font-download-not-working-in-firefox/
Share on other sites

Have you tried the fully-qualified path to the resource?

 

 

src: url(http://www.mysite.com/files/fonts/DancingScript-Regular.ttf); /* TTF file for CSS3 browsers */

If that's not it, you probably needs to investigate CORS.

Can I do this in the css file or does it have to be done outside of the css in the head tag of the HTML?

It would go in the excerpts you showed above, wherever they live, and should work in either HEAD or a separate CSS file, per convention and specs.

 

have you considered using Google Fonts:

+1 for that. Some javascripting and general all-around web knowledge required, but a very nice API to use.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.