7#include <QtCore/qshareddata.h>
8#include <QtGui/qtguiglobal.h>
9#include <QtGui/qwindowdefs.h>
10#include <QtCore/qstring.h>
27 OldEnglish, Decorative = OldEnglish,
37 PreferDefault = 0x0001,
38 PreferBitmap = 0x0002,
39 PreferDevice = 0x0004,
40 PreferOutline = 0x0008,
41 ForceOutline = 0x0010,
43 PreferQuality = 0x0040,
44 PreferAntialias = 0x0080,
46 NoSubpixelAntialias = 0x0800,
47 PreferNoShaping = 0x1000,
48 NoFontMerging = 0x8000
53 PreferDefaultHinting = 0,
55 PreferVerticalHinting = 2,
110 NoPropertiesResolved = 0x0000,
111 FamilyResolved = 0x0001,
112 SizeResolved = 0x0002,
113 StyleHintResolved = 0x0004,
114 StyleStrategyResolved = 0x0008,
115 WeightResolved = 0x0010,
116 StyleResolved = 0x0020,
117 UnderlineResolved = 0x0040,
118 OverlineResolved = 0x0080,
119 StrikeOutResolved = 0x0100,
120 FixedPitchResolved = 0x0200,
121 StretchResolved = 0x0400,
122 KerningResolved = 0x0800,
123 CapitalizationResolved = 0x1000,
124 LetterSpacingResolved = 0x2000,
125 WordSpacingResolved = 0x4000,
126 HintingPreferenceResolved = 0x8000,
127 StyleNameResolved = 0x10000,
128 FamiliesResolved = 0x20000,
129 FeaturesResolved = 0x40000,
130 AllPropertiesResolved = 0x7ffff
136 QFont(
const QString &family,
int pointSize = -1,
int weight = -1,
bool italic =
false);
143 {
d.swap(
other.d); std::swap(resolve_mask,
other.resolve_mask); }
146 void setFamily(
const QString &);
152 void setStyleName(
const QString &);
154 int pointSize()
const;
155 void setPointSize(
int);
156 qreal pointSizeF()
const;
157 void setPointSizeF(
qreal);
159 int pixelSize()
const;
160 void setPixelSize(
int);
163 void setWeight(Weight
weight);
165 inline bool bold()
const;
166 inline void setBold(
bool);
171 inline bool italic()
const;
172 inline void setItalic(
bool b);
174 bool underline()
const;
175 void setUnderline(
bool);
177 bool overline()
const;
178 void setOverline(
bool);
180 bool strikeOut()
const;
181 void setStrikeOut(
bool);
183 bool fixedPitch()
const;
184 void setFixedPitch(
bool);
187 void setKerning(
bool);
189 StyleHint styleHint()
const;
190 StyleStrategy styleStrategy()
const;
191 void setStyleHint(StyleHint, StyleStrategy = PreferDefault);
192 void setStyleStrategy(StyleStrategy
s);
195 void setStretch(
int);
197 qreal letterSpacing()
const;
198 SpacingType letterSpacingType()
const;
201 qreal wordSpacing()
const;
204 void setCapitalization(Capitalization);
205 Capitalization capitalization()
const;
207 void setHintingPreference(HintingPreference hintingPreference);
208 HintingPreference hintingPreference()
const;
213 void unsetFeature(
const char *feature);
217 void clearFeatures();
223 bool exactMatch()
const;
230 bool isCopyOf(
const QFont &)
const;
231 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(
QFont)
243 static void removeSubstitutions(
const QString &);
245 static void cleanup();
246 static void cacheStatistics();
254#if QT_DEPRECATED_SINCE(6, 0)
281 friend class QWin32PaintEngine;
286 friend class QPainterReplayer;
287 friend class QPaintBufferEngine;
291#ifndef QT_NO_DATASTREAM
296#ifndef QT_NO_DEBUG_STREAM
304Q_DECLARE_SHARED(
QFont)
329#ifndef QT_NO_DATASTREAM
334#ifndef QT_NO_DEBUG_STREAM
The QApplication class manages the GUI application's control flow and main settings.
\inmodule QtCore\reentrant
\reentrant \inmodule QtGui
\reentrant \inmodule QtGui
StyleHint
Style hints are used by the \l{QFont}{font matching} algorithm to find an appropriate default family ...
void setStyle(Style style)
Sets the style of the font to style.
bool italic() const
Returns true if the style() of the font is not QFont::StyleNormal.
void swap(QFont &other) noexcept
void setBold(bool)
If enable is true sets the font's weight to \l{Weight}{QFont::Bold}; otherwise sets the weight to \l{...
void setItalic(bool b)
Sets the style() of the font to QFont::StyleItalic if enable is true; otherwise the style is set to Q...
void setResolveMask(uint mask)
Stretch
Predefined stretch values that follow the CSS naming convention.
Style style() const
Returns the style of the font.
StyleStrategy
The style strategy tells the \l{QFont}{font matching} algorithm what type of fonts should be used to ...
Weight
Qt uses a weighting scale from 1 to 1000 compatible with OpenType.
void setWeight(Weight weight)
Sets the weight of the font to weight, using the scale defined by \l QFont::Weight enumeration.
Style
This enum describes the different styles of glyphs that are used to display text.
The QPainter class performs low-level painting on widgets and other paint devices.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
constexpr bool operator!=(const timespec &t1, const timespec &t2)
AudioChannelLayoutTag tag
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Q_GUI_EXPORT QDataStream & operator<<(QDataStream &, const QFont &)
Q_GUI_EXPORT size_t qHash(const QFont &font, size_t seed=0) noexcept
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QFont &)
static QFixed kerning(int left, int right, const QFontEngine::KernPair *pairs, int numPairs)
GLboolean GLboolean GLboolean b
GLuint GLuint GLfloat weight
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
static bool fromString(const QMetaObject *mo, QString s, Allocate &&allocate)
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
static bool operator<(const QSettingsIniKey &k1, const QSettingsIniKey &k2)
#define QT_DEPRECATED_VERSION_X_6_0(text)
char * toString(const MyType &t)
[31]