The QFontVariableAxis class represents a variable axis in a font. 更多...
| 头: |
#include <QFontVariableAxis>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
|
| qmake: |
QT += gui
|
| Since: | Qt 6.9 |
注意: 此类的所有函数 可重入 .
| QFontVariableAxis (const QFontVariableAxis & axis ) | |
| ~QFontVariableAxis () | |
| qreal | defaultValue () const |
| qreal | maximumValue () const |
| qreal | minimumValue () const |
| QString | name () const |
| void | setDefaultValue (qreal defaultValue ) |
| void | setMaximumValue (qreal maximumValue ) |
| void | setMinimumValue (qreal minimumValue ) |
| void | setName (const QString & name ) |
| void | setTag (QFont::Tag tag ) |
| QFont::Tag | tag () const |
| QFontVariableAxis & | operator= (const QFontVariableAxis & axis ) |
Variable fonts provide a way to store multiple variations (with different weights, widths or styles) in the same font file. The variations are given as floating point values for a pre-defined set of parameters, called "variable axes".
Specific parameterizations (sets of values for the axes in a font) can be selected using the properties in QFont , same as with traditional subfamilies that are defined as stand-alone font files. But with variable fonts, arbitrary values can be provided for each axis to gain a fine-grained customization of the font's appearance.
QFontVariableAxis contains information of one axis. Use QFontInfo::variableAxes () to retrieve a list of the variable axes defined for a given font. Specific values can be provided for an axis by using QFont::setVariableAxis () and passing in the tag ().
注意: On Windows, variable axes are not supported if the optional GDI font backend is in use.
Creates a QFontVariableAxis object that is a copy of the given axis .
另请参阅 operator= ().
[noexcept]
QFontVariableAxis::
~QFontVariableAxis
()
销毁此 QFontVariableAxis 对象。
Returns the default value of the axis. This is the value the axis will have if none has been provided in the QFont query.
注意: Getter function for property defaultValue.
另请参阅 setDefaultValue (), minimumValue (),和 maximumValue ().
Returns the maximum value of the axis. Setting the axis to a value which is higher than this is not supported.
注意: Getter function for property maximumValue.
另请参阅 setMaximumValue (), minimumValue (),和 defaultValue ().
Returns the minimum value of the axis. Setting the axis to a value which is lower than this is not supported.
注意: Getter function for property minimumValue.
另请参阅 setMinimumValue (), maximumValue (),和 defaultValue ().
Returns the name of the axis, if provided by the font.
注意: Getter function for property name.
Sets the default value of this QFontVariableAxis to defaultValue .
注意: Typically, there will be no need to call this function as it will not affect the font itself, only this particular representation.
另请参阅 defaultValue ().
Sets the maximum value of this QFontVariableAxis to maximumValue .
注意: Typically, there will be no need to call this function as it will not affect the font itself, only this particular representation.
另请参阅 maximumValue ().
Sets the minimum value of this QFontVariableAxis to minimumValue .
注意: Typically, there will be no need to call this function as it will not affect the font itself, only this particular representation.
另请参阅 minimumValue ().
Sets the name of this QFontVariableAxis to name .
注意: Typically, there will be no need to call this function as it will not affect the font itself, only this particular representation.
另请参阅 name ().
Sets the tag of QFontVariableAxis to tag .
注意: Typically, there will be no need to call this function as it will not affect the font itself, only this particular representation.
另请参阅 tag ().
Returns the tag of the axis. This is a four-character sequence which identifies the axis. Certain tags have standardized meanings, such as "wght" (weight) and "wdth" (width), but any sequence of four latin-1 characters is a valid tag. By convention, non-standard/custom axes are denoted by tags in all uppercase.
另请参阅 setTag (), QFont::setVariableAxis (),和 name ().
赋值给定 axis 到此 QFontVariableAxis .
另请参阅 QFontVariableAxis ().