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.
Hello, I just found this topic. I tried adding a custom font and hosting the app on Streamlit Community Cloud, but without making the call to googleapi, the text is not displayed with the proper font. Is there any Streamlit Community Cloud documentation about the self hosted fonts so I can check what I may be doing wrong? Thanks!
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.