The PySide.QtGui.QFontInfo class provides general information about fonts.
The PySide.QtGui.QFontInfo class provides the same access functions as PySide.QtGui.QFont , e.g. PySide.QtGui.QFontInfo.family() , PySide.QtGui.QFontInfo.pointSize() , PySide.QtGui.QFontInfo.italic() , PySide.QtGui.QFontInfo.weight() , PySide.QtGui.QFontInfo.fixedPitch() , PySide.QtGui.QFontInfo.styleHint() etc. But whilst the PySide.QtGui.QFont access functions return the values that were set, a PySide.QtGui.QFontInfo object returns the values that apply to the font that will actually be used to draw the text.
For example, when the program asks for a 25pt Courier font on a machine that has a non-scalable 24pt Courier font, PySide.QtGui.QFont will (normally) use the 24pt Courier for rendering. In this case, QFont.pointSize() returns 25 and QFontInfo.pointSize() returns 24.
There are three ways to create a PySide.QtGui.QFontInfo object.
Parameters: | arg__1 – PySide.QtGui.QFont |
---|
Constructs a font info object for font .
The font must be screen-compatible, i.e. a font you use when drawing text in widgets or pixmaps , not PySide.QtGui.QPicture or PySide.QtGui.QPrinter .
The font info object holds the information for the font that is passed in the constructor at the time it is created, and is not updated if the font’s attributes are changed later.
Use QPainter.fontInfo() to get the font info when painting. This will give correct results also when painting on paint device that is not screen-compatible.
Constructs a copy of fi .
Return type: | PySide.QtCore.bool |
---|
Returns true if PySide.QtGui.QFontInfo.weight() would return a value greater than QFont.Normal ; otherwise returns false.
Return type: | PySide.QtCore.bool |
---|
Returns true if the matched window system font is exactly the same as the one specified by the font; otherwise returns false.
See also
Return type: | unicode |
---|
Returns the family name of the matched window system font.
See also
Return type: | PySide.QtCore.bool |
---|
Returns the fixed pitch value of the matched window system font.
See also
Return type: | PySide.QtCore.bool |
---|
Returns the italic value of the matched window system font.
See also
Return type: | PySide.QtCore.bool |
---|
Returns the overline value of the matched window system font.
Here we read the overline flag directly from the PySide.QtGui.QFont . This is OK for X11 and for Windows because we always get what we want.
See also
Return type: | PySide.QtCore.int |
---|
Returns the pixel size of the matched window system font.
See also
Return type: | PySide.QtCore.int |
---|
Returns the point size of the matched window system font.
Return type: | PySide.QtCore.qreal |
---|
Returns the point size of the matched window system font.
See also
Return type: | PySide.QtCore.bool |
---|
Returns true if the font is a raw mode font; otherwise returns false.
If it is a raw mode font, all other functions in PySide.QtGui.QFontInfo will return the same values set in the PySide.QtGui.QFont , regardless of the font actually used.
See also
Return type: | PySide.QtCore.bool |
---|
Returns the strikeout value of the matched window system font.
This is OK for X11 and for Windows because we always get what we want.
See also
Return type: | PySide.QtGui.QFont.Style |
---|
Returns the style value of the matched window system font.
See also
Return type: | PySide.QtGui.QFont.StyleHint |
---|
Returns the style of the matched window system font.
Currently only returns the style hint set in PySide.QtGui.QFont .
See also
QFont.styleHint() QFont.StyleHint
Return type: | unicode |
---|
Returns the style name of the matched window system font on system that supports it.
See also
Return type: | PySide.QtCore.bool |
---|
Returns the underline value of the matched window system font.
Here we read the underline flag directly from the PySide.QtGui.QFont . This is OK for X11 and for Windows because we always get what we want.
See also
Return type: | PySide.QtCore.int |
---|
Returns the weight of the matched window system font.