The only font currently available is 'spleen' - a monospace bitmap font from: https://github.com/fcambus/spleen

nr_text(nr, x, y, str, color = "black", fontsize = 8L)

Arguments

nr

nativeRaster

x, y

coordinates of lower-left corner of text

str

character string

color

Color as a character string. Either a standard R color (e.g. 'blue', 'white') or a hex color of the form #rrggbbaa, #rrggbb, #rgba or #rgb

fontsize

height of font in pizels. Only valid values are 8, 12 and 16. Default: 8.

Value

Original nativeRaster modified in-place

Details

The 'spleen' font is licensed under BSD and the license is included in this package as "LICENSE-spleen.txt". To view LICENSE:

cat(readLines(system.file('LICENSE-spleen.txt', package = 'nara')), sep = "\n")

Examples

N <- 20
nr <- nr_new(N, N, 'grey80')
nr_text(nr, x = 1, y = N/3, str = "Hi!")
plot(nr)