I’ve been trying to embed a webfont I rented on Fontstand to my project. I do not have the file of the font, only the custom code Fontstand provides me so it is synced to the app.
Is there something wrong with the code? Also, I would like to make this the standard font for headings. Should I style each individual heading or all in once? (I’ve tried both ways)
I don’t know if you’re supposed to see the font rendered inside of the designer (and not only on publish) when you embed it inside of a site using code. It’s easy for Webflow to render fonts that are uploaded, or linked through Google Font or Typekit, but not so evident for imported fonts… I never tried I reckon.
The code you’re showing here is only the CSS code for styling, right? This is not a code that will import or load any font on yoursite.
This is a proper CSS code, except .heading must be defined somewhere, it’s not an HTML element.
If the font is the main font of your site you can affect it to the body or HTML.
body { font-family: "name of the font, Sans-serif";}
And deal with exceptions with other fonts.
You can also do
h1, h2, h3, h4, h5, h6 { font-family: "name of the font, Sans-serif";}
obviously on top of heading having to be defined (heither h something or a class affected to a heading), the part “fontname” must be edited to reflect the font you wan.
why i cant optimize webfont
can any one help
Leverage the font-display CSS feature to ensure text is user-visible while webfonts are loading. Learn more about font-display.FCPLCP