@ font-face does not work in Firefox but IE and Chrome work [closed]

2

I always use @font-face in my projects and never had this problem.

I have doubts if you have any problems with my CSS.

@font-face is not working in Firefox.

My code looks like this.

<link rel="stylesheet" type="text/css" href="css/fonts.css">

The CSS of @font-face is in the fonts folder

   @font-face {
    font-family: 'futura_mdcn_btmedium';
    src: url('../fonts/futura_medium/futura_mdcn_bt_medium-webfont.eot');
    src: url('../fonts/futura_medium/futura_mdcn_bt_medium-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/futura_medium/futura_mdcn_bt_medium-webfont.woff') format('woff'),
         url('../fonts/futura_medium/futura_mdcn_bt_medium-webfont.ttf') format('truetype'),
         url('../fonts/futura_medium/futura_mdcn_bt_medium-webfont.svg#futura_mdcn_btmedium') format('svg');
    font-weight: normal;
    font-style: normal;
}

And in my CSS style it looks like this:

  p{
    font-family:'futura_mdcn_btmedium' Arial, Helvetica, sans-serif;    
        }
    body{
    font-family:'futura_mdcn_btmedium' Arial, Helvetica, sans-serif;        
    }

I have a folder named fonts and inside this folder it contains a subfolder futura_medium there are all files woff / ttf / svg etc.

Did I forget something?

    
asked by anonymous 31.01.2014 / 14:12

3 answers

1

What version of Firefox do you use?

Maybe he's not finding his folder, try putting another '../' in the front.

And a comma is missing there in your code, after the name of your font, before 'Arial'.

Have you tried a hack? This site here has a FF hack, at a glance who knows help. link

    
31.01.2014 / 15:18
0

Some suggestions:

-Make sure you do not have a plugin that changes pages in Firefox.

-Try other ways to report the location, using "~ /" instead of "... /".

    
31.01.2014 / 14:21
0

Have you noticed the error console? Usually the problem with fonts in firefox has to do with the lack of MimeType or CORS statement.

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

// Permite servir fonte para outros dominios
<FilesMatch "\.(ttf|otf|eot|woff)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
</FilesMatch>
    
31.01.2014 / 16:09