R6 class defining font properties
Public fields
sizenumeric defining the size of font
colorcharacter defining the color of font
fontFamilycharacter defining the family of font
fontFacecharacter defining the font face as defined in helper enum
FontFaces.anglenumeric defining the angle of font
aligncharacter defining the alignment of font as defined in helper enum
Alignments.maxWidthnumeric that will be converted to a ggplot2::unit object (in "pt" unit) defining the maximum width of text box.
margina numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
Methods
Method 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.
Usage
Font$new(
color = NULL,
size = NULL,
fontFamily = NULL,
fontFace = NULL,
angle = NULL,
align = NULL,
maxWidth = NULL,
margin = NULL
)Arguments
colorcharacter defining the color of font.
sizenumeric defining the size of font.
fontFamilycharacter defining the family of font.
fontFacecharacter defining the font face as defined in helper enum
FontFaces.anglenumeric defining the angle of font.
aligncharacter defining the alignment of font as defined in helper enum
Alignments.maxWidthnumeric that will be converted to a ggplot2::unit object (in "pt" unit) defining the maximum width of text box.
margina numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
Method createPlotTextFont()
Create a ggplot2::element_text directly convertible by ggplot2::theme.
Usage
Font$createPlotTextFont(
size = NULL,
color = NULL,
fontFamily = NULL,
fontFace = NULL,
angle = NULL,
align = NULL,
margin = NULL
)Arguments
sizenumeric defining the size of font
colorcharacter defining the color of font
fontFamilycharacter defining the family of font
fontFacecharacter defining the font face as defined in helper enum
FontFaces.anglenumeric defining the angle of font.
aligncharacter defining the alignment of font as defined in helper enum
Alignments.margina numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
Method createPlotTextBoxFont()
Create a ggplot2::element_text directly convertible by ggplot2::theme.
Usage
Font$createPlotTextBoxFont(
size = NULL,
color = NULL,
fontFamily = NULL,
fontFace = NULL,
angle = NULL,
align = NULL,
maxWidth = NULL,
margin = NULL
)Arguments
sizenumeric defining the size of font
colorcharacter defining the color of font
fontFamilycharacter defining the family of font
fontFacecharacter defining the font face as defined in helper enum
FontFaces.anglenumeric defining the angle of font.
aligncharacter defining the alignment of font as defined in helper enum
Alignments.maxWidthnumeric that will be converted to a ggplot2::unit object (in "pt" unit) defining the maximum width of text box.
margina numeric vector of length 4 defining the size of the area (in pt) around the text in the followin order: top, right, bottom, left.
Returns
An ggtext::element_textbox object.