Using Google Font Family in CSS

I’m using the latest version of Pro.
I’ve added Raleway to the Fonts panel.

I’m trying to use page level css to alter the H2 to use this new font family.

I specify h2, .h2 {font-family: Raleway;} on the CSS tab for the page.

When I view the page, the font is not Raleway but the first available system font.

Is there a way to use the added fonts in CSS versus picking it from the font selector on the element?

thanks

HI @wbgTHEMECO,

Thank you for writing in, please define the font-family that you want to use on the Font Manager first.

Then on the Text or Headline element, choose the Font Family that you want to use on that specific element.



If the font-family that you defined on the Font Manager was not used on even one of your elements, then your site will not load it, so you can not use it on your custom CSS.

If this is purely a custom CSS, then add this to your Child theme’s style.css file.

@import url('https://fonts.googleapis.com/css?family=Raleway:300,400,700&display=swap');

Then add this on your Page > CSS area.

h2, .h2 {
	font-family: "Raleway", sans-serif !important;
}

Hope it helps,
Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.