font_size {pharmaRTF} | R Documentation |
Return or set font size
Description
These property functions modify or return the font sizes of an rtf_doc
object
or individual titles/footnotes objects of the hf_line
class.
When used on an rtf_doc object to retrieve font sizes, the document level
default font size within the rtf_doc
is returned. When used on an rtf_doc
to
set fonts, the default font size for the RTF document is set.
When used on titles/footnotes (hf_line
objects), the font size is either
returned of set for that individual line.
Usage
font_size(x, ...)
font_size(x) <- value
set_font_size(x, value)
Arguments
x |
|
... |
Additonal arguments passed to method dispatch. |
value |
A numeric value for font size in points. |
Value
For font_size()
, the font_size attribute of the supplied
rtf_doc
or hf_line
. For `font_size<-`()
and
set_font_size
, the modified object.
Examples
library(huxtable)
ht <- huxtable(
column1 = 1:5,
column2 = letters[1:5]
)
rtf <- rtf_doc(ht, list(hf_line("aTitle", font_size = 15)))
pharmaRTF::font_size(rtf)
# Returns 12
pharmaRTF::font_size(rtf) <- 14
pharmaRTF::font_size(rtf$titles[[1]])
# Returns 15
pharmaRTF::font_size(rtf)
# Returns 14
[Package pharmaRTF version 0.1.4 Index]