Google Fonts

Google Fonts

بواسطة - Steven Nash
عدد الردود: 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?

متوسط التقييمات: -
رداً على 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
رداً على 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:

المرفق Screenshot 2025-02-20 113918.png
رداً على 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.
رداً على 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.