vector_text_matrix {lofifonts}R Documentation

Create a binary matrix of the rendered text

Description

Create a binary matrix of the rendered text

Usage

vector_text_matrix(
  text,
  font = c("gridfont_smooth", "gridfont", "arcade"),
  scale_coords = 1,
  scale_matrix = 1,
  dx = NULL,
  dy = NULL,
  missing = utf8ToInt("?")
)

Arguments

text

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

font

Name of vector font, or a vector 'lofi' font object. Default: 'gridfont_smooth'. Use get_lofi_names('vector') to retrieve a list of all valid vector fonts included in this package.

scale_coords

Scale factor for text rendering. Numeric value greater than zero. Default: 1

scale_matrix

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

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

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

Binary matrix rendering of the font

See Also

Other vector text functions: vector_text_coords(), vector_text_raster()

Examples

vector_text_matrix("Hi")

[Package lofifonts version 0.1.3 Index]