Font
The Font class is used to define the font properties for text elements, including the font name, size, color, and style.
Constructor:
constructor(name: string, size: number, color: string, style: FontStyle)
Creates a Font instance.name
: The name of the font (e.g.,"Arial"
,"Times New Roman"
).size
: The size of the font (in points) (e.g. 11).color
: The color of the font (as astring
representing a color name or RGB code. For example: "red","#FF00FF"
).style
: The FontStyle object defining the font’s styling (e.g., bold, italic).