curriculum icon indicating copy to clipboard operation
curriculum copied to clipboard

Mention alternative to Google fonts in HTML/CSS module

Open mvkvc opened this issue 2 years ago • 4 comments

When discussing fonts for styling, the only example given is the usage of Google Fonts. While it is popular and should be mentioned, there are privacy concerns as all visitors' IP addresses are transmitted to Google whenever they visit your site. This has been found to be violating the GDPR in this case (english summary here).

I propose a short markdown block with a disclaimer about what is collected and instructions or at least a link to a resource on how to download and load fonts locally. I am willing to submit a PR for this if you agree @BrooklinJazz.

mvkvc avatar Mar 03 '23 00:03 mvkvc

Yucky. I didn't know that. I 100% agree. I would also consider adding some alternatives. I just happen to be most familiar with Google fonts but i am not married to them in any way.

BrooklinJazz avatar Mar 03 '23 00:03 BrooklinJazz

Ok I will draft a PR soon when I have some time and keep it concise. I'm open for anyone else to help out as well.

mvkvc avatar Mar 03 '23 00:03 mvkvc

The best option from my research is downloading the font into your project and using the @font-face CSS rule (link). For the material on tailwind, there is some guidance in the docs (link). I want to mention this here in case someone else has more experience and knows a better solution.

mvkvc avatar Mar 03 '23 00:03 mvkvc

Great, I'm down to completely replace the Google Fonts instruction with downloading and using @font-face.

I'm also fine with simply explaining web-safe fonts and then linking to an external resource for using @font-face.

BrooklinJazz avatar Mar 07 '23 05:03 BrooklinJazz