53 #include <private/qapplication_p.h> 55 #include <private/qunicodetables_p.h> 69 if (lf.lfWeight != FW_DONTCARE)
71 int lfh =
qAbs(lf.lfHeight);
94 pSize = fd.
pixelSize * 72. / ((float)dpi);
118 engine = static_cast<QFontEngineMulti *>(engine)->engine(0);
120 return static_cast<QFontEngineWin *>(engine)->hfont;
static QString fromWCharArray(const wchar_t *, int size=-1)
Returns a copy of the string, where the encoding of string depends on the size of wchar...
#define QT_END_NAMESPACE
This macro expands to.
void setUnderline(bool)
If enable is true, sets underline on; otherwise sets underline off.
QString lastResortFamily() const
Returns the "last resort" font family name.
Weight
Qt uses a weighting scale from 0 to 99 similar to, but not the same as, the scales used in Windows or...
QFont::Weight weightFromInteger(int weight)
static void cleanup()
Internal function that cleans up the font system.
The QString class provides a Unicode character string.
void setItalic(bool b)
Sets the style() of the font to QFont::StyleItalic if enable is true; otherwise the style is set to Q...
HFONT handle() const
Returns the window system handle to the font, for low-level access.
Q_DECL_CONSTEXPR T qAbs(const T &t)
virtual Type type() const =0
void setFamily(const QString &)
Sets the family name of the font.
QString rawName() const
Returns the name of the font within the underlying window system.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static float pixelSize(const QFontDef &request, int dpi)
static void initialize()
Internal function that initializes the font system.
void setStrikeOut(bool)
If enable is true, sets strikeout on; otherwise sets strikeout off.
QFontEngine * engineForScript(int script) const
QString lastResortFont() const
Returns a "last resort" font name for the font matching algorithm.
The QFont class specifies a font used for drawing text.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
QString family() const
Returns the requested font family name, i.e.
void setOverline(bool)
If enable is true, sets overline on; otherwise sets overline off.
QExplicitlySharedDataPointer< QFontPrivate > d
void setWeight(int)
Sets the weight the font to weight, which should be a value from the QFont::Weight enumeration...
QString defaultFamily() const
Returns the family name that corresponds to the current style hint.
void setPointSizeF(qreal)
Sets the point size to pointSize.
void setRawName(const QString &)
Sets a font by its system specific name.
QFont qt_LOGFONTtoQFont(LOGFONT &lf, bool)
static float pointSize(const QFontDef &fd, int dpi)