Search code examples
urlfont-faceopencartwebfonts

@font face weird issue between urls


I been having a weird issue with a client's website. Depending if you type "www" or not, the font comes up differently, even if you refresh the page. I wanted to know if anyone else had this issue and how to work around it?

Shows the correct font: http://artisseriebakery.com/

Shows the incorrect font: http://www.artisseriebakery.com/

I did this site in opencart and the font is a custom webfont, so I don't know if it's a linking problem.


Solution

  • I am using IE8 at the moment and I see no issues with your fonts... But it sounds like a cache issue.

    I found a free extension for opencart that will clear all cache, you could give that a try as well.

    http://www.opencart.com/index.php?route=extension/extension/info&extension_id=5187&filter_search=cache

    * Edit Below

    Try adding an .htaccess file to the folder where your fonts are located with this in it:

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

    I think this should clear up your Cross-Origin Resource Sharing (CORS) issues with fonts. Let me know if this helps!