Author Topic: EU strikes again: Google Fonts  (Read 1246 times)

0 Members and 1 Guest are viewing this topic.

Offline Cutty Sark Sailor

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3393
    • Frankfort Weather - TwinHollies WeatherCenter
EU strikes again: Google Fonts
« on: November 21, 2022, 08:37:30 AM »
In case you missed it, and really give a hang:
German courts have ruled that using Google Fonts violates the EU General Data Protection Regulation, because the IP address of your computer is shared with Google when the fonts load.
So to be in compliance we'd have to have another dang banner asking the user to 'agree' before the page loads.

Solution: Don't call the fonts from Google. 
as in:
Code: [Select]
<link href='https://fonts.googleapis.com/css?family=Sofia' rel='stylesheet'>NO! NO!
Load 'em yourself into a site directory,
then in CSS,for example:
Code: [Select]
@font-face {
  font-family: 'Montserrat-Italic-VariableFont_wght';
  src: url('fonts/Montserrat-Italic-VariableFont_wght.ttf') format('truetype'), url('fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
  font-display:auto;
}
Page CSS:
Code: [Select]
body, span, whatever {
    font-family: 'Montserrat', arial, sans-serif;
~~~~~~~~~~~~~~~~}
Another addition to already annoying 'cookie', privacy, other 'mandatory' popups, alerts, warnings supposedly required by the damn internet Gods
 


Offline WeatherHost

  • Forecaster
  • *****
  • Posts: 3649
Re: EU strikes again: Google Fonts
« Reply #1 on: November 22, 2022, 08:05:22 AM »
Why would any site use remote hosted fonts?


Offline Cutty Sark Sailor

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3393
    • Frankfort Weather - TwinHollies WeatherCenter
Re: EU strikes again: Google Fonts
« Reply #2 on: November 22, 2022, 11:25:39 AM »
I 'spect lotsa reasons... all valid, and reasonable, perhaps. Mine was laziness, lack of 'how to', convenience, no licensing fees, etc...didn't realize it was in a template???
...why does ICDSoft call 'open sans' from 'gstatic.com' for example, I wonder....
« Last Edit: November 22, 2022, 11:27:46 AM by Cutty Sark Sailor »
 


Offline Mapantz

  • Forecaster
  • *****
  • Posts: 756
    • Wareham Weather
Re: EU strikes again: Google Fonts
« Reply #3 on: January 02, 2023, 11:07:29 AM »
Another tip;

If you are loading fonts locally, then you could suffer the cross domain name fonts issue.

Basically, if you tend to use https://blah.co.uk/ for your website and you use a direct url to your fonts, then any redirects that go to http://www.blah.co.uk/ will cause fonts to not load.

If you use APACHE, you can add this to your .htaccess file to fix it.

Code: [Select]
<FilesMatch "\.(ttf|otf|eot|woff|woff2)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
  </IfModule>
</FilesMatch>