unifont | R Documentation |
The function unifont()
loads in several GNU Unifont hex files as a
single bittermelon::bm_font()
object.
unifont(upper = TRUE, jp = FALSE, csur = TRUE, sample = FALSE, ucp = NULL)
upper |
Include glyphs above the Unicode Basic Multilingual plane. |
jp |
Use Japanese version of Chinese characters. |
csur |
Include (Under-)Conscript Unicode Registry glyphs. |
sample |
Add circle to "Combining" characters. |
ucp |
Character vector of Unicode Code Points: glyphs not in this vector won't be read in.
If |
A bittermelon::bm_font()
object.
# Much faster to load only the subset of GNU Unifont one needs # Mandarin Chinese if (require("bittermelon")) { s <- "\uff32\u5f88\u68d2\uff01" font <- unifont(ucp = str2ucp(s)) bm <- as_bm_bitmap(s, font = font) print(bm, px = px_ascii) } # Emoji if (require("bittermelon")) { s <- "\U0001f42d\U0001f432\U0001f435" font <- unifont(ucp = str2ucp(s)) bm <- as_bm_bitmap(s, font = font) print(bm, px = px_ascii) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.