generate_css {gfonts} | R Documentation |
Generate CSS to import fonts
Description
Generate CSS to import fonts
Usage
generate_css(
id,
variants = NULL,
subsets = NULL,
output = NULL,
font_dir = "../fonts/",
prefer_local_source = TRUE,
browser_support = c("best", "modern"),
...
)
Arguments
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 |
Value
a character string with CSS code (invisibly).
Examples
if (interactive()) {
# Generate CSS code to use Roboto font
cat(generate_css("roboto", "regular"))
}
[Package gfonts version 0.2.0 Index]