I am trying to use custom fonts in plotly python. How does plotly recognize what fonts are available in the system? Can anyone direct me to the relevant functions/modules?
hi @il_kievic welcome to the Dash Plotly community.
You can find more information here:
They seem to be:
“Arial”, “Balto”, “Courier New”, “Droid Sans”, “Droid Serif”, “Droid Sans Mono”, “Gravitas One”, “Old Standard TT”, “Open Sans”, “Overpass”, “PT Sans Narrow”, “Raleway”, “Times New Roman”.
@nicolaskruchten is this correct, or is the font list only referring to the Chart Studio Cloud?
Thanks for your reply! Unfortunately I don’t think this is what I need. My understanding is that plotly is able to render the locally installed fonts that are outside of these html font family. However, I don’t know how it is able to access this information. Is it reading into the system font path and then construct a list of “usable fonts”?
It’s easy enough to get Dash using custom fonts by placing the .tff file in /assets
and registering the font in css.
However, I have so far been unable to figure out how to get regular Plotly charts using custom fonts.
So I attempt to provide multiple font families 'Abel, Open Sans'
but it fails on abel and renders some times new roman looking font instead of open sans