wrap string given a Truetype font
Arguments
- str
- ( - string,- character, or- list)
 string to be wrapped. If it is a- vectoror a- list, it will be looped as a- listand returned with- unlist(use.names = FALSE).
- width
- ( - numeric(1))
 width, in characters, that the text should be wrapped to.
- fontspec
- ( - font_spec)
 a font_spec object specifying the font information to use for calculating string widths and heights, as returned by- font_spec().
- min_ok_chars
- ( - numeric(1))
 number of minimum characters that remain on either side when a word is split.
- collapse
- ( - stringor- NULL)
 collapse character used to separate segments of words that have been split and should be pasted together. This is usually done internally with- "\n"to update the wrapping along with other internal values.
- wordbreak_ok
- ( - logical(1))
 should breaking within a word be allowed? If,- FALSE, attempts to wrap a string to a width narrower than its widest word will result in an error.