![]() |
Qt 6.x
The Qt SDK
|
Windows font engine using Direct Write. More...
#include <qwindowsfontenginedirectwrite_p.h>
Static Public Member Functions | |
static QString | fontNameSubstitute (const QString &familyName) |
![]() | |
static bool | scriptRequiresOpenType (QChar::Script script) |
static const uchar * | getCMap (const uchar *table, uint tableSize, bool *isSymbolFont, int *cmapSize) |
static quint32 | getTrueTypeGlyphIndex (const uchar *cmap, int cmapSize, uint unicode) |
static QByteArray | convertToPostscriptFontFamilyName (const QByteArray &fontFamily) |
Windows font engine using Direct Write.
Font engine for subpixel positioned text on Windows Vista (with platform update) and later. If selected during configuration, the engine will be selected only when the hinting preference of a font is set to None or Vertical hinting, or when fontengine=directwrite is selected as platform option.
Definition at line 38 of file qwindowsfontenginedirectwrite_p.h.
|
explicit |
Definition at line 194 of file qwindowsfontenginedirectwrite.cpp.
References QFontEngine::cache_cost, QFontEngine::fontDef, QFontEngine::m_ascent, QFontEngine::m_descent, QFontDef::pixelSize, Q_ASSERT, qCDebug, and QFixed::toInt().
|
override |
Definition at line 218 of file qwindowsfontenginedirectwrite.cpp.
References QPlatformIntegration::fontDatabase(), QString::isEmpty(), QGuiApplicationPrivate::platformIntegration(), and qCDebug.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 550 of file qwindowsfontenginedirectwrite.cpp.
References QVarLengthArray< T, Prealloc >::data(), QFontEngine::fontDef, i, QFontDef::pixelSize, positions, Q_UNUSED, and qErrnoWarning().
|
overridevirtual |
Reimplemented from QFontEngine.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 662 of file qwindowsfontenginedirectwrite.cpp.
References alphaMapForGlyph().
Referenced by alphaMapForGlyph().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 641 of file qwindowsfontenginedirectwrite.cpp.
References QImage::constScanLine(), QFontEngine::Format_A8, QImage::Format_Alpha8, QFontEngine::glyphMargin(), QImage::height(), QWindowsFontEngineData::pow_gamma, qGray(), QImage::scanLine(), and QImage::width().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 967 of file qwindowsfontenginedirectwrite.cpp.
References QFontEngine::Format_A32, QImage::Format_RGB32, QFontEngine::glyphMargin(), and xform.
|
overridevirtual |
Reimplemented from QFontEngine.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 581 of file qwindowsfontenginedirectwrite.cpp.
References QFontEngine::ascent(), QFontEngine::descent(), QGlyphLayout::effectiveAdvance(), QFontEngine::firstLeftBearing(), i, QFontEngine::lastRightBearing(), and QGlyphLayout::numGlyphs.
|
overridevirtual |
Implements QFontEngine.
Definition at line 594 of file qwindowsfontenginedirectwrite.cpp.
References DESIGN_TO_LOGICAL, glyphIndex(), and qErrnoWarning().
|
overridevirtual |
Implements QFontEngine.
Definition at line 623 of file qwindowsfontenginedirectwrite.cpp.
References QFontEngine::calculatedCapHeight().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 981 of file qwindowsfontenginedirectwrite.cpp.
References QPlatformIntegration::fontDatabase(), QFontEngine::fontDef, QString::isEmpty(), QFontDef::pixelSize, QGuiApplicationPrivate::platformIntegration(), and setUniqueFamilyName().
HFONT QWindowsFontEngineDirectWrite::createHFONT | ( | ) | const |
Definition at line 310 of file qwindowsfontenginedirectwrite.cpp.
References QFontEngine::fontDef, QFontDef::pixelSize, and qRound().
Referenced by draw_text_item_win(), and QWin32PrintEngine::drawTextItem().
|
inline |
Definition at line 95 of file qwindowsfontenginedirectwrite_p.h.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 408 of file qwindowsfontenginedirectwrite.cpp.
References QFontEngine::emSquareSize().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 464 of file qwindowsfontenginedirectwrite.cpp.
|
inline |
Definition at line 91 of file qwindowsfontenginedirectwrite_p.h.
Definition at line 1014 of file qwindowsfontenginedirectwrite.cpp.
References QString::isEmpty(), and QWinRegistryKey::stringValue().
Referenced by QWindowsFontDatabase::createEngine().
|
overridevirtual |
Returns true
if the font table idetified by tag exists in the font; returns false
otherwise.
If buffer is \nullptr, stores the size of the buffer required for the font table data, in bytes, in length. If buffer is not \nullptr and the capacity of the buffer, passed in length, is sufficient to store the font table data, also copies the font table data to buffer.
Note: returning false
when the font table exists could lead to an undefined behavior.
Reimplemented from QFontEngine.
Definition at line 381 of file qwindowsfontenginedirectwrite.cpp.
References Q_ASSERT, qErrnoWarning(), ret, and tag.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 503 of file qwindowsfontenginedirectwrite.cpp.
References qErrnoWarning().
Implements QFontEngine.
Definition at line 416 of file qwindowsfontenginedirectwrite.cpp.
References glyphIndex(), and qErrnoWarning().
Referenced by boundingBox(), and glyphIndex().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 998 of file qwindowsfontenginedirectwrite.cpp.
Definition at line 1003 of file qwindowsfontenginedirectwrite.cpp.
References QFontEngine::fontDef, QFontDef::pixelSize, QFontDef::pointSize, qRound(), and request.
Referenced by QWindowsFontDatabase::createEngine().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 326 of file qwindowsfontenginedirectwrite.cpp.
References DESIGN_TO_LOGICAL, QFontEngine::initializeHeightMetrics(), QFontEngine::m_ascent, QFontEngine::m_descent, and QFontEngine::m_leading.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 373 of file qwindowsfontenginedirectwrite.cpp.
References QFontEngine::lineThickness().
|
overridevirtual |
Implements QFontEngine.
Definition at line 636 of file qwindowsfontenginedirectwrite.cpp.
References QFixed::toReal().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 673 of file qwindowsfontenginedirectwrite.cpp.
References QFontEngine::properties().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 469 of file qwindowsfontenginedirectwrite.cpp.
References QGlyphLayout::advances, QFont::AnyStretch, QVarLengthArray< T, Prealloc >::data(), DESIGN_TO_LOGICAL, QFontEngine::fontDef, QGlyphLayout::glyphs, hintingPreferenceToRenderingMode(), i, QGlyphLayout::numGlyphs, QFontDef::pixelSize, qErrnoWarning(), QVLABaseBase::size(), and QFontDef::stretch.
Referenced by stringToCMap().
Definition at line 97 of file qwindowsfontenginedirectwrite_p.h.
Referenced by cloneWithSize().
|
overridevirtual |
Implements QFontEngine.
Definition at line 429 of file qwindowsfontenginedirectwrite.cpp.
References QVarLengthArray< T, Prealloc >::at(), QVarLengthArray< T, Prealloc >::data(), QFontEngine::GlyphIndicesOnly, QGlyphLayout::glyphs, i, it, QGlyphLayout::numGlyphs, Q_ASSERT, qErrnoWarning(), recalcAdvances(), and str.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 668 of file qwindowsfontenginedirectwrite.cpp.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 365 of file qwindowsfontenginedirectwrite.cpp.
References QFontEngine::underlinePosition().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 631 of file qwindowsfontenginedirectwrite.cpp.