Custom Fonts on Streamlit

Hi @Guilherme_Hungaro
You need to create a style.css file and put in something like this :slight_smile:

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap'); 

html, body, [class*="css"] {
    font-family: 'Roboto', sans-serif; 
    font-size: 18px;
    font-weight: 500;
    color: #091747;
}

In your main.py you need to put this:


with open( "app\style.css" ) as css:
    st.markdown( f'<style>{css.read()}</style>' , unsafe_allow_html= True)
5 Likes