Class Font
A Component defining certain text manipulations.
-
Font:Font (initialSize, initialFamily[, initialStyle=FontStyle.Normal[, initialDecoration]])
-
Font constructor.
Parameters:
- initialSize
number or string
The Font Component's initial size. Valid sizes are defined by QT, but I can only seem to get numbers to work.
- initialFamily
string
The font family for this Font Component.
- initialStyle
FontStyle or FontWeight
The Font Component's initial style.
(default FontStyle.Normal)
- initialDecoration
FontDecoration
The Font Component's initial FontDecoration.
(optional)
Returns:
Font
-
self.Size.get ()
-
Returns the Font's size.
Returns:
number or string
-
self.Size.set (value)
-
Sets the Font's size.
Parameters:
- value
number or string
If a string is passed, it must end in "px" or "pt".
-
self.Family.get ()
-
Returns the Font's family.
Returns:
string
-
self.Family.set (value)
-
Sets the Font's family.
Parameters:
-
self.Style.get ()
-
Returns the Font's FontStyle.
Returns:
FontStyle
-
self.Style.set (value)
-
Sets the Font's FontStyle.
Parameters:
-
self.Decoration.get ()
-
Returns the Font's FontDecoration.
Returns:
FontDecoration
-
self.Decoration.set (value)
-
Sets the Font's FontDecoration.
Parameters:
-
self.Stylesheet.get ()
-
Updates and returns the Font's stylesheet.
Returns:
string