Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
The QFont::Tag type provides access to advanced font features. More...
#include <qfont.h>
Public Member Functions | |
constexpr | Tag ()=default |
Default constructor, producing an invalid tag. | |
template<size_t N> | |
constexpr Q_IMPLICIT | Tag (const char(&str)[N]) noexcept |
Constructs a tag from a string literal, str. | |
constexpr bool | isValid () const noexcept |
Returns whether the tag is valid. | |
constexpr quint32 | value () const noexcept |
Returns the numerical value of this tag. | |
QByteArray | toString () const |
Returns the string representation of this tag as a byte array. | |
Static Public Member Functions | |
static constexpr std::optional< Tag > | fromValue (quint32 value) noexcept |
Returns a tag constructed from value, or std::nullopt if the tag produced would be invalid. | |
static Q_GUI_EXPORT std::optional< Tag > | fromString (QAnyStringView view) noexcept |
Returns a tag constructed from the string in view. | |
Friends | |
Q_GUI_EXPORT QDataStream & | operator<< (QDataStream &, Tag) |
Q_GUI_EXPORT QDataStream & | operator>> (QDataStream &, Tag &) |
Data stream operators for QFont::Tag. | |
Q_GUI_EXPORT QDebug | operator<< (QDebug debug, Tag tag) |
constexpr size_t | qHash (Tag key, size_t seed=0) noexcept |
Returns the hash value for key, using seed to seed the calculation. | |
constexpr bool | comparesEqual (const Tag &lhs, const Tag &rhs) noexcept |
constexpr Qt::strong_ordering | compareThreeWay (const Tag &lhs, const Tag &rhs) noexcept |
Compare lhs with rhs for equality and ordering. | |
Related Symbols | |
(Note that these are not member symbols.) | |
QDataStream & | operator>> (QDataStream &, QFont::Tag &) |
Data stream operators for QFont::Tag. | |
The QFont::Tag type provides access to advanced font features.
QFont provides access to advanced features when shaping text. A feature is defined by a tag, which can be represented as a four-character string, or as a 32bit integer value. This type represents such a tag in a type-safe way. It can be constructed from a four-character, 8bit string literal, or from a corresponding 32bit integer value. Using a shorter or longer string literal will result in a compile-time error.
The named constructors allow to create a tag from an 32bit integer or string value, and will return a std::nullopt
when the input is invalid.
|
constexprdefault |
Default constructor, producing an invalid tag.
|
inlineconstexprnoexcept |
Constructs a tag from a string literal, str.
The literal must be exactly four characters long.
|
staticnoexcept |
Returns a tag constructed from the string in view.
The string must be exactly four characters long.
Returns std::nullopt
if the input is not four characters long, or if the tag produced would be invalid.
Definition at line 2376 of file qfont.cpp.
References fromString(), qWarning, and view.
Referenced by fromString().
|
inlinestaticconstexprnoexcept |
|
inlineconstexprnoexcept |
Returns whether the tag is valid.
A tag is valid if its value is not zero.
|
inline |
Returns the string representation of this tag as a byte array.
Definition at line 229 of file qfont.h.
References QByteArray().
|
inlineconstexprnoexcept |
Returns the numerical value of this tag.
Definition at line 227 of file qfont.h.
Referenced by QFreeTypeFontDatabase::addNamedInstancesForFace(), bindFont(), calculateActualItalic(), calculateActualWeight(), generateGlyphTables(), generateHead(), generateHhea(), generateMaxp(), generateName(), getFontDescription(), and QFontSubset::toTruetype().
|
friend |
|
friend |
|
friend |
|
related |
Data stream operators for QFont::Tag.
|
friend |
Data stream operators for QFont::Tag.
|
friend |