mglaman / wasm-drupal

Drupal in WASM
https://wasm-drupal.mglaman.dev/
MIT License
33 stars 6 forks source link

Replace remote Google fonts in installer with embedded fonts #33

Closed gitressa closed 3 months ago

gitressa commented 3 months ago

During install, I see in uBlock Origin that the domain gstatic.com is contacted for Google fonts. Perhaps third-party font Noto Sans can be embedded instead, to respect user privacy?

mglaman commented 3 months ago

Noto is the official Drupal branding font. We can bundle it locally rather than using a third party site.

gitressa commented 3 months ago

I did check drupal.org, and didn't see Noto, but you probably have a point, that external sites may need to use an official branding font.

Bundling the Noto Sans font would work fine, though I am not sure how to via Github (I only ever use the GUI on Github ...) but this web site is great for downloading, and getting the paths generated:

https://gwfh.mranftl.com/fonts/noto-sans

It looks like only these two numerical weights are used in the wasm-drupal.mglaman.dev/styles.css file, where bolder, as I understand it, is a relative value:

mglaman commented 3 months ago

I was looking up the new branding announced at DrupalCon Portland: https://drupal.widencollective.com/portals/gfvztttq/BrandPortal

Thanks for identifying the specific weights, I'll add the files locally to the app

gitressa commented 3 months ago

You're welcome, and thanks for the link to the Brand Portal, I see they even have a Noto Sans font pack. Very nice.

Including these fonts should do it, I would think. I'll try to verify it, when a new version is ready for testing, regarding fonts.

mglaman commented 3 months ago

Once https://github.com/mglaman/wasm-drupal/actions/runs/9810831878 is done, it should be fixed

gitressa commented 3 months ago

Perfect, I am getting Noto Sans, directly from the page, thanks!