generate_css | R Documentation |
Generate CSS to import fonts
generate_css( id, variants = NULL, subsets = NULL, output = NULL, font_dir = "../fonts/", prefer_local_source = TRUE, browser_support = c("best", "modern"), ... )
id |
Id of the font, correspond to column |
variants |
Variant of font to use. |
subsets |
Subsets to use. |
output |
Specifies path to output file for CSS generated. |
font_dir |
Fonts directory relative to |
prefer_local_source |
Generate CSS font-face rules in which user installed fonts are
preferred. Use |
browser_support |
Browser to support, choose |
... |
Arguments passed to |
a character string with CSS code (invisibly).
if (interactive()) { # Generate CSS code to use Roboto font cat(generate_css("roboto", "regular")) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.