fa: Generate a FontAwesome icon as an SVG

Description Usage Arguments Value Examples

View source: R/fa.R

Description

Add a FontAwesome icon as SVG contained within <svg>...</svg>. We can optionally set certain style attributes. The fa() function can be used directly within inline evaluations of R code (e.g., as `r fa(...)`) in R Markdown documents.

Usage

1
fa(name, height = NULL, fill = NULL)

Arguments

name

the name of the FontAwesome icon.

height

the absolute height (px) of the rendered SVG.

fill

an option to change the fill color of the icon.

Value

a character object that is the styled FontAwesome icon within svg tags.

Examples

1
2
3
# Emit a FontAwesome icon (`r-project`) as
# SVG within `svg` tags
fa(name = "r-project")

rstudio/fontawesome documentation built on Sept. 3, 2019, 4:06 p.m.