Using custom fonts

Hi, I was wondering if I can use a custom font instead of the predefined three in the Edit Theme menu in setting? There I only see three options in the font family menu: sans serif, serif and monospace.

I have some tff font files I downloaded and I would like to use them instead.

I am new to streamlit and not that experienced with css. I would appreciate some examples and references.

I see that it is possible to override using st.markdown as given here . and this guide

But it doesn’t seem to work.

def style():
    css = """
    <link rel="preconnect" href="">
        <link href="" rel="stylesheet"> 
    @font-face {
        font-family: 'My Font';
        font-style: normal;
        src: url(assets/fonts/myfont.tff) format('truetype');;
        font-family: 'Roboto', sans-serif;
        font-family: 'My Font';