Jump to content


Photo

font download not working in Firefox


  • Please log in to reply
4 replies to this topic

#1 bravo14

bravo14

    Advanced Member

  • Members
  • PipPipPip
  • 251 posts

Posted 20 January 2014 - 05:09 PM

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.remyweave...ipt-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



#2 dalecosp

dalecosp

    Advanced Member

  • Members
  • PipPipPip
  • 306 posts
  • LocationJoplin, MO

Posted 20 January 2014 - 05:22 PM

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, 20 January 2014 - 05:23 PM.

"God doesn't play dice" --- Albert Einstein
"Perl is hardly a paragon of beautiful syntax." --- Weedpacket

#3 bravo14

bravo14

    Advanced Member

  • Members
  • PipPipPip
  • 251 posts

Posted 20 January 2014 - 05:55 PM

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?

#4 cyberRobot

cyberRobot

    Advanced Member

  • Gurus
  • 1,752 posts

Posted 22 January 2014 - 08:44 AM

I'm not sure if this is the same font, but have you considered using Google Fonts:

http://www.google.co...:Dancing Script


Blogging about PHP and other web development topics at ScorpBytes.com

#5 dalecosp

dalecosp

    Advanced Member

  • Members
  • PipPipPip
  • 306 posts
  • LocationJoplin, MO

Posted 22 January 2014 - 03:05 PM

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.
"God doesn't play dice" --- Albert Einstein
"Perl is hardly a paragon of beautiful syntax." --- Weedpacket




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com