0

Custom Font Imported as a static resource doesn't show up on Community. We have selected Custom Font under Themes in community builder. When I do preview custom font is not shown. We have followed all steps in the link mentioned below https://developer.salesforce.com/docs/atlas.en-us.communities_dev.meta/communities_dev/communities_dev_customize_font.htm The CSS is as follows

@font-face {
font-family: 'TomTomFonts';
src: url('/enterprise/s/sfsites/c/resource/TomTomFonts/Gotham font/Gotham-Bold.otf') format('otf');
}
5
  • 1
    try to re-upload static resource but without space in folder name Gotham font Commented Apr 18, 2019 at 12:20
  • i have tried to import static resource without space in folder name but doesnt work. i also tried creating a stylesheet.css file and added it to header markup in advanced settings of community. but nothing works at all. i tried changing resource path for font as well but no luck
    – ABHIJIT
    Commented Apr 22, 2019 at 10:48
  • @sfdcfox do u have any suggestions that i can try to implement?
    – ABHIJIT
    Commented Apr 23, 2019 at 4:02
  • @ABHIJIT Unfortunately, no. The documentation looks pretty straight forward, but I simply don't know enough off the top of my head to diagnose a problem like this. Have you checked the Developer Console in the browser (F12) to see if you get any network errors? I would guess that the URL may be incorrect or the file format is not supported, or that additional configuration is necessary.
    – sfdcfox
    Commented Apr 23, 2019 at 7:28
  • @sfdcfox I dont see any errors in console. I can see that font is getting overwritten in console logs. in console log there is a whitelisted array of fonts with different font types as elements of that array.In static resource for fonts we have only otf file and format of font is OTF. do we need any other format to make it work. can it be an issue with otf format?
    – ABHIJIT
    Commented Apr 24, 2019 at 4:58

1 Answer 1

2

Issue is resolved after using font format file of type woff. Looks like salesforce.com doesnt support otf font format

1
  • This worked for me after trying to reference a .ttf file half a dozen different ways. Converted the .ttf => .woff and presto. No mention in the docs abt font file type compat. Thanks Salesforce. Commented Nov 15, 2019 at 1:13

You must log in to answer this question.

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