Why isn't my custom font displaying correctly?

Hello,

I have upladed a new asset (font in woff2 format) and I have this code in my base .css:

@font-face {
font-family: “HudsonNY”;
src: url(“Hudson NY.woff2”) format(“woff2”)
src: url(“Hudson NY.woff”) format(“woff”)
}

h1,h2,h3,h4,h5,p,button{ font-family: “Hudson NY”!important; }

I can see that the fonts are slightly changing but it is not the font I uploaded. I tried doing this with another font but it changes to the same generic font. I can’t figure out what is wrong. I have tried many tutorials but the same thing happens.

Hi @KyriakosSB

It should be

url("{{ "Hudson NY.woff2" | asset_url }}")

Hello @KyriakosSB

To provide you with the most precise solution in this case, could you please share… link?

You can also refer to how to upload font and add custom font code:

https://help.gempages.net/articles/upload-custom-font