49 #if defined(Q_WS_X11) || defined(Q_WS_QWS)
62 class Q3TextFormatCollection;
70 Helvetica, SansSerif = Helvetica,
72 Courier, TypeWriter = Courier,
82 PreferDefault = 0x0001,
83 PreferBitmap = 0x0002,
84 PreferDevice = 0x0004,
85 PreferOutline = 0x0008,
86 ForceOutline = 0x0010,
88 PreferQuality = 0x0040,
89 PreferAntialias = 0x0080,
91 OpenGLCompatible = 0x0200,
92 ForceIntegerMetrics = 0x0400,
93 NoFontMerging = 0x8000
97 PreferDefaultHinting = 0,
99 PreferVerticalHinting = 2,
100 PreferFullHinting = 3
143 FamilyResolved = 0x0001,
144 SizeResolved = 0x0002,
145 StyleHintResolved = 0x0004,
146 StyleStrategyResolved = 0x0008,
147 WeightResolved = 0x0010,
148 StyleResolved = 0x0020,
149 UnderlineResolved = 0x0040,
150 OverlineResolved = 0x0080,
151 StrikeOutResolved = 0x0100,
152 FixedPitchResolved = 0x0200,
153 StretchResolved = 0x0400,
154 KerningResolved = 0x0800,
155 CapitalizationResolved = 0x1000,
156 LetterSpacingResolved = 0x2000,
157 WordSpacingResolved = 0x4000,
158 HintingPreferenceResolved = 0x8000,
159 StyleNameResolved = 0x10000,
160 AllPropertiesResolved = 0x1ffff
164 QFont(
const QString &family,
int pointSize = -1,
int weight = -1,
bool italic =
false);
166 QFont(
const QFont &);
170 void setFamily(
const QString &);
173 void setStyleName(
const QString &);
175 int pointSize()
const;
176 void setPointSize(
int);
177 qreal pointSizeF()
const;
178 void setPointSizeF(qreal);
180 int pixelSize()
const;
181 void setPixelSize(
int);
186 inline bool bold()
const;
187 inline void setBold(
bool);
189 void setStyle(Style style);
192 inline bool italic()
const;
193 inline void setItalic(
bool b);
195 bool underline()
const;
196 void setUnderline(
bool);
198 bool overline()
const;
199 void setOverline(
bool);
201 bool strikeOut()
const;
202 void setStrikeOut(
bool);
204 bool fixedPitch()
const;
205 void setFixedPitch(
bool);
207 bool kerning()
const;
208 void setKerning(
bool);
210 StyleHint styleHint()
const;
211 StyleStrategy styleStrategy()
const;
212 void setStyleHint(StyleHint, StyleStrategy = PreferDefault);
213 void setStyleStrategy(StyleStrategy
s);
216 void setStretch(
int);
218 qreal letterSpacing()
const;
219 SpacingType letterSpacingType()
const;
220 void setLetterSpacing(SpacingType
type, qreal spacing);
222 qreal wordSpacing()
const;
223 void setWordSpacing(qreal spacing);
225 void setCapitalization(Capitalization);
226 Capitalization capitalization()
const;
228 void setHintingPreference(HintingPreference hintingPreference);
229 HintingPreference hintingPreference()
const;
232 bool rawMode()
const;
233 void setRawMode(
bool);
236 bool exactMatch()
const;
238 QFont &operator=(
const QFont &);
242 operator QVariant()
const;
243 bool isCopyOf(
const QFont &)
const;
244 #ifdef Q_COMPILER_RVALUE_REFS
245 inline QFont &operator=(QFont &&other)
246 {
qSwap(d, other.d);
qSwap(resolve_mask, other.resolve_mask);
return *
this; }
250 HFONT handle()
const;
257 #if defined(Q_WS_X11) || defined(Q_WS_QWS)
262 void setRawName(
const QString &);
268 bool fromString(
const QString &);
271 static QStringList substitutes(
const QString &);
272 static QStringList substitutions();
274 static void insertSubstitutions(
const QString&,
const QStringList &);
275 static void removeSubstitution(
const QString &);
276 static void initialize();
277 static void cleanup();
279 static void cacheStatistics();
283 QString lastResortFamily()
const;
284 QString lastResortFont()
const;
286 QFont resolve(
const QFont &)
const;
287 inline uint
resolve()
const {
return resolve_mask; }
291 static QT3_SUPPORT QFont defaultFont();
292 static QT3_SUPPORT
void setDefaultFont(
const QFont &);
293 QT3_SUPPORT
void setPixelSizeFloat(qreal);
294 QT3_SUPPORT qreal pointSizeFloat()
const {
return pointSizeF(); }
295 QT3_SUPPORT
void setPointSizeFloat(qreal
size) { setPointSizeF(size); }
299 QFont(QFontPrivate *);
303 #if defined(Q_WS_MAC)
305 #elif defined(Q_WS_X11)
306 void x11SetScreen(
int screen = -1);
307 int x11Screen()
const;
310 friend class QFontPrivate;
311 friend class QFontDialogPrivate;
316 friend class QPainterPrivate;
317 friend class QPSPrintEngineFont;
320 friend class QWidgetPrivate;
321 friend class Q3TextFormatCollection;
323 friend class QTextEngine;
324 friend class QStackTextEngine;
326 friend struct QScriptLine;
328 friend class QWin32PaintEngine;
329 friend class QAlphaPaintEngine;
331 friend class QTextItemInt;
332 friend class QPicturePaintEngine;
333 friend class QPainterReplayer;
334 friend class QPaintBufferEngine;
335 friend class QCommandLinkButtonPrivate;
336 friend class QFontEngine;
338 #ifndef QT_NO_DATASTREAM
369 #ifndef QT_NO_DATASTREAM
374 #ifndef QT_NO_DEBUG_STREAM
GLuint GLuint GLsizei GLenum type
bool operator==(const Attribute &cA, const AttributeInstance< type > &cB)
This operator compares the two attributes and NOT their values.
#define QT_BEGIN_NAMESPACE
struct FT_FaceRec_ * FT_Face
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QFont &)
void setStyle(Style style)
bool operator!=(const QByteArray &a1, const QByteArray &a2)
bool operator<(const QByteArray &a1, const QByteArray &a2)
Q_GUI_EXPORT QDataStream & operator<<(QDataStream &, const QFont &)