font_spec {formatters} | R Documentation |
Font size specification
Description
Font size specification
Usage
font_spec(font_family = "Courier", font_size = 8, lineheight = 1)
Arguments
font_family |
( |
font_size |
( |
lineheight |
( |
Details
Passing the output of this constructor to the rendering or pagination machinery defines a font for use when calculating word wrapping and pagination.
Note
Specifying font in this way to, e.g., export_as_txt()
or
toString()
will not affect the font size of the output, as these
are both raw text formats. export_as_pdf()
will use the specified font.
See Also
nchar_ttype()
, toString()
, pagination_algo
, export_as_pdf()
Examples
fspec <- font_spec("Courier", 8, 1)
lets <- paste(letters, collapse = "")
nchar_ttype(lets, fspec)
fspec2 <- font_spec("Times", 8, 1)
nchar_ttype(lets, fspec2)