Section 4: setting with id="tan_pearl" default is invalid

Hi,

I am working on a Shopify store where I need to integrate custom font called TAN-PEARL. I’ve uploaded the ‘woff’ file in Content/Files section, Updated the theme.liquid file as well.

Now, I want to add font_picker in the Typography section in theme setting but I am unable to do so. I tried updating setting_schema.json but getting this error – ‘Section 4: setting with id=“tan_pearl” default is invalid’.

Also, I wanted to understand if updating setting_schema.json comes under best practice or not. If not what is the best way to do that?

How I can make sure that Shopify store updates does not affect these settings in future?

Following are code snippets of the changes I did till now:

Please help!!

Regards

Dev

Actually, it looks like two things. Here is how your “@font-face” should look:

@font-face {
  font-family: 'TAN-PEARL';
  src: url('{{ 'tan-pearl.woff' | file_url }}') format('woff');
}

the font-family should not have any spaces and should be identical to what you use in the “default” value in your settings_schema.json and you should be using the | file_url filter since you uploaded the font to your contents and not assets.

1 Like

Sorry, I missed that the first time.

Hi, Thank you for the response.

I changed the configuration as per your recommendation. However the error still persists. Could you please check?

Thanks