Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set custom fonts for layer or all text elements #55

Open
geotheory opened this issue Aug 13, 2020 · 6 comments
Open

Set custom fonts for layer or all text elements #55

geotheory opened this issue Aug 13, 2020 · 6 comments

Comments

@geotheory
Copy link

Is the title sufficient? :)

@jonocarroll
Copy link
Owner

Cheers. Do you have an example of the "hard way"?

element_text(family = ?

@yonicd
Copy link
Collaborator

yonicd commented Aug 13, 2020

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

@geotheory
Copy link
Author

Thanks @yonicd . I wonder whether there's an opportunity here to tap into Google Fonts, e.g. maybe with showtext if that looks appropriate.

@jonocarroll
Copy link
Owner

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

@geotheory
Copy link
Author

Fair point. Maybe then just an example that show how e.g. easy_text_font() can complement an existing webfont method?

@yonicd
Copy link
Collaborator

yonicd commented Aug 13, 2020

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' ))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants