How to change font globally

How can I change font globally, for example to use Roboto everywhere?


Hi @kannaiah -

font is one of the arguments as part of Themes:


Thank you for the reply.
I have tried it but I see the following,

2022-04-04 00:43:10.766 “Roboto” is an invalid value for theme.font. Allowed values include [‘sans serif’, ‘serif’, ‘monospace’]. Setting theme.font to “sans serif”.

Used following code to get Roboto
Changing font in theme did not work for me

streamlit_style = """
			@import url('');

			html, body, [class*="css"]  {
			font-family: 'Roboto', sans-serif;
st.markdown(streamlit_style, unsafe_allow_html=True)
1 Like

My mistake, you are correct (as the code told you). The proper solution for arbitrary fonts right now is the code you demonstrate above :partying_face: