activate_google_font | R Documentation |
Adds a Google Font from https://fonts.google.com/ and activate the showtext package. This function is particularly useful for using Google Fonts for [createLogo]createLogo
.
activate_google_font( name, regular.wt = 400, bold.wt = 700, repo = "http://fonts.gstatic.com/", db_cache = TRUE, handle = curl::new_handle() )
name |
name of the font that will be searched in Google Fonts |
regular.wt |
font weight for the regular font face, usually 400 |
bold.wt |
font weight for the bold font face, usually 700 |
repo |
the site that hosts the font files. Default is the official
repository |
db_cache |
whether to obtain font metadata from a cache site. Using cache
is typically faster, but not as update-to-date as using the official
API. If |
handle |
a curl handle object passed to |
handle
font_add_google
showtext_auto
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.