| read_yaff {bittermelon} | R Documentation |
Read and write yaff bitmap font files
Description
read_yaff() reads in yaff format bitmap font files
as a bm_font() object while write_yaff() writes a bm_font() object
as a yaff format bitmap font file.
Usage
read_yaff(con)
write_yaff(font, con = stdout())
Arguments
con |
A connection object or a character string of a filename.
See |
font |
A |
Value
read_yaff() returns a bm_font() object.
write_yaff() returns invisibly a character vector of the contents
of the yaff font file it wrote to con as a side effect.
See Also
bm_font() for information about bitmap font objects.
For more information about yaff font format see https://github.com/robhagemans/monobit#the-yaff-format.
Examples
# May take more than 5 seconds on CRAN servers
font_file <- system.file("fonts/fixed/4x6.yaff.gz", package = "bittermelon")
font <- read_yaff(font_file)
capital_r <- font[[str2ucp("R")]]
print(capital_r)
filename <- tempfile(fileext = ".yaff")
write_yaff(font, filename)
[Package bittermelon version 2.0.2 Index]