0

We have a Community that has a custom font set as primary font. This works fine when we access the community via its default force.com URL. However, we also set up a custom domain, and when we access the community via that domain, the font fails to load and everything is in Times New Roman. This seems to be the behavior in multiple browsers.

I see this in the console: "failed to load resource"

We have the domain set up using option 1 (Salesforce serves the domain over HTTPS on Salesforce’s servers using your HTTPS certificate.) here: https://help.salesforce.com/articleView?id=domain_mgmt_domain_config_options.htm and generally speaking it works fine. We get all community content including images when browsing using that domain. It seems the missing font is the only issue.

The font is set up according to the instructions here: https://developer.salesforce.com/docs/atlas.en-us.communities_dev.meta/communities_dev/communities_dev_customize_font.htm

Here's what it looks like in the community's CSS config:

@font-face {
    font-family: 'NotoSans'; 
    src: url('/adoptabeach/s/sfsites/c/resource/NotoSans') 
}

Why isn't the font loading when accessing the site via the custom domain? Help?

Thanks much!

0

Looks like we needed to take the community name out of the URL for the custom domain. But that doesn't work in the builder or when browsing it using the force.com domain. So we ended up putting in both URLs for the font, and that seems to have somehow worked! Guess it tries the 2nd one if the 1st one won't load.

Our CSS now looks like this, and this seems to do the trick:

enter image description here

| improve this answer | |

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.