Re: Dawn 2.0 Theme | Adding Custom font and giving option to select it from customizer

Dawn 2.0 Theme | Adding Custom font and giving option to select it from customizer

xGhost
Tourist
13 0 3

I know how to add custom font in Dawn 2.0 Theme but how can i provide option for user to select it from Theme Customizer ?

Following code is present in css file.

h1,
h2,
h3,
h4,
h5,
.h0,
.h1,
.h2,
.h3,
.h4,
.h5 {
font-family: var(--font-heading-family);
font-style: var(--font-heading-style);
font-weight: var(--font-heading-weight);
letter-spacing: 0.06rem;
color: rgb(var(--color-foreground));
line-height: 1.3;
}

As you can see there is some variable --font-heading-family which is somehow linked to customizer

Below is the snap shot of customizer. Also, the fonts shown in customizer are not present in theme files !

 

2021-10-06 21_13_18-Window.jpg

 

 

Replies 6 (6)

JudonBoutique
Tourist
5 1 2

Did you ever figure this out? I'm trying to use a font from Adobe Fonts and haven't been able to figure this out yet. Thanks.

JudonBoutique
Tourist
5 1 2

Never mind I figured it out. Had to locate the appropriate CSS file and update the appropriate selectors.

AriesBAP
Visitor
1 0 2

What was the file that needed to be updated? I am trying to do the same. 

gwoods22
Shopify Partner
3 0 4

Were you able to get the custom font to populate in the Theme Customizer? I've found the font-family variables in theme.liquid but wondering if there's a cleaner way.

 

Thanks!

OVFCreative
Tourist
3 0 4

Can you please share the solutions?