Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font Awesome hosted in the CDN is not working for IE9 and IE8&7 mode #72

Closed
idarmans opened this issue Dec 7, 2012 · 9 comments
Closed
Assignees

Comments

@idarmans
Copy link

idarmans commented Dec 7, 2012

The browser just displays the icons as squares as if they're missing the font.
From what I can tell, the hosted version is missing 1 line compared to the official version
Second, the mimetype of the font files received in the browser are different than the official version in github:
eot, ttf and woff are application/octet-stream in the official github

@jdorfman
Copy link
Member

jdorfman commented Dec 7, 2012

@blinkerz can you provide me line 1 please?

The mime types are not the issue IMO.

@ghost ghost assigned jdorfman Dec 7, 2012
@idarmans
Copy link
Author

idarmans commented Dec 7, 2012

https://github.com/FortAwesome/Font-Awesome/blob/master/css/font-awesome.css

@font-face {
  font-family: "FontAwesome";
  src: url('../font/fontawesome-webfont.eot'); /* This is the line that's missing */
  src: url('../font/fontawesome-webfont.eot?#iefix') format('eot'), url('../font/fontawesome-webfont.woff') format('woff'), url('../font/fontawesome-webfont.ttf') format('truetype'), url('../font/fontawesome-webfont.svg#FontAwesome') format('svg');
  font-weight: normal;
  font-style: normal;
}

@jdorfman
Copy link
Member

jdorfman commented Dec 7, 2012

@blinkerz try this: https://netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome-72.css

@idarmans
Copy link
Author

idarmans commented Dec 7, 2012

Still doesn't work. The code is already pretty much identical to:
http://cdnjs.cloudflare.com/ajax/libs/font-awesome/2.0/font-awesome.css
and the one from cdnjs works (apart from 1 minor issue cdnjs/cdnjs#620). That means there are other factors to why it doesn't work

jdorfman added a commit that referenced this issue Dec 7, 2012
@jdorfman
Copy link
Member

jdorfman commented Dec 7, 2012

@blinkerz try this https://netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome-72a.css

@it-can
Copy link
Contributor

it-can commented Jan 13, 2013

Could the problem be the missing protocol (http/https)?

@jdorfman
Copy link
Member

@it-can not sure, for now I am closing this issue.

If someone has IE7/8 and can test this: https://netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome-72a.css that would be great.

@adamjgrant
Copy link

Doesn't work for me either. But I should note that the css seems to be loading just fine--the font itself is not.

@elmacm
Copy link

elmacm commented Aug 28, 2014


.htaccess

# ----------------------------------------------------------------------
# CORS-enabled images (@crossorigin)
# ----------------------------------------------------------------------
# Send CORS headers if browsers request them; enabled by default for images.
# developer.mozilla.org/en/CORS_Enabled_Image
# blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
# hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
# wiki.mozilla.org/Security/Reviews/crossoriginAttribute


<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
    # mod_headers, y u no match by Content-Type?!
    <FilesMatch "\.(gif|png|jpe?g|svg|svgz|ico|webp)$">
      SetEnvIf Origin ":" IS_CORS
      Header set Access-Control-Allow-Origin "*" env=IS_CORS
    </FilesMatch>
  </IfModule>
</IfModule>


# ----------------------------------------------------------------------
# Webfont access
# ----------------------------------------------------------------------
# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like "subdomain.example.com".


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




IIS ver 7.5+

<system.webServer>
   <httpProtocol>
     <customHeaders>
       <add name="access-control-allow-origin" value="*" />
       <add name="access-control-allow-headers" value="content-type" />
     </customHeaders>
    </httpProtocol>
</system.webServer>

IIS ver < 7.5

 <system.webServer>      
   <httpProtocol>
     <customHeaders>
       <add name="access-control-allow-origin" value="*" />
     </customHeaders>
    </httpProtocol>
</system.webServer>

NginX

location ~ \.(ttf|ttc|otf|eot|woff|font.css|css)$ {
           add_header Access-Control-Allow-Origin "*";
}


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants