activate_google_font: Use Google Font

View source: R/google_fonts.R

activate_google_fontR Documentation

Use Google Font

Description

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.

Usage

activate_google_font(
  name,
  regular.wt = 400,
  bold.wt = 700,
  repo = "http://fonts.gstatic.com/",
  db_cache = TRUE,
  handle = curl::new_handle()
)

Arguments

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 http://fonts.gstatic.com/ provided by Google Fonts.

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 db_cache is set to FALSE, then metadata are retrieved from the Google Fonts API.

handle

a curl handle object passed to curl::curl_download().

See Also

handle font_add_google showtext_auto


meerapatelmd/suzyBakeOven documentation built on March 30, 2022, 1:44 p.m.