Atlas issue: Google Font GDPR compliancy.

I got an issue fixing a GDPR concern due to the following articles: (dutch reading): (english reading): When you use a google font in your Atlas theme, your browser will make a call to a google font server to load a css and  fonts, on which google can track you with your IP and the mendix site used (as referrer). According to GDPR, user should consent “tracking” before the external font is loaded. A solution to this is to host the google-fonts by yourself. will help you download a css-snippet and a font zip. I’ve created a googlefonts.css and unzipped the fonts in the themesource/{thememodule}/public/fonts folder. Now adding an import in your custom.scss will not work properly import “fonts/googlefonts.css”(actual path for the webserver) will give an error in the modeler. Changing it to “../../themesource/{thememodule}/public/fonts/googlefonts.css” will fix it in the modeler, but within the browser i got network issues not being able to load the css/font files. Changing it to an actual URL “” will work but is not really proper programming.    Can anyone help me how to be able to load a css file in runtime instead of the css files being compiled or is experienced with this or has best practices how to host those external files in your app?
1 answers

Hi Benjamin,

Your first approach is the right one and you should investigate further why it isn't working. You can overwrite the import that Atlas is doing in custom-variables.scss, then place the resources in the /public/fonts/ folder in the themesource.

// Font Family Import (Used for google font plugin in theme creater)
$font-family-import: "fonts/googlefonts.css";

If you are having issues, can you please attach the error that you are receiving using this method?