Re: changing custom font

Solved

How do I fix my custom font not working in theme settings?

learningdesign
Shopify Partner
202 1 22

i have added  my font as an asset

then i upload this code  in theme.liquid

<style>
@font-face {
font-family: "FredokaOne-Regular";
src: url("{{ 'FredokaOne-Regular.woff2' | asset_url }}");
src: local("FredokaOne-Regular.woff2"),
local("FredokaOne-Regular.woff2"),
url("{{ 'FredokaOne-Regular.woff2' | asset_url }}?#iefix") format("embedded-opentype"),
url("{{ 'FredokaOne-Regular.woff2' | asset_url }}") format("woff2"),
url("{{ 'FredokaOne-Regular.woff2' | asset_url }}") format("woff"),
url("{{ 'FredokaOne-Regular.woff2' | asset_url }}") format("truetype");
font-weight: 500;
font-style: italic;
}
</style>

then i am adding this code in  headings  css in customiser to change headings but its not working where i am doing wrong

body {
font-family: "FredokaOne-Regular", sans-serif;
}


Capture.PNGCapture1212.PNG

Accepted Solution (1)

learningdesign
Shopify Partner
202 1 22

This is an accepted solution.

my mistake was in place  of body i need  h1

h1 {
font-family: "FredokaOne-Regular", sans-serif;
}

View solution in original post

Reply 1 (1)

learningdesign
Shopify Partner
202 1 22

This is an accepted solution.

my mistake was in place  of body i need  h1

h1 {
font-family: "FredokaOne-Regular", sans-serif;
}