Working on rebranding a portal/community/experience login page. The designers, being non-Salesforce folk, have a CSS font-face tag in there that references the font files and I've got them in a static resource now (zipped, no subfolders, resource called fonts

The problem is that I can't seem to use the static resources because they sit on the other side of the auth mechanism, therefore they get redirected to the login page, the HTML gets served back into where it's expecting a font and of course that breaks.

I've tried a couple of approaches so far


which gives a 404 not found



which redirects to the login page and gives OTS parsing error: invalid sfntVersion: 218774561

Is there a way to reference the fonts correctly in a CSS font-face tag prior to site authentication?

If it makes a difference, these are old style pages, using Force.com/Visualforce tech. No Lightning here I'm afraid

  • Is there a reason you couldn’t set visibility to Public on the static resources that you need accessible from the public login. Jun 8, 2022 at 12:53
  • Rob- If you are referencing a Zip file then your relative path must start with fonts/font... like this url(({!URLFOR($Resource.fonts,'fonts/franklingothicurw-boo.woff')}). The relative path must include full hierarchy of sub-folder structure and not just the .woff file only.
    – VarunC
    Jun 8, 2022 at 13:54

1 Answer 1


Ok, seems to be fixed now. The URLFOR approach appears to work, but I ended up with the font resources as a static resource each in their own right, not zipped, and referenced them individually

  • I get fonts from the zipped static resource. However, I faced one potential bug - when I reference some fonts, I'm getting ERR_ABORTED 404. I don't know if this is due to the size of the archive or number of the files. But when I removed some of the files, that I don't use, the issue disappeared. Dec 22, 2022 at 17:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .