The QFontVariableAxis class represents a variable axis in a font. More...
| Header: | #include <QFontVariableAxis>
|
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui)target_link_libraries(mytarget PRIVATE Qt6::Gui)
|
| qmake: | QT += gui
|
| Since: | Qt 6.9 |
Note: All functions in this class are reentrant.
| 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().
Note: 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.
See also operator=().
[noexcept] QFontVariableAxis::~QFontVariableAxis()
Destroys this QFontVariableAxis object.
Returns the default value of the axis. This is the value the axis will have if none has been provided in the QFont query.
Note: Getter function for property defaultValue.
See also setDefaultValue(), minimumValue(), and maximumValue().
Returns the maximum value of the axis. Setting the axis to a value which is higher than this is not supported.
Note: Getter function for property maximumValue.
See also setMaximumValue(), minimumValue(), and defaultValue().
Returns the minimum value of the axis. Setting the axis to a value which is lower than this is not supported.
Note: Getter function for property minimumValue.
See also setMinimumValue(), maximumValue(), and defaultValue().
Returns the name of the axis, if provided by the font.
Note: Getter function for property name.
Sets the default value of this QFontVariableAxis to defaultValue.
Note: Typically, there will be no need to call this function as it will not affect the font itself, only this particular representation.
See also defaultValue().
Sets the maximum value of this QFontVariableAxis to maximumValue.
Note: Typically, there will be no need to call this function as it will not affect the font itself, only this particular representation.
See also maximumValue().
Sets the minimum value of this QFontVariableAxis to minimumValue.
Note: Typically, there will be no need to call this function as it will not affect the font itself, only this particular representation.
See also minimumValue().
Sets the name of this QFontVariableAxis to name.
Note: Typically, there will be no need to call this function as it will not affect the font itself, only this particular representation.
See also name().
Sets the tag of QFontVariableAxis to tag.
Note: Typically, there will be no need to call this function as it will not affect the font itself, only this particular representation.
See also 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.
See also setTag(), QFont::setVariableAxis(), and name().
Assigns the given axis to this QFontVariableAxis.
See also QFontVariableAxis().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.9/qfontvariableaxis.html