Mathematical frak with subscript 'x' in ggplot2 label

40 Views Asked by At

I want to have with subscript 'x' (normal R font). It doesn't need to be using the font_add_google function, any solution is appreciated. Thanks! The unicode is U1D505 if this might be helpful.

font_add_google(name = 'UnifrakturMaguntia','fraktur')
showtext_auto()
df <- data.frame()
ggplot(df) + 
  geom_point() + 
  xlim(0, 10) + 
  ylim(0, 100) + 
  ylab(bquote(B[x])) + 
  theme(axis.title.y = element_text(family = "fraktur", size = 20),
        title = element_text(family="sans"))
showtext_auto(FALSE)

I tried what I wrote above.

0

There are 0 best solutions below