0

I am aware that this question is asked here but I have tried the solutions mentioned to no affect.

My CSS declration looks like:

@font-face { 
      font-family: gillsans; 
      src: url('gillsans.TTF'); 
    } 

This works in Chrome but not FireFox.

Weirdly enough, I have another site that uses the exact same declaration but with a different font and it works fine:

@font-face
{
    font-family: bebas;
    src: url('bebas.TTF');
}

Could this have something to do with the actual font file?

I have also tried modifying my .htaccess file as suggested:

AddType font/ttf .ttf
AddType font/eot .eot
AddType font/otf .otf
AddType font/woff .woff

<FilesMatch "\.(ttf|otf|eot)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
</FilesMatch>

Again no results in FireFox.

I have tried changing .TTF to .tff and providing absolute paths to the file, but still nothing.

Can anyone suggest something I can try?

The only possible thing could be is that this site is in development and is thus using a temporary URL, but I dont understand how that could effect it.

Community
  • 1
  • 1
MeltingDog
  • 14,310
  • 43
  • 165
  • 295

2 Answers2

1

Try other font types like eot,woff & svg. To convert you can use http://www.onlinefontconverter.com/

and then try this code in your style or css file:

<style type="text/css">
@font-face {
    font-family:'bebas';
    src:url('bebas.eot');/*IE9 or later*/
    src:local('bebas'),/*check for font installation*/
        local('b ebas'),/*check for font installation in some browsers like Safari*/
        url('bebas.eot?#iefix') format('embedded-opentype'),/*hack for IE8 or earlier*/
        url('bebas.woff') format('woff'),/*new browsers*/
        url('bebas.ttf') format('truetype'),/*all browsers excpet IE*/
        url('bebas.svg#bebas') format('svg');/*old iOs*/
}
.bebas-ft{
    font-family:bebas, Tahoma, Geneva, sans-serif;
}
</style>

And also do not modify your .htaccess file for such simple matter!

hamidfzm
  • 4,595
  • 8
  • 48
  • 80
0

So I downloaded another version of Gill Sans (still ttf) and replaced the one I have it that fixed it. Weird.

MeltingDog
  • 14,310
  • 43
  • 165
  • 295