bm_font {bittermelon} | R Documentation |
bm_font()
creates a bitmap font object.
bm_font(x = bm_list(), comments = NULL, properties = NULL)
x |
Named list of |
comments |
An optional character vector of (global) font comments. |
properties |
An optional named list of font metadata. |
bm_font()
is a named list.
The names are of the form “U+HHHH” or “U+HHHHH”.
where the H
are appropriate hexadecimal Unicode code points.
It is a subclass of bm_list()
.
A named list with a “bm_font” subclass.
is_bm_font()
, [as_bm_font(), hex2ucp()
]
font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon")
font <- read_hex(font_file)
is_bm_font(font)
# number of characters in font
length(font)
# print out "R"
R_glyph <- font[[str2ucp("R")]]
print(R_glyph, px = c(".", "#"))