change google font in a page

3 replies · opened Oct 12, 2023

GgkreddymxOct 12, 2023

I would like to change the default font of canvas on my website.

In a page i changed the default link to following link. but font-family in browser developer console still shows Inter, sans-serif

Default link: <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital@0;1&display=swap" rel="stylesheet">

changed to : <link href="https://fonts.googleapis.com/css?family=DM+Sans|Lato:300,400,400i,700|Poppins:300,400,500,600,700|PT+Serif:400,400i&display=swap" rel="stylesheet" type="text/css" />

SSemicolon WebSTAFFOct 12, 2023

Hello,

Consider checking out the Documentations on Changing Fonts with Canvas: https://docs.semicolonweb.com/docs/getting-started/changing-fonts/ . Once you change the Google Fonts link, use the following CSS code to change the Default used Fonts by Canvas:
[ch_pre type="css"]:root {
--cnvs-body-font: "Inter", sans-serif;
--cnvs-primary-font: "Inter", sans-serif;
--cnvs-secondary-font: "Playfair Display", serif;
}[/ch_pre]

This will work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

GgkreddymxOct 13, 2023

i know this but how can i change it via link (google font) on a page. If i apply it to the root then it will change it on all pages correct?

SSemicolon WebSTAFFOct 13, 2023

Hello,

Changing Google Fonts links will not apply the Font Family on the Page by default. You will need to manually apply the newly used Font Families using CSS. Simply add the above CSS in the Document using Tag and it will work.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard