X3 Photo Gallery Support Forums

User avatar
X3 Wizard
Topic Author
Posts: 13481
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 ""), you will find something like this:

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

4. Go to your panel Settings > Style > Font and see which font(s) you are using:
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, 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").

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

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

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.

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

Working example:
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 !
I am completely lost to find the reason why?

EDIT: Found the reason, it was neccessary to clean Page Cache over tools menu.