1

Added a custom font as follows

  1. Uploaded web-font files and given them the 777 permission

    http://example.com/wp-content/themes/mytheme/css/fonts/

  2. Added rules to the css file

    @font-face { font-family: 'museo_sans700'; src: url('http://example.com/wp-content/themes/mytheme/css/fonts/museosans_700-webfont.eot'); src: url('http://example.com/wp-content/themes/mytheme/css/fonts/museosans_700-webfont.eot?#iefix') format('embedded-opentype'), url('http://example.com/wp-content/themes/mytheme/css/fonts/museosans_700-webfont.woff') format('woff'), url('http://example.com/wp-content/themes/mytheme/css/fonts/museosans_700-webfont.ttf') format('truetype'), url('http://example.com/wp-content/themes/mytheme/css/fonts/museosans_700-webfont.svg#museo_sans700') format('svg'); font-weight: normal; font-style: normal; }

However, while using/accessing the font family, it gives a 404 error

Attached snap enter image description here

Any clue?? Why this is happening??

  • Who owns the files? root or the user whose directory the files live in? – Howard E Apr 29 '16 at 16:04
2

Please use short path file url rather then absolute path.

So code is like:

@font-face{ /* for IE */
font-family:FontFamily;
src:url(Font.eot);
}
@font-face { /* for non-IE */
font-family:FontFamily;
src:url(http://) format("No-IE-404"),url(Font.ttf) format("truetype");
}

Make sure that readable web has released it’s first @font-face related software utility for creating natively compressed EOT files quickly and easily.

If this is not your solution then you need to check https://stackoverflow.com/questions/4015816/why-is-font-face-throwing-a-404-error-on-woff-files.

0

404 stands for file are not available at the URL you are trying to access it. check your file path and files in your given directory.

also check permissions: permission for file:644 directory: 755

  • All files are in correct places, check this link tinyurl.com/phsgbxt I have changed the permissions as well, but no guess – echoashu Jun 1 '15 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.