bitmap_text_raster {lofifonts}R Documentation

Create a raster image of the rendered text

Description

Create a raster image of the rendered text

Usage

bitmap_text_raster(
  text,
  font = "unifont",
  dx = 0L,
  dy = 0L,
  scale_matrix = 1,
  missing = NULL
)

Arguments

text

Single text string. Can include carriage returns to split text over multiple lines.

font

Name of bitmap font, or a 'lofi' font object. Default: 'unifont'. Use get_lofi_names('bitmap') to retrieve a list of all valid bitmap fonts included in this package. To create a 'lofi' font object use convert_bm_font_to_lofi()

dx

Additional character spacing in the horizontal direction. Default: 0

dy

Additional character spacing in the vertical direction i.e. between rows of text. Default: 0

scale_matrix

Integer size scale factor. Default: 1. Must be an integer value >= 1. Scale up the matrix or raster result by this factor

missing

Codepoint to use if glyph not found in font. Default: NULL means to use the default specified by the font internally. Otherwise it will default to the codepoint for '?'

Value

Raster image representation of the rendered text

See Also

Other bitmap text functions: bitmap_text_coords(), bitmap_text_matrix()

Examples

ras <- bitmap_text_raster('Hi')
plot(ras)

[Package lofifonts version 0.1.3 Index]