How to Add Fonts to the Shopify Admin

I need to add custom fonts to the Shopify panel.

enter image description here

I added the code in base.css, but they didn’t show up in the panel. How can i do this?

@font-face {
  font-family: "Lexend", sans-serif;
  src: url('{{ "Lexend-Light.woff2" | asset_url }}') format("woff2"),
    url('{{ "Lexend-Light.woff" | asset_url }}') format("woff"),
    url('{{ "Lexend-Light.ttf" | asset_url }}') format("truetype");
}

@font-face {
  font-family: "Lexend", sans-serif;
  src: url('{{ "Lexend-SemiBold.woff2" | asset_url }}') format("woff2"),
    url('{{ "Lexend-SemiBold.woff" | asset_url }}') format("woff"),
    url('{{ "Lexend-SemiBold.ttf" | asset_url }}') format("truetype");
}

>Solution :

You can’t actually add fonts there, those are coming from shopify’s cdn. You can however find fonts on google fonts or buy a paid font. If you buy a paid one you need to upload the fonts under the assets folder and then you have to import them into the stylesheet much like you already did.

Leave a Reply