I'm currently working on a project where I have to include a custom font in a Dash App. I've received the .otf file, but I have no idea how I can use it. After searching quiet a while I hope you guys can help me.
import dash
import dash_html_components as html
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, prevent_initial_callbacks=True, external_stylesheets=external_stylesheets)
app.layout = html.Div([
html.P('Hello world'),
])
if __name__ == "__main__":
app.run_server(debug=True,port=8050)
The .otf file is places in the folder '/assets/fonts'. I've seen some posts about this subject where I should create a .css file and add it to external_stylesheets, but I'm not sure how to do that and even if it will work.
Anyway, thanks in advance!
