Generate Font Awesome icons as SVGs
Add one or more Font Awesome icons as SVGs contained within <svg>...</svg>
.
We can optionally set certain style attributes. The fa()
function can be
used directly within inline evaluations of R code in R Markdown documents.
fa( name, fill = NULL, fill_opacity = NULL, stroke = NULL, stroke_width = NULL, stroke_opacity = NULL, height = NULL, width = NULL, margin_left = NULL, margin_right = NULL, position = NULL, title = NULL, a11y = c("deco", "sem", "none") )
name |
The name of the Font Awesome icon. This could be as a short name
(e.g., |
fill, fill_opacity |
The fill color of the icon can be set with |
stroke, stroke_width, stroke_opacity |
The stroke options allow for
setting the color, width, and opacity of the SVG outline stroke. By
default, the stroke width is very small at |
height, width |
The height and width style attributes of the rendered
SVG. If nothing is provided for |
margin_left, margin_right |
The length value for the margin that's either
left or right of the icon. By default, |
position |
The value for the |
title |
An option for populating the SVG |
a11y |
Cases that distinguish the role of the icon and inform which
accessibility attributes to be used. Icons can either be |
A fontawesome
object.
if (interactive()) { # Create a Font Awesome SVG icon fa(name = "r-project") }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.