What I am trying to do is get rid of my page getting notified as a page that uses Google fonts. Here is the website where the check can be performed. I have not used any font settings in my page at all, but apparently my page gets flagged, therefore I am now looking into those CSS files. For clarity, my page does not use such a style.css file yet, I am just investigating it to get rid of this issue.
We have the same problem. We use streamlit share to deploy our apps. Unfortunately streamlits css uses the google fonts api to serve fonts, which is not gdpr compliant, without asking the user for consent first.
.
We changed all fonts in the app by uploading a substitute font file to the github repo and switching all google fonts with this font by creating our own css and loading it in the code (using streamlit own css ) but at the start of the app all google fonts api calls are executed nonetheless. Does anybody have an idea how to solve this?
The situation makes it impossible for us (and at least any company based in Europe) to legally use streamlit share. To my understanding this could be easily solved from streamlits side by serving the font files from their servers or implementing a consent banner before the first google fonts api calls are executed.
As you can see in the css snippet I posted above, which I got from our app deployed with streamlit share, atleast the streamlit version running on the streamlit share servers makes googlefonts api calls through the css. I cannot exactly say when these calls occur ( I am by no way an expert), but they are definitely in the css. Here is a longer version of the css (Unfortunately I cannot upload the file itself as this is not allowed on this forum). I highlighted the calls in red.
My guess is that those calls are triggered by something in Streamlit Cloud (and not Streamlit), but since source code and implementation details for that are closed/proprietary , it’s very hard to diagnose/fix from the community.
Not really, Streamlit Cloud is a bit obscure about that. You can try opening a new post here on discuss describing the problem again, and put a link to this thread. In the meantime, the best option is to use a different hosting service imo.
Sorry it took awhile to respond but that’s because we were figuring this out and good news, as of the Cloud release tonight, Google fonts are now self-hosted on Community Cloud! And they’ve always been self-hosted on Streamlit open source.