Plotly/ggplotly Custom font family does not work

Hi,

I want to use a custom font on a plot. When I used it with ggplot, it works. But it doesn't work with ggplotly. If I choose different font in the system, plot fonts changes. How can I define my custom font to plotly?

My custom font: "Formula1 Display-Regular"

ggplot version: It works

ggplotly version: It doesn't work

ggplotly(
tooltip = c("points", "driver.name" , "round"),
plot) %>%
hide_legend() %>%
config(displayModeBar = F) %>%
layout(xaxis = list(fixedrange = TRUE), yaxis = list(fixedrange = TRUE),
font = list(family = "Formula1 Display-Regular"))

ggplotly version but random font: It works

ggplotly(
tooltip = c("points", "driver.name" , "round"),
plot) %>%
hide_legend() %>%
config(displayModeBar = F) %>%
layout(xaxis = list(fixedrange = TRUE), yaxis = list(fixedrange = TRUE),
font = list(family = "Parchment"))

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.