Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

Solved

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

dev_m
Shopify Partner
2 0 0

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: 

dev_m_0-1708112488886.pngdev_m_1-1708112528325.png

Please help!!

 

Regards

Dev

Accepted Solution (1)

SomeUsernameHe
Shopify Partner
519 58 113

This is an accepted solution.

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. 

Have I helped? Consider putting coffee in my mouth!
Buy Me a Coffee

View solution in original post

Replies 3 (3)

SomeUsernameHe
Shopify Partner
519 58 113

This is an accepted solution.

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. 

Have I helped? Consider putting coffee in my mouth!
Buy Me a Coffee
SomeUsernameHe
Shopify Partner
519 58 113

Sorry, I missed that the first time.

Have I helped? Consider putting coffee in my mouth!
Buy Me a Coffee
dev_m
Shopify Partner
2 0 0

Hi, Thank you for the response. 

 

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

dev_m_0-1708135331643.png

Thanks