Get a figlet font, returning a figlet_font object that can be used with figlet.

figlet_font(font, verbose = FALSE)

figlet_font_list()

Arguments

font

Path or name of the font to load

verbose

Logical, indicating if we should be verbose during font load.

Value

A figlet_font object for use with figlet

Details

This function tries to do the right thing with loading fonts:

  1. if font is a figlet_font already, return it

  2. if font is a known figlet_font in the internal font registry, then return it (faster than reading it again)

  3. if font is a filename, then load the font and add it to the registry

Examples

# Load a font with a full path rfiglet::figlet_font(system.file("fonts/standard.flf", package = "rfiglet"))
#> <figlet_font object: standard> #> _ _ _ #> ___| |_ __ _ _ __ __| | __ _ _ __ __| | #> / __| __/ _` | '_ \ / _` |/ _` | '__/ _` | #> \__ \ || (_| | | | | (_| | (_| | | | (_| | #> |___/\__\__,_|_| |_|\__,_|\__,_|_| \__,_|
# Load a previously seen font with a name rfiglet::figlet_font("standard")
#> <figlet_font object: standard> #> _ _ _ #> ___| |_ __ _ _ __ __| | __ _ _ __ __| | #> / __| __/ _` | '_ \ / _` |/ _` | '__/ _` | #> \__ \ || (_| | | | | (_| | (_| | | | (_| | #> |___/\__\__,_|_| |_|\__,_|\__,_|_| \__,_|
# List known fonts rfiglet::figlet_font_list()
#> [1] "banner" "big" "block" "bubble" "digital" "ivrit" #> [7] "lean" "mini" "mnemonic" "script" "shadow" "slant" #> [13] "small" "smscript" "smshadow" "smslant" "standard" "term"