Google Fonts

Google Fonts

Steven Nash གིས-
Number of replies: 4

Hi,

I am so sorry if I've posted this in the wrong forum. Is it possible to change the Boost Theme to use a font from google fonts? I've searched and searched but it appears that the only way to do this would be by downloading and hosting the fonts locally. Is this a deliberate design decision? Or am I missing the obvious?

དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to Steven Nash

Re: Google Fonts

Gareth J Barnard གིས-
Core developers གི་པར Particularly helpful Moodlers གི་པར Plugin developers གི་པར
Dear Steven,

Google fonts can be added to a theme as have already been done in some contributed themes. It's just a matter of writing the appropriate code.... Actually I did do a search and there's not many results, but I did write https://www.elearningworld.org/a-little-boost/ last year and I think it would be possible to replace the local 'url' in the 'src' attribute of '@font-face' in the raw SCSS setting to point to the Google font URL instead and get the same result.

Kind regards,

Gareth
In reply to Gareth J Barnard

Re: Google Fonts

Gareth J Barnard གིས-
Core developers གི་པར Particularly helpful Moodlers གི་པར Plugin developers གི་པར

Though, looking into this, perhaps that won't work but instead something to do with the 'additionalhtmlhead' and 'scss' settings with:

Attachment Screenshot 2025-02-20 113918.png
In reply to Gareth J Barnard

Re: Google Fonts

Steven Nash གིས-
Thanks for looking into this, it's much appreciated དགའ་འཛུམ་

In the end I found the template and added the appropriate references in there. I'd have preferred not to change the template but it's not thr biggest problem.
In reply to Steven Nash

Re: Google Fonts

Gareth J Barnard གིས-
Core developers གི་པར Particularly helpful Moodlers གི་པར Plugin developers གི་པར
No problem. I will add from my understanding that Google Fonts is not by nature GDPR compliant due to needing user consent prior to data being gathered - search on "google fonts gdpr" - therefore any solution that requires this will need additional consent code as a wrapper or you'll have to go down the locally hosted route.