Web Weather > Weather Web Site Help

EU strikes again: Google Fonts

(1/1)

Cutty Sark Sailor:
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: ---<link href='https://fonts.googleapis.com/css?family=Sofia' rel='stylesheet'>
--- End code ---
NO! NO!
Load 'em yourself into a site directory,
then in CSS,for example:

--- Code: ---@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;
}
--- End code ---
Page CSS:
--- Code: ---body, span, whatever {
    font-family: 'Montserrat', arial, sans-serif;
~~~~~~~~~~~~~~~~}
--- End code ---
Another addition to already annoying 'cookie', privacy, other 'mandatory' popups, alerts, warnings supposedly required by the damn internet Gods

WeatherHost:
Why would any site use remote hosted fonts?

Cutty Sark Sailor:
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....

Mapantz:
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: ---<FilesMatch "\.(ttf|otf|eot|woff|woff2)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
  </IfModule>
</FilesMatch>
--- End code ---

Navigation

[0] Message Index

Go to full version