Provides info about how a given font query is resolved. 更多...
| import 语句: |
import QtQuick
|
| Since: | Qt 6.9 |
FontInfo provides information about the actual font which is matched for a font query by Qt's font selection system.
It corresponds to the class QFontInfo in C++.
FontInfo {
id: fontInfo
font.family: "Arial"
}
Text {
text: fontInfo.family === "Arial"
? "System has 'Arial' font"
: "System does not have 'Arial' font"
}
另请参阅 FontMetrics and TextMetrics .
|
bold
:
bool
|
This property is true if weight() would return a value greater than Font.Normal; otherwise returns false.
另请参阅 weight and QFontInfo::bold ().
|
family
:
string
|
This property holds the family of the matched font.
另请参阅 QFontInfo::family ().
|
fixedPitch
:
bool
|
This property holds the fixed pitch value of the matched font.
另请参阅 QFontInfo::fixedPitch ().
|
font : font |
This property holds the font which will be resolved by the FontInfo .
|
italic
:
bool
|
This property holds the italic value of the matched font.
另请参阅 QFontInfo::italic ().
|
pixelSize
:
int
|
This property holds the pixel size of the matched font.
另请参阅 QFontInfo::pixelSize ().
|
pointSize
:
real
|
This property holds the point size of the matched font.
另请参阅 QFontInfo::pointSizeF ().
|
style
:
enum
|
This property holds the style of the matched font.
| 常量 | 描述 |
|---|---|
Font.StyleNormal
|
Contains normal glyphs without italic slant. |
Font.StyleItalic
|
Contains glyphs designed to be used for representing italicized text. |
Font.StyleOblique
|
Contains glyphs with an italic appearance, typically not specially designed, but rather produced by applying a slant on the font family's normal glyphs. |
另请参阅 QFontInfo::style ().
|
styleName
:
real
|
This property holds the style name (or "sub-family") of the mathed font.
另请参阅 QFontInfo::styleName ().
|
variableAxes
:
list
|
This property holds the variable axes supported by the matched font. The list consists of
QFontVariableAxis
objects, which have the properties
tag
,
name
,
minimumValue
,
maximumValue
,和
defaultValue
.
另请参阅 QFontInfo::variableAxes () 和 QFontVariableAxis .
|
weight
:
int
|
This property holds the weight of the matched font.
另请参阅 bold and QFontInfo::weight ().