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)
}
Run the code above in your browser using DataLab