as_bm_font | R Documentation |
as_bm_font()
turns an existing object into a bm_font()
object.
as_bm_font(x, ..., comments = NULL, properties = NULL)
## Default S3 method:
as_bm_font(x, ..., comments = NULL, properties = NULL)
## S3 method for class 'list'
as_bm_font(x, ..., comments = NULL, properties = NULL)
x |
An object that can reasonably be coerced to a |
... |
Further arguments passed to or from other methods. |
comments |
An optional character vector of (global) font comments. |
properties |
An optional named list of font metadata. |
A bm_font()
object.
bm_font()
plus_sign <- matrix(0L, nrow = 9L, ncol = 9L)
plus_sign[5L, 3:7] <- 1L
plus_sign[3:7, 5L] <- 1L
plus_sign_glyph <- bm_bitmap(plus_sign)
space_glyph <- bm_bitmap(matrix(0L, nrow = 9L, ncol = 9L))
l <- list()
l[[str2ucp("+")]] <- plus_sign_glyph
l[[str2ucp(" ")]] <- space_glyph
font <- as_bm_font(l)
is_bm_font(font)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.