rtrek (version 0.2.0)

st_font: Preview Star Trek fonts

Description

This function produces a plot showing a preview of a Star Trek font from the trekfont package. It will return a message if any of trekfont, showtext or ggplot2 are not installed. If family is missing, it will return a vector of all available font families.

Usage

st_font(family, size = 11)

Arguments

family

character, font family.

size,

numeric, font size passed to ggplot.

Value

a character vector, or a plot side effect. See details.

Details

In RStudio on Windows the font may not show in the RStudio graphics device. Try using the regular R GUI.

Examples

Run this code
# NOT RUN {
if(all(c("trekfont", "showtext", "ggplot2") %in% installed.packages())){
  st_font()
}
# }
# NOT RUN {
st_font("Federation")
# }
# NOT RUN {
 # should be run in an interactive session
# }

Run the code above in your browser using DataCamp Workspace