![]() |
Qt 6.x
The Qt SDK
|
Standard Windows font engine. More...
#include <qwindowsfontengine_p.h>
Protected Member Functions | |
void | initializeHeightMetrics () const override |
![]() | |
QFontEngine (Type type) | |
QFixed | firstLeftBearing (const QGlyphLayout &glyphs) |
QFixed | lastRightBearing (const QGlyphLayout &glyphs) |
QFixed | calculatedCapHeight () const |
virtual void | initializeHeightMetrics () const |
bool | processHheaTable () const |
bool | processOS2Table () const |
Standard Windows font engine.
Will probably be superseded by a common Free Type font engine in Qt 5.X.
Definition at line 31 of file qwindowsfontengine_p.h.
QWindowsFontEngine::QWindowsFontEngine | ( | const QString & | name, |
LOGFONT | lf, | ||
const QSharedPointer< QWindowsFontEngineData > & | fontEngineData | ||
) |
Definition at line 179 of file qwindowsfontengine.cpp.
References QFontEngine::cache_cost, QFontDef::fixedPitch, QFontEngine::fontDef, getCMap(), QWindowsFontEngineData::hdc, QFontDef::pixelSize, qCDebug, qErrnoWarning(), qPrintable, and QWindowsFontDatabaseBase::systemFont().
|
override |
Definition at line 213 of file qwindowsfontengine.cpp.
References QWindowsFontEngineData::hdc, QString::isEmpty(), pi, QGuiApplicationPrivate::platformIntegration(), qCDebug, qErrnoWarning(), and QWindowsFontDatabaseBase::systemFont().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 746 of file qwindowsfontengine.cpp.
References addGlyphToPath(), QFontEngine::fontDef, QWindowsFontEngineData::hdc, i, QFontDef::pixelSize, positions, and QFontDef::stretch.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 776 of file qwindowsfontengine.cpp.
References QFontEngine::addBitmapFontToPath(), and QFontEngine::addOutlineToPath().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 985 of file qwindowsfontengine.cpp.
References boundingBox(), QFontEngine::Format_A32, QFontEngine::Format_ARGB, QFontEngine::glyphMargin(), glyph_metrics_t::height, and glyph_metrics_t::width.
Create a qimage with the alpha values for the glyph. Returns an image indexed_8 with index values ranging from 0=fully transparent to 255=opaque
Reimplemented from QFontEngine.
Definition at line 71 of file qwindowsfontengine_p.h.
References alphaMapForGlyph().
Referenced by alphaMapForGlyph().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 999 of file qwindowsfontengine.cpp.
References QWindowsFontEngineData::clearTypeEnabled, font, QImage::Format_Alpha8, QImage::Format_RGB16, QImage::Format_RGB32, QWindowsFontEngineData::pow_gamma, qGray(), QImage::scanLine(), QWindowsNativeImage::systemFormat(), and xform.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 1053 of file qwindowsfontengine.cpp.
References QImage::depth(), font, QFontEngine::Format_A32, QImage::Format_RGB32, QFontEngine::glyphMargin(), QImage::scanLine(), SPI_GETFONTSMOOTHINGCONTRAST, and SPI_SETFONTSMOOTHINGCONTRAST.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 493 of file qwindowsfontengine.cpp.
|
inlineoverridevirtual |
Implements QFontEngine.
Definition at line 60 of file qwindowsfontengine_p.h.
References boundingBox().
Referenced by alphaMapBoundingBox(), and boundingBox().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 408 of file qwindowsfontengine.cpp.
References ch, QFixed::fromReal(), getOutlineMetrics(), QWindowsFontEngineData::hdc, qRound(), and glyph_metrics_t::transformed().
|
overridevirtual |
Implements QFontEngine.
Definition at line 472 of file qwindowsfontengine.cpp.
References QFontEngine::calculatedCapHeight(), capHeight(), QByteArray::constData(), QFontEngine::getSfntTable(), MAKE_TAG, and QByteArray::size().
Referenced by capHeight().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 1089 of file qwindowsfontengine.cpp.
References QWindowsFontDatabase::createEngine(), QWindowsFontDatabaseBase::defaultVerticalDPI(), QFontDef::families, QFontEngine::fontDef, QString::fromWCharArray(), QString::isEmpty(), pi, QGuiApplicationPrivate::platformIntegration(), request, and setUniqueFamilyName().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 825 of file qwindowsfontengine.cpp.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 792 of file qwindowsfontengine.cpp.
|
inline |
Definition at line 96 of file qwindowsfontengine_p.h.
void QWindowsFontEngine::getCMap | ( | ) |
Definition at line 97 of file qwindowsfontengine.cpp.
References QByteArray::constData(), QFile::encodeName(), QFontEngine::FaceId::filename, QFontEngine::fontDef, QFixed::fromReal(), QFontEngine::fsType, QFontEngine::getCMap(), getOutlineTextMetric(), QFontEngine::getSfntTable(), QWindowsFontEngineData::hdc, QFontEngine::FaceId::index, QFontEngine::loadKerningPairs(), MAKE_TAG, QFontDef::pixelSize, QByteArray::size(), stringFromOutLineTextMetric(), and QFontEngine::symbol.
Referenced by QWindowsFontEngine().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 529 of file qwindowsfontengine.cpp.
References QFontEngine::getGlyphBearings(), and QWindowsFontEngineData::hdc.
int QWindowsFontEngine::getGlyphIndexes | ( | const QChar * | ch, |
int | numChars, | ||
QGlyphLayout * | glyphs | ||
) | const |
Definition at line 135 of file qwindowsfontengine.cpp.
References QFontEngine::getTrueTypeGlyphIndex(), QGlyphLayout::glyphs, it, QGlyphLayout::numGlyphs, str, and QFontEngine::symbol.
Referenced by stringToCMap().
bool QWindowsFontEngine::getOutlineMetrics | ( | glyph_t | glyph, |
const QTransform & | t, | ||
glyph_metrics_t * | metrics | ||
) | const |
Definition at line 355 of file qwindowsfontengine.cpp.
References QWindowsFontEngineData::hdc, Q_ASSERT, QTransform::TxTranslate, and xform.
Referenced by boundingBox().
|
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 875 of file qwindowsfontengine.cpp.
References QWindowsFontEngineData::hdc, Q_ASSERT, and tag.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 857 of file qwindowsfontengine.cpp.
References addGlyphToPath(), QWindowsFontEngineData::hdc, synthesized(), and QFontEngine::SynthesizedItalic.
Implements QFontEngine.
Definition at line 236 of file qwindowsfontengine.cpp.
References QFontEngine::getTrueTypeGlyphIndex(), and QFontEngine::symbol.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 1115 of file qwindowsfontengine.cpp.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 556 of file qwindowsfontengine.cpp.
References QFontEngine::hasUnreliableGlyphOutline().
Definition at line 1120 of file qwindowsfontengine.cpp.
References QFontDef::families, QFontDef::fixedPitch, QFontEngine::fontDef, QString::fromWCharArray(), QWindowsFontEngineData::hdc, QFontDef::pixelSize, QFontDef::pointSize, qRound(), and request.
Referenced by QWindowsFontDatabase::createEngine().
|
overrideprotectedvirtual |
Reimplemented from QFontEngine.
Definition at line 547 of file qwindowsfontengine.cpp.
References QFontEngine::initializeHeightMetrics(), QFontEngine::m_ascent, QFontEngine::m_descent, and QFontEngine::m_leading.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 61 of file qwindowsfontengine.cpp.
References QFontEngine::lineThickness().
|
overridevirtual |
Implements QFontEngine.
Definition at line 498 of file qwindowsfontengine.cpp.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 561 of file qwindowsfontengine.cpp.
References minRightBearing().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 569 of file qwindowsfontengine.cpp.
References char_table, char_table_entries, QWindowsFontEngineData::hdc, i, max_font_count, qFloor(), and qMin().
Referenced by minLeftBearing().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 830 of file qwindowsfontengine.cpp.
References QFontEngine::convertToPostscriptFontFamilyName(), getOutlineTextMetric(), QWindowsFontEngineData::hdc, stringFromOutLineTextMetric(), and QString::toLatin1().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 284 of file qwindowsfontengine.cpp.
References QGlyphLayout::advances, calculateTTFGlyphWidth(), ch, QFontEngine::DesignMetrics, QGlyphLayout::glyphs, QWindowsFontEngineData::hdc, QChar::highSurrogate(), i, QChar::lowSurrogate(), QGlyphLayout::numGlyphs, Q_CHECK_PTR(), QChar::requiresSurrogates(), selectDesignFont(), SIZE, and QFixed::value().
Referenced by stringToCMap().
HGDIOBJ QWindowsFontEngine::selectDesignFont | ( | ) | const |
Definition at line 253 of file qwindowsfontengine.cpp.
References QWindowsFontEngineData::hdc.
Referenced by recalcAdvances().
Definition at line 98 of file qwindowsfontengine_p.h.
Referenced by cloneWithSize().
|
overridevirtual |
Implements QFontEngine.
Definition at line 262 of file qwindowsfontengine.cpp.
References getGlyphIndexes(), QFontEngine::GlyphIndicesOnly, QGlyphLayout::numGlyphs, Q_ASSERT, recalcAdvances(), and str.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 1137 of file qwindowsfontengine.cpp.
References QTransform::TxTranslate.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 801 of file qwindowsfontengine.cpp.
References QFontEngine::fontDef, QWindowsFontEngineData::hdc, MAKE_LITTLE_ENDIAN_TAG, qt_getUShort(), QFontDef::stretch, QFontEngine::SynthesizedBold, QFontEngine::SynthesizedItalic, and QFontEngine::SynthesizedStretch.
Referenced by getUnscaledGlyph().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 486 of file qwindowsfontengine.cpp.
References QFontEngine::xHeight().