Set Font Via CSS Variable

HI,

Am I able to give a class to an element and then use that class to set the Font Family of a Font created in the Font Manager?

For example if I added a Font in the font manager and called it “Heading” and assigned it to Lato, then assigned some elements using “Heading” a class of .bright-font, am I able to change the font-family for all elements with the class .bright-font using the “Heading” font?

Thanks,
Darren.

Hey Darren,

Yes. If a font in the Font Manager is used by an element in the page, the font is basically loaded so you can use it. Copy the CSS font setup of the element or use the element’s CSS as a guide for your class.

image

Hi Christian,

I’m not sure if I’ve explained myself properly. I don’t want to use the font in font manager, I want to change the overide the font with a new one for all elements with the same class that use it. So if font manager had assigned the font Lato, I could change it sitewide to Montserat in CSS.

Is this possible?

Hello Darren,

If you have set the font in the Theme Options to “Lato”;

The safest way to change it is to set it to any other font. Using custom CSS may be possible with a possibility of issues that may arise in the future.

Best Regards.

Thanks Ruenel,

I was looking at this the wrong way and not using the real flexibility of Font Manager.

I’m creating templates with different site designs & different fonts that I want to export and still be able to change the fonts via font manager. The solution is not to create 1 set of fonts for all templates (Headings, body, etc.) but to create a new set for each template style. That way I can change out the fonts for each site just after its exported.

Thanks for your continued help and support.
Cheers,
Darren.

Hi Darren,

Glad that we are able to help you.

Thanks

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