font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon")
font <- read_hex(font_file)
bm_R <- font[[str2ucp("R")]]
print(bm_R)
if (cli::is_utf8_output())
print(bm_R, px = px_unicode, compress = "vertical")
bm_8 <- font[[str2ucp("8")]]
bm_8_with_border <- bm_extend(bm_extend(bm_8, left = 1L),
sides = 1L, value = 2L)
print(bm_8_with_border, px = c(".", "@", "X"))
if (cli::num_ansi_colors() >= 16L) {
print(bm_8_with_border, px = " ",
bg = c(cli::bg_br_white, cli::bg_blue, cli::bg_red))
}
Run the code above in your browser using DataLab