bm_font {bittermelon}R Documentation

Bitmap font object

Description

bm_font() creates a bitmap font object.

Usage

bm_font(x = bm_list(), comments = NULL, properties = NULL)

Arguments

x

Named list of bm_bitmap() objects. Names must be coercible by Unicode::as.u_char().

comments

An optional character vector of (global) font comments.

properties

An optional named list of font metadata.

Details

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().

Value

A named list with a “bm_font” subclass.

See Also

is_bm_font(), as_bm_font(), hex2ucp()

Examples

 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)

[Package bittermelon version 2.0.2 Index]