Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 13587
Joined: 30 Sep 2006, 03:37

X3 self-hosted Google fonts

27 Jul 2022, 04:13

There has been reports (see topic) about legal challenges when loading Google fonts from websites in Germany. Below is a HOTFIX that allows you to host the Google fonts on your own server, effectively avoiding any legal concerns.

* This fix is specifically for X3.31.1. In next release, I will include an easier solution.

1. Open the file app/templates/bb/f8/4e8334aa77fc3e030e582b6b9bca6aa66114b7201078c756af50f9885fea.php in any text editor.

2. Go to line 278 (or search "fonts.googleapis.com"), you will find something like this:
Image

3. Remove all the code between the {brackets}. It should look like this:
Image

4. Go to your panel Settings > Style > Font and see which font(s) you are using:
Image
It's easiest if you have only one font, but often you will have two fonts. In the example above, there are two fonts "PT Sans" and "PT Sans Narrow".

5. Go to https://google-webfonts-helper.herokuapp.com/fonts/, search for the font you are using. Click the font, and select the font-weight styles your font requires (when weight is unspecified, it means 400 "normal").
Image

6. Scroll down to "Copy CSS", click "modern browsers", scroll down to "Customize folder prefix" and change it from "../fonts/" to "/fonts/"
Image

7. Copy the provided font-CSS into X3 Settings > Custom > Custom CSS.
Image

8. Back on google-webfonts-helper website, click to download the fonts in ZIP format. Unzip the font files, and upload into new directory /fonts/ inside your own X3 dir.
Image

* If you are using TWO fonts, which is highly likely, you will need to repeat 5-8.

Working example:
https://lightshades.de/
 
Ch3ck3rM0n
Posts: 3
Joined: 19 Aug 2022, 07:56

Re: X3 self-hosted Google fonts

19 Aug 2022, 11:28

I did it two times like discribed, but my page is still loading fonts from Google to my website https://manuelfocus.de !
I am completely lost to find the reason why?


EDIT: Found the reason, it was neccessary to clean Page Cache over tools menu.
 
marco-urban
Posts: 9
Joined: 07 Jul 2008, 15:42

Re: X3 self-hosted Google fonts

21 Oct 2022, 09:51

Works fine, thank you!
 
yellowbee
Posts: 9
Joined: 09 Nov 2019, 01:45

Re: X3 self-hosted Google fonts

28 Oct 2022, 23:25

Many thanks! I also received this kind of letter recently. This solution helps! 
 
Falcon
Posts: 6
Joined: 14 Jan 2022, 10:19

Re: X3 self-hosted Google fonts

03 Nov 2022, 13:05

Thank you very much! This workaround/hotfix is very helpful here in Germany concerning the new legal challenge regarding the Google fonts. It works fine. Again, thank you!  :thumbsup: 
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 13587
Joined: 30 Sep 2006, 03:37

Re: X3 self-hosted Google fonts

04 Nov 2022, 00:27

I'll create a built-in option for this in next release. I'm just working through another task right now before I can start this update.
 
Falcon
Posts: 6
Joined: 14 Jan 2022, 10:19

Re: X3 self-hosted Google fonts / Font Awesome?

05 Nov 2022, 14:55

May there is a similar hotfix for "Font Awesome" too? (same legal challenge) - again, thank you very much! (hotfix for Google fonts is working fine)
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 13587
Joined: 30 Sep 2006, 03:37

Re: X3 self-hosted Google fonts / Font Awesome?

06 Nov 2022, 01:46

Falcon wrote:May there is a similar hotfix for "Font Awesome" too?
Font awesome is part of the X3 plugins, and can therefore be served locally by disabling Settings > Advanced > "Use CDN".
Falcon wrote:(same legal challenge)
Is it though? One of the factors of the single ruling against Google fonts in Germany, is that loading a font is not strictly required for the website to function. Loading icons is, because without them, buttons and navigation looses it's meaning ... The website can't function properly without loading icons. A small difference, but legally, a big difference. The CDN version is hosted at JSDelivr, and they wrote about this:
https://www.jsdelivr.com/blog/how-the-g ... fe-to-use/
 
Falcon
Posts: 6
Joined: 14 Jan 2022, 10:19

Re: X3 self-hosted Google fonts

06 Nov 2022, 10:54

Thanks for your fast reply!
You're right, of course (the site can't function properly without loading essential icons…).
However, the key point in German law seems that if you are using CDN (meaning i.e. the transmission of IP by a company outside the EU using an online service) you have to inform the visitor of your website and obtain consent (omg! :disappointed:). In this case (for the necessary icons from Fonts Awesome) it’s really crazy at all, meaning you have to obtain consent from the visitor before entering the website.
So, to minimize the ‘risk’ and to be safe, I have added in my privacy policies the corresponding information of using Google fonts and Font Awesome on the website as recommended (in my case local installation, so no connection to servers of Google or Fonticons, Inc.).
Furthermore, I have disabled the use of CDN (although all the drawbacks) to avoid the obtaining of consent in this case (seemingly necessary because of the German law).
This topic is really tough stuff and really crazy at all (EU/German legally).
Hope there will be a clear legal interpretation in near future concerning this issue… (just dreaming…).
Again, thank you very much.  :slight_smile:
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 13587
Joined: 30 Sep 2006, 03:37

Re: X3 self-hosted Google fonts

06 Nov 2022, 11:09

Falcon wrote:However, the key point in German law seems that if you are using CDN (meaning i.e. the transmission of IP by a company outside the EU using an online service) you have to inform the visitor of your website and obtain consent
Are you sure this isn't some website's interpretation? I haven't seen this before in any legal text. If you load a website outside of EU, you are transmitting your IP to the server outside EU, but this itself doesn't require any consent.
 
ed_f
Experienced
Posts: 55
Joined: 20 Dec 2020, 11:24

Re: X3 self-hosted Google fonts

15 Nov 2022, 11:18

If you load a website outside of EU, you are transmitting your IP to the server outside EU, but this itself doesn't require any consent.
It doesn't require consent, but these poor lawyers or their machines are suing us for exactly that and ask money from thousands meanwhile.

is your hotfix from #1 still the way we must go today? and when your next release including an easier solution is to be expected?
 
ed_f
Experienced
Posts: 55
Joined: 20 Dec 2020, 11:24

Re: X3 self-hosted Google fonts

19 Nov 2022, 10:04

ok, it works. if necessary, as in my case, the style "regular" has to be toggled off on the google site.
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 13587
Joined: 30 Sep 2006, 03:37

Re: X3 self-hosted Google fonts

20 Nov 2022, 00:19

ed_f wrote:It doesn't require consent, but these poor lawyers or their machines are suing us for exactly that and ask money from thousands meanwhile.
Not when you load a website that uses absolutely no cookies, no external files and stores nothing. My point was, the client is always sending it's IP to the visited website. That's how the internet works. Anyway, this is off-topic.
ed_f wrote:is your hotfix from #1 still the way we must go today? and when your next release including an easier solution is to be expected?
Right now yes. Next version will include an easier solution yes, in a couple of months.