unifont_combining | R Documentation |
unifont_combining()
returns a character vector of the code points
for all the "combining" characters in Unifont.
unifont_combining(upper = TRUE, csur = TRUE, unicode = FALSE)
upper |
Include glyphs above the Unicode Basic Multilingual plane. |
csur |
Include (Under-)Conscript Unicode Registry glyphs. |
unicode |
Include combining glyphs assigned by the Unicode Consortium
(i.e. not ones in the Private Use Area like the CSUR ones).
By default |
A character vector of Unicode code points
Can be used with the pua_combining
argument of bittermelon::bm_compose()
and bittermelon::as_bm_bitmap()
.
uc <- unifont_combining()
print(uc)
# Tengwar with combining glyphs
if (require("bittermelon")) {
s <- "\ue004\ue014\ue04a\ue005\ue000\ue040\ue022\ue04a\ue003\ue04e"
font <- unifont(ucp = str2ucp(s))
bml <- as_bm_list(s, font = font)
to_raise <- which(names(bml) %in% c("U+E04A", "U+E04E"))
bml[to_raise] <- bm_shift(bml[to_raise], top = 1L)
bml <- bm_compose(bml, pua_combining = uc)
bml <- bm_pad(bml, type = "trim", left = 1L, right = 0L)
bm <- bm_call(bml, cbind)
print(bm, px = px_ascii)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.