9.8. font

class itom.font(family, pointSize=0, weight=- 1, italic=False) → creates a font object.

Bases: object

This class is a wrapper for the class QFont of Qt. 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, except on Symbian where it is 7 points.

weight : {int}, optional

Weighting scale from 0 to 99, e.g. font.Light, font.Normal (default), font.DemiBold, font.Bold, font.Black

italic : {bool}, optional

defines if font is italic or not (default)

static installedFontFamilies() → return a list of all installed font families.
static isFamilyInstalled(family) → checks if the given font family is installed on this computer.
Parameters

family : {str}

The name of the font family that should be checked

family

Gets/Sets the family name of the font. The name is case insensitive and may include a foundry name.

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 font matching algorithm.

italic

Gets/Sets the italic attribute of the font.

pointSize

Gets/Sets the point size to pointSize. The point size must be greater than zero.

strikeOut

Gets/Sets the strikeout on or off.

underline

Gets/Sets the underline on or off.

weight

Sets the weight the font to weight.

This should be a value from the font.Light, font.Normal, font.DemiBold, font.Bold, font.Black enumeration or any value in the range [0,99].