View source: R/properties-cell.R
| font | R Documentation |
Set the font for cell text
font(ht)
font(ht) <- value
set_font(ht, row, col, value)
map_font(ht, row, col, fn)
ht |
A huxtable. |
value |
A character vector or matrix. Set to |
row |
A row specifier. See rowspecs for details. |
col |
An optional column specifier. |
fn |
A mapping function. See mapping-functions for details. |
To find out what fonts are on your system, systemfonts::match_font()
is useful.
For HTML, you can use comma-separated lists of font names like
"Times New Roman, Times, Serif". This is not portable, though.
LaTeX and HTML use different font names. To use the same font
names across document formats, see options("huxtable.latex_use_fontspec")
in huxtable-options.
Other formatting functions:
background_color(),
bold(),
font_size(),
na_string(),
number_format(),
text_color()
font(jams) <- "times"
font(jams)
set_font(jams, "arial")
set_font(jams, 2:3, 1, "arial")
map_font(jams, by_rows("arial", "times"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.