How can I change only the body font to a custom font in Dawn?

I uploaded a custom font using this tutorial https://ezfycode.com/blog/add-custom-fonts-to-shopify.

This changed both headings and body font to a custom font but I would only like to change the body font to a custom font.

What should I do?

@Alevtina

Please share store URL!

Thanks!

@Alevtina

Please share front store password.

Thanks!

@Alevtina

add following code your assets/base.css bottom of the file.

body {
  font-family: 'your custom fontname' !important;
}

Any problem let me know.

Thanks!

Tried it and it looks like it doesn’t recognize the font because body font changes to a random font, not the one I uploaded. Any other solutions?

@Alevtina

Please share store password also share font name use for body.

Thanks!

Please send a collaborator request

Hi there,
Jack from OpenThinking here!

You need to edit the code from the tutorial from this

h1,h2,h3,h4,h5,h6,html,body,*,[id] *{
  font-family: "Precious" !important;
}

to this

body {
  font-family: "Precious" !important;
}

this way the font will affect only your body text.

let me know if this works for your. If yes; accept my answer and give me thumbs up! Thank you.

1 Like

Thank you, it worked! :slightly_smiling_face: