css - While loading webfont through @font-face, .woff and .ttf files throw NetworkError: 404 Not Found -


this question has answer here:

while loading webfont through @font-face, .woof , .ttf files throw networkerror: 404 not found.

i have gone through related topics in stackoverflow can't find solution.

even have added following code in .htaccess , in apache - httpd.conf. no use.

header set access-control-allow-origin "*" 

and following mo'bulletproofer method suggested of topics in stackoverflow

following css code,

@font-face {     font-family: 'proxima nova';     src: url('../fonts/proximanova-light-webfont.eot');     src: url('../fonts/proximanova-light-webfont.eot?#iefix') format('embedded-opentype'),          url('../fonts/proximanova-light-webfont.woff') format('woff'),          url('../fonts/proximanova-light-webfont.ttf') format('truetype'),          url('../fonts/proximanova-light-webfont.svg#proximanovalight') format('svg');     font-weight: 100;     font-style: normal;  } @font-face {     font-family: 'proxima nova';     src: url('../fonts/proximanova-lightitalic-webfont.eot');     src: url('../fonts/proximanova-lightitalic-webfont.eot?#iefix') format('embedded-opentype'),          url('../fonts/proximanova-lightitalic-webfont.woff') format('woff'),          url('../fonts/proximanova-lightitalic-webfont.ttf') format('truetype'),          url('../fonts/proximanova-lightitalic-webfont.svg#proximanovalightitalic') format('svg');     font-weight: 100;     font-style: italic;  } 

even path have specified in url correct.

in stackoverflow of related topics providing solution windows - iis server not more apache.

error throwing on console

"networkerror: 404 not found - http://localhost:8888/test/assets/fonts/proximanova-light-webfont.woff" proxim...nt.woff "networkerror: 404 not found - http://localhost:8888/test/assets/fonts/proximanova-reg-webfont.ttf" 

we have file on same directory mentioned on font-face

you can use following in .htaccess file

 <filesmatch "\.(ttf|otf|eot|woff)$">   <ifmodule mod_headers.c>     header set access-control-allow-origin "*"   </ifmodule> </filesmatch> 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -