Font | R Documentation |
R6 class defining font properties
size
numeric defining the size of font
color
character defining the color of font
fontFamily
character defining the family of font
fontFace
character defining the font face as defined in helper enum FontFaces
.
angle
numeric defining the angle of font
align
character defining the alignment of font as defined in helper enum Alignments
.
maxWidth
numeric that will be converted to a ggplot2::unit object (in "pt" unit) defining the maximum width of text box.
margin
a numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
new()
Create a new Font
object.
Default font properties are defined directly in the object field,
so NULL
input is allowed will lead to default properties.
Font$new( color = NULL, size = NULL, fontFamily = NULL, fontFace = NULL, angle = NULL, align = NULL, maxWidth = NULL, margin = NULL )
color
character defining the color of font.
size
numeric defining the size of font.
fontFamily
character defining the family of font.
fontFace
character defining the font face as defined in helper enum FontFaces
.
angle
numeric defining the angle of font.
align
character defining the alignment of font as defined in helper enum Alignments
.
maxWidth
numeric that will be converted to a ggplot2::unit object (in "pt" unit) defining the maximum width of text box.
margin
a numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
A new Font
object
createPlotTextFont()
Create a ggplot2::element_text
directly convertible by ggplot2::theme
.
Font$createPlotTextFont( size = NULL, color = NULL, fontFamily = NULL, fontFace = NULL, angle = NULL, align = NULL, margin = NULL )
size
numeric defining the size of font
color
character defining the color of font
fontFamily
character defining the family of font
fontFace
character defining the font face as defined in helper enum FontFaces
.
angle
numeric defining the angle of font.
align
character defining the alignment of font as defined in helper enum Alignments
.
margin
a numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
An element_text
object.
createPlotTextBoxFont()
Create a ggplot2::element_text
directly convertible by ggplot2::theme
.
Font$createPlotTextBoxFont( size = NULL, color = NULL, fontFamily = NULL, fontFace = NULL, angle = NULL, align = NULL, maxWidth = NULL, margin = NULL )
size
numeric defining the size of font
color
character defining the color of font
fontFamily
character defining the family of font
fontFace
character defining the font face as defined in helper enum FontFaces
.
angle
numeric defining the angle of font.
align
character defining the alignment of font as defined in helper enum Alignments
.
maxWidth
numeric that will be converted to a ggplot2::unit object (in "pt" unit) defining the maximum width of text box.
margin
a numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
An ggtext::element_textbox
object.
clone()
The objects of this class are cloneable with this method.
Font$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.