vector_text_coords {lofifonts} | R Documentation |
Create data.frame of glyph information for the given text.
Description
Text input can contain multiple lines separated by carriage returns
Usage
vector_text_coords(
text,
font = c("gridfont_smooth", "gridfont", "arcade"),
dx = 0L,
dy = 0L,
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 |
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
data.frame of stroke information
char_idx
The index of the character within the provided
text
stringcodepoint
Unicode codepoint (integer)
stroke_idx
Index of the stroke within each character
x
Pixel coordinate x value for display
y
Pixel coordinate y value for display
line
Line number within input
text
where this character appearsx0
Original untransformed x-coordinate
y0
Original untransformed y-coordinate
See Also
Other vector text functions:
vector_text_matrix()
,
vector_text_raster()
Examples
vector_text_coords('Hi')