10.8. font#
- class itom.font(family, pointSize=0, weight=-1, italic=False)#
Creates a font object.
This class is a wrapper for the class QFont of the Qt framework. It provides possibilities for creating a font type.
- Parameters:
- family
str
The family name may optionally also include a foundry name, e.g. “Helvetica [Cronyx]”. If the family is available from more than one foundry and the foundry isn’t specified, an arbitrary foundry is chosen. If the family isn’t available a family will be set using a best-matching algorithm.
- pointSize
int
,optional
If pointSize is zero or negative, the point size of the font is set to a system-dependent default value. Generally, this is 12 points.
- weight
int
,optional
Weighting scale from 0 to 99, e.g.
font.Light
,font.Normal
(default),font.DemiBold
,font.Bold
,font.Black
.- italicbool,
optional
Defines if font is italic or not (default)
- family
- static isFamilyInstalled(family) bool #
Checks if the given font family is installed on this computer.
- Black = 87#
- Bold = 75#
- DemiBold = 63#
- Light = 25#
- Normal = 50#
- family#
str
: gets / sets the family name of the font.The name is case insensitive. It may optionally also include a foundry name, e.g. “Helvetica [Cronyx]”. If the family is available from more than one foundry and the foundry isn’t specified, an arbitrary foundry is chosen. If the family isn’t available a family will be set using a font matching algorithm.