Itβs not currently possible to change the font format in st.code() to mimic the font formatting you would find in e.g. st.markdown.
You may be able to hack it via CSS - by checking the CSS styles applied to the st.markdown component and then apply those styles to the st.code component.
However, this isnβt something Iβve tried, so you would have to experiment
Create a custom css variable and specify the css properties, use st.markdown to put the custom css into the streamlit app, then use st.code inside a st.markdown. Did you try this?