web-fonts | R Documentation |
In order to use a font in R it must first be made available locally. These functions facilitate the download and registration of fonts from online repositories.
get_from_google_fonts(family, dir = "~/fonts", woff2 = FALSE)
get_from_font_squirrel(family, dir = "~/fonts")
family |
The font family to download (case insensitive) |
dir |
Where to download the font to. The default places it in your user
local font folder so that the font will be available automatically in new R
sessions. Set to |
woff2 |
Should the font be downloaded in the woff2 format (smaller and more optimized)? Defaults to FALSE as the format is not supported on all systems |
A logical invisibly indicating whether a font was found and downloaded or not
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.