ggeasy
ggeasy copied to clipboard
Set custom fonts for layer or all text elements
Is the title sufficient? :)
Cheers. Do you have an example of the "hard way"?
element_text(family = ?
theme(text = element_text(family = "candara", size =24))
You would need to assume user is attaching {showtext} or {extra} to load fonts onto the machine and session
Thanks @yonicd . I wonder whether there's an opportunity here to tap into Google Fonts, e.g. maybe with showtext if that looks appropriate.
Keeping in mind that {ggeasy} is about shortcuts - we can support easy ways to achieve what was already possible, but I'm reluctant to add functionality not already available.
I'm fine with a message to remind the user to install or attach other packages, but we can only work with what is possible the "hard way".
Supporting any of these would be an out-of-the-box solution: https://stackoverflow.com/a/61775520/4168169
Fair point. Maybe then just an example that show how e.g. easy_text_font() can complement an existing webfont method?
there is also this way to set things globally, which I use more often than not:
theme_set(theme_gray(base_size = 20, base_family = 'Font Name' ))