I have a CSS file in the Static Resources and in that I have styles for specific fonts. These fonts are also in the Static Resources.
If I paste the URL for the font files (ie. font.ttf) into the browser, I get a prompt to download the file. But when I browse to the page containing the CSS and reference to the font files. I get a 404 for the fonts???
Best Answer
You don't provide a lot of detail so its not clear, but it is possible the problem you are seeing is identical to or similar to this...
Font references in CSS such as Bootstrap are usually relative like this:
The simplest way to require no changes when using such CSS in Salesforce (and get the fonts to work) is to have one static resource ZIP containing both the CSS and the fonts with this internal folder structure:
The CSS can then be referenced in your page using e.g.:
which is delivered to the browser as e.g.:
so that the relative reference to the font resolves to the valid URL of:
If the CSS and fonts are in separate static resources, then at best you will have to modify the CSS to use the font static resource name, and at worst you might even end up including the resource version timestamp.