Allow to self-host google fonts in Replica PRO theme instead calling google fonts API (GDPR issue)

Permalink Browser Info Environment
Dear xanweb support team,

Would it be possible for you to add a feature in your theme to self-host specific Google fonts, or even if you could provide a simple guide on how to configure it? It would be of great help!

Due to the GDPR restrictions and a recent court decision precisely about this point, I am asking. (self-hosting allowed, call the Google Fonts API not allowed).

I found an old post from 2018 where this had been discussed initially, but without a conclusion. The guys had been referring to the individual theme creators.https://archive.concretecms.org/community/forums/themes/gdpr-dsgvo-a...

Many thanks for your help. It is really causing me a headache, and I assume there are others with the same situation and problem.

Kind regards,
Christian

Type: Discussion
Status: Resolved
Christian_Ka
View Replies:
Xanweb replied on at Permalink Reply
Xanweb
Dear Christian,

Here is a way to achieve the usage of a local font.

- Create a CSS file under replica pro package ( e.g. packages/xw_replica_pro/css/new_font.css)
- Move your font file at the same location of the CSS file ( e.g. packages/xw_replica_pro/css/new_font.woff2 )
- Edit the CSS file and insert the following snippet (Make sure to change the font family, and the format to match your own font).

The snippet:
@font-face {
    font-family: 'New Font';
    src: url('new_font.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}


- Now navigate to the Replica Pro Option > Additional Fonts, and add a new font.
- The Display Name and the CSS section will be filled like before, just for the link you have to put the URL of the created CSS file, following the examples above, the link should be filled like this:https://replica-pro.xanium.io/packages/xw_replica_pro/css/new_font.c... , don't forget to change "https://replica-pro.xanium.io" with you own website.
- Now you good to try the font.


Kind Regards,
Xanweb Support Team
Christian_Ka replied on at Permalink Reply
Christian_Ka
Dear Xanweb Support team,

this did the trick - many thanks! Working as it should.
This might be helpful for some others as well, I assume.

Kind regards,
Christian
dosas replied on at Permalink Reply 1 Attachment
dosas
Hallo,

habe leider das Problem, dass ich nicht alle Fonts lokal einbinden konnte oder ich es zumindest nicht 100%ig beweisen kann.

Ich habe alle genutzen Fonts wie in der Anleitung beschrieben eingebunden (werden auch angezeigt und umgesetzt). Allerdings finde ich keine Möglichkeit den Standardfont Roboto für die Textformatierung "normal" zu ändern.

Wenn ich mir den Quelltext der Seite ansehe, taucht ein verweiß zu gstatic.com auf (siehe Bild). Wie kann ich sicherstellen, dass kein Zugriff auf externe Googleseiten erfolgt?

mfg
Thomas

concrete5 Environment Information

# Concrete Version
Core Version - 9.1.1
Version Installed - 9.1.1
Database Version - 20220516191423

# Database Information
Version: 10.5.16-MariaDB-1:10.5.16+maria~focal-log
SQL Mode: NO_ENGINE_SUBSTITUTION

# Concrete Packages
Active Cookie Consent (2.1), Afixia: Automatic WebP Image Conversion (2.0.1), Empty Anchor (1.0.0), Honest Websites Back To Top (1.1.0), Light Slider (2.0), Pages Carousel (2.0.2), Replica Pro Theme (2.5.4), Timeline (2.0)

# Concrete Overrides
None

# Concrete Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
fpm-fcgi

# PHP Version
8.1.7

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, mongodb, mysqli, mysqlnd, OAuth, odbc, openssl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, raphf, Reflection, session, shmop, SimpleXML, soap, sodium, SourceGuardian, SPL, sqlite3, standard, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 3000
memory_limit - 512M
post_max_size - 200M
upload_max_filesize - 200M
zend.exception_string_param_max_len - 15
ldap.max_links - Unlimited
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
raphf.persistent_handle.limit - -1
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
unserialize_max_depth - 4096
opcache.jit_bisect_limit - 0
opcache.jit_max_exit_counters - 8192
opcache.jit_max_loop_unrolls - 8
opcache.jit_max_polymorphic_calls - 2
opcache.jit_max_recursive_calls - 2
opcache.jit_max_recursive_returns - 2
opcache.jit_max_root_traces - 1024
opcache.jit_max_side_traces - 128
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.