Answer the question
In order to leave comments, you need to log in
Why does font-face refuse to download a font from another site?
I download fonts from a third-party site using font-face:
@font-face {
font-family: Regular;
src: url(http://site.ru/path/fontname.ttf) format('truetype');
}
Answer the question
In order to leave comments, you need to log in
I missed this message in the console:
"A request from an outside source was blocked. Reason: CORS header 'Access-Control-Allow-Origin' is missing." It was solved by adding the following rule to the .htaccess of the site where the font comes from:
Header set Access-Control-Allow-Origin 'http:site2.ru'
Try brackets.
src: url(" https://mdn.mozillademos.org/files/2468/VeraSeBd.ttf ");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question