Reputation: 89
Is there any problem in the below code?:
when I load this font in a web page the font doesn't work.
@font-face {
font-family: 'yekan';
src: url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.eot');
src: url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.eot?#iefix') format('embedded-opentype'),
url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.woff2') format('woff2'),
url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.woff') format('woff'),
url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.ttf') format('truetype'),
url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.svg#yekan') format('svg');
font-weight: normal;
font-style: normal;
}
p {
font-family: yekan; /*nothing appear*/
}
Upvotes: 0
Views: 159
Reputation: 1497
Font from origin 'http://yekandroidi.persiangig.com' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
Either enable CORS on the server, or use a different URL for accessing the font
Upvotes: 1