jamesfeigenbaum / jjfPkg

Personal R Package
4 stars 0 forks source link

Custom font #2

Closed jamesfeigenbaum closed 6 years ago

jamesfeigenbaum commented 7 years ago

The theme_jjf function requires (of course) ggplot2 but also extrafont to be loaded first.

jamesfeigenbaum commented 7 years ago

Would be nice to do the extrafont part in the package. How does that work/

jamesfeigenbaum commented 7 years ago

Also, might be nice to have 3 options inside the function:

jamesfeigenbaum commented 7 years ago

Options added.

jamesfeigenbaum commented 7 years ago

To use one of the custom fonts in the geom_text function (to plot text labels rather than dots in a scatter plot, for example) need to do:

geom_text(family = "Roboto Condensed")
jamesfeigenbaum commented 7 years ago

Is there a way to push the font family all the way through to geom_text?

jamesfeigenbaum commented 6 years ago

Trying to figure out how to leverage hrbrthemes which uses roboto condensed to get this stupid thing to work...

jamesfeigenbaum commented 6 years ago

Okay, no longer needed to load extrafont. Borrowed some nice code from hrbrthemes to do it in zzz.R