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

Does font_add_google() needs to be called everytime? #68

Open
cortinah opened this issue Jan 14, 2024 · 1 comment
Open

Does font_add_google() needs to be called everytime? #68

cortinah opened this issue Jan 14, 2024 · 1 comment

Comments

@cortinah
Copy link

Hello, thanks for the package. The docs are not very clear on whether I need to execute, for example, font_add_google("Roboto","roboto") every time I use the font, or only the first time.
Can it be setup so that the font is permanently installed? thank you

@salim-b
Copy link

salim-b commented Jul 8, 2024

Once per R session. "Adding" fonts this way is cached in a package environment (sysfonts:::.pkg.env):

sysfonts:::.pkg.env$.font.list |> names()
#> [1] "sans"  "serif" "mono"
    
    sysfonts::font_add_google(name = "Alegreya Sans")
    
    sysfonts:::.pkg.env$.font.list |> names()
#> [1] "sans"          "serif"         "mono"          "Alegreya Sans"

Created on 2024-07-08 with reprex v2.1.0

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

No branches or pull requests

2 participants