Font

data class Font(    val size: Number = DEFAULT_FONT_SIZE,     val color: Color = Color.BLACK,     val family: String = "Arial",     val fontWeight: Font.FontWeight = FontWeight.NORMAL,     val fontStyle: Font.FontStyle = FontStyle.NORMAL)

This class is used to represent a font. For more customization of fonts, the CSS feature can be used.

See also

Constructors

Link copied to clipboard
fun Font(    size: Number = DEFAULT_FONT_SIZE,     color: Color = Color.BLACK,     family: String = "Arial",     fontWeight: Font.FontWeight = FontWeight.NORMAL,     fontStyle: Font.FontStyle = FontStyle.NORMAL)

Creates a Font.

Types

Link copied to clipboard
enum FontStyle : Enum<Font.FontStyle>

Enum class for representing all available font styles for the Font class.

Link copied to clipboard
enum FontWeight : Enum<Font.FontWeight>

Enum class for representing all available font weights for the Font class.

Properties

Link copied to clipboard
val color: Color

Color of this font. Default: java.awt.Color.BLACK.

Link copied to clipboard
val family: String

Font family as a String for this Font. Default: "Arial".

Link copied to clipboard
val fontStyle: Font.FontStyle

Font style for this Font. Default: FontStyle.NORMAL.

Link copied to clipboard
val fontWeight: Font.FontWeight

Font weight for this Font. Default: FontWeight.NORMAL.

Link copied to clipboard
val size: Number

Size of this Font in px. Maybe a floating-point value. Default: 14.