This helper function is to be used with the tab_style() function, which itself allows for the setting of custom styles to one or more cells. We can also define several styles within a single call of cell_text() and tab_style() will reliably apply those styles to the targeted element.

cell_text(color = NULL, font = NULL, size = NULL, align = NULL,
  style = NULL, weight = NULL, stretch = NULL, indent = NULL,
  decorate = NULL, transform = NULL)



The text color.


The font or collection of fonts (subsequent font names are) used as fallbacks.


The size of the font. Can be provided as a number that is assumed to represent px values (or could be wrapped in the px()) helper function. We can also use one of the following absolute size keywords: "xx-small", "x-small", "small", "medium", "large", "x-large", or "xx-large".


The text alignment. Can be one of either "center", "left", "right", or "justify".


The text style. Can be one of either "center", "normal", "italic", or "oblique".


The weight of the font. Can be a text-based keyword such as "normal", "bold", "lighter", "bolder", or, a numeric value between 1 and 1000, inclusive. Note that only variable fonts may support the numeric mapping of weight.


Allows for text to either be condensed or expanded. We can use one of the following text-based keywords to describe the degree of condensation/expansion: "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", or "ultra-expanded". Alternatively, we can supply percentage values from 0\% to 200\%, inclusive. Negative percentage values are not allowed.


The indentation of the text.


allows for text decoration effect to be applied. Here, we can use "overline", "line-through", or "underline".


Allows for the transformation of text. Options are "uppercase", "lowercase", or "capitalize".

See also