htmlcssfont-facetamil

font face not work online


My HTML is in local system and pointing to css

<link rel="stylesheet" href="http://nagasystems.in/tamil/stylesheet/common.css" type="text/css" charset="utf-8" />

My font path folder is

http://nagasystems.in/tamil/stylesheet/

i have following fonts in it

bamini-webfont.eot
bamini-webfont.svg
bamini-webfont.ttf
bamini-webfont.woff
bamini-webfont.woff2

Now if i load the local HTML in browser the font is not loading ... Tested in all browsers.. However if html , css and font are in online it works or if all three are in local it works ..

Check below the link for all three being in online that works

http://nagasystems.in/tamil/

Kindly help me please .. Breaking my heads out for solution ...

Update : Error in chrome console "Font from origin 'nagasystems.in'; has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access"


Solution

  • Try Adding the following line to .htaccess file in the same folder of style sheet

    Header set Access-Control-Allow-Origin "*"
    

    It will allow the header from all locations (*)