// Copyright (C) 2016 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QFONTINFO_H #define QFONTINFO_H #include #include #include QT_BEGIN_NAMESPACE class Q_GUI_EXPORT QFontInfo { public: QFontInfo(const QFont &); QFontInfo(const QFontInfo &); ~QFontInfo(); QFontInfo &operator=(const QFontInfo &); void swap(QFontInfo &other) noexcept { d.swap(other.d); } QString family() const; QString styleName() const; int pixelSize() const; int pointSize() const; qreal pointSizeF() const; bool italic() const; QFont::Style style() const; int weight() const; inline bool bold() const { return weight() > QFont::Normal; } bool underline() const; bool overline() const; bool strikeOut() const; bool fixedPitch() const; QFont::StyleHint styleHint() const; #if QT_DEPRECATED_SINCE(6, 0) QT_DEPRECATED_VERSION_X_6_0("Use weight() instead") int legacyWeight() const; #endif bool exactMatch() const; private: QExplicitlySharedDataPointer d; }; Q_DECLARE_SHARED(QFontInfo) QT_END_NAMESPACE #endif // QFONTINFO_H