Jump to content

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. Edited by dalecosp

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.