bm_compose {bittermelon} | R Documentation |
Compose graphemes in a bitmap list by applying combining marks
Description
bm_compose()
simplifies bm_list()
object
by applying combining marks to preceding glpyhs (composing new graphemes).
Usage
bm_compose(bml, pua_combining = character(0), ...)
Arguments
bml |
A |
pua_combining |
Additional Unicode code points to be considered as a “combining” character such as characters defined in the Private Use Area (PUA) of a font. |
... |
Passed to |
Details
bm_compose()
identifies combining marks by their name using is_combining_character()
.
It then combines such marks with their immediately preceding glyph using bm_overlay()
.
Value
A bm_list()
object.
Examples
font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon")
font <- read_hex(font_file)
grave <- font[[str2ucp("`")]]
a <- font[[str2ucp("a")]]
bml <- bm_list(`U+0061` = a, `U+0300` = grave)
print(bml)
print(bm_compose(bml))
[Package bittermelon version 2.0.2 Index]