Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
Standard Windows font engine. More...
#include <qwindowsfontengine_p.h>
Protected Member Functions | |
void | initializeHeightMetrics () const override |
Protected Member Functions inherited from QFontEngine | |
QFontEngine (Type type) | |
QFixed | firstLeftBearing (const QGlyphLayout &glyphs) |
QFixed | lastRightBearing (const QGlyphLayout &glyphs) |
QFixed | calculatedCapHeight () 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 186 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 220 of file qwindowsfontengine.cpp.
References QWindowsFontEngineData::hdc, QString::isEmpty(), QGuiApplicationPrivate::platformIntegration(), qCDebug, qErrnoWarning(), and QWindowsFontDatabaseBase::systemFont().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 754 of file qwindowsfontengine.cpp.
References addGlyphToPath(), QFontEngine::fontDef, QWindowsFontEngineData::hdc, i, QFontDef::pixelSize, positions, and QFontDef::stretch.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 784 of file qwindowsfontengine.cpp.
References QFontEngine::addBitmapFontToPath(), and QFontEngine::addOutlineToPath().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 993 of file qwindowsfontengine.cpp.
References boundingBox(), QFontEngine::Format_A32, QFontEngine::Format_ARGB, and QFontEngine::glyphMargin().
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 1007 of file qwindowsfontengine.cpp.
References QWindowsFontEngineData::clearTypeEnabled, font, QImage::Format_Alpha8, QImage::Format_RGB16, QImage::Format_RGB32, QWindowsFontEngineData::pow_gamma, qGray(), QWindowsNativeImage::systemFormat(), and xform.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 1061 of file qwindowsfontengine.cpp.
References QImage::depth(), font, QFontEngine::Format_A32, QImage::Format_RGB32, QFontEngine::glyphMargin(), SPI_GETFONTSMOOTHINGCONTRAST, and SPI_SETFONTSMOOTHINGCONTRAST.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 501 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 416 of file qwindowsfontengine.cpp.
References ch, QFixed::fromReal(), getOutlineMetrics(), QWindowsFontEngineData::hdc, qRound(), and glyph_metrics_t::transformed().
|
overridevirtual |
Implements QFontEngine.
Definition at line 480 of file qwindowsfontengine.cpp.
References QFontEngine::calculatedCapHeight(), capHeight(), QByteArray::constData(), QFontEngine::getSfntTable(), and QByteArray::size().
Referenced by capHeight().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 1097 of file qwindowsfontengine.cpp.
References QWindowsFontDatabase::createEngine(), QWindowsFontDatabaseBase::defaultVerticalDPI(), QFontDef::families, QFontEngine::fontDef, QString::fromWCharArray(), QString::isEmpty(), QGuiApplicationPrivate::platformIntegration(), request, and setUniqueFamilyName().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 833 of file qwindowsfontengine.cpp.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 800 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(), QFontDef::pixelSize, QByteArray::size(), stringFromOutLineTextMetric(), and QFontEngine::symbol.
Referenced by QWindowsFontEngine().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 537 of file qwindowsfontengine.cpp.
References QFontEngine::getGlyphBearings(), and QWindowsFontEngineData::hdc.
int QWindowsFontEngine::getGlyphIndexes | ( | const QChar * | ch, |
int | numChars, | ||
QGlyphLayout * | glyphs, | ||
int * | mappedGlyphs ) const |
Definition at line 135 of file qwindowsfontengine.cpp.
References QFontEngine::getTrueTypeGlyphIndex(), QGlyphLayout::glyphs, QFontEngine::isIgnorableChar(), 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 363 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 883 of file qwindowsfontengine.cpp.
References QWindowsFontEngineData::hdc, Q_ASSERT, and tag.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 865 of file qwindowsfontengine.cpp.
References addGlyphToPath(), QWindowsFontEngineData::hdc, synthesized(), QFontEngine::SynthesizedItalic, and QFixedPoint::x.
Implements QFontEngine.
Definition at line 243 of file qwindowsfontengine.cpp.
References QFontEngine::getTrueTypeGlyphIndex(), and QFontEngine::symbol.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 1123 of file qwindowsfontengine.cpp.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 564 of file qwindowsfontengine.cpp.
References QFontEngine::hasUnreliableGlyphOutline().
Definition at line 1128 of file qwindowsfontengine.cpp.
References QFontDef::families, QFontDef::fixedPitch, QFontEngine::fontDef, QString::fromWCharArray(), QWindowsFontEngineData::hdc, QFontDef::pixelSize, QFontDef::pointSize, qRound(), and request.
|
overrideprotectedvirtual |
Reimplemented from QFontEngine.
Definition at line 555 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 506 of file qwindowsfontengine.cpp.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 569 of file qwindowsfontengine.cpp.
References minRightBearing().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 577 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 838 of file qwindowsfontengine.cpp.
References QFontEngine::convertToPostscriptFontFamilyName(), QFontEngine::Properties::emSquare, getOutlineTextMetric(), QWindowsFontEngineData::hdc, and stringFromOutLineTextMetric().
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 292 of file qwindowsfontengine.cpp.
References QGlyphLayout::advances, calculateTTFGlyphWidth(), ch, QFontEngine::DesignMetrics, QGlyphLayout::glyphs, QWindowsFontEngineData::hdc, i, QGlyphLayout::numGlyphs, Q_CHECK_PTR(), selectDesignFont(), SIZE, and QFixed::value().
Referenced by stringToCMap().
HGDIOBJ QWindowsFontEngine::selectDesignFont | ( | ) | const |
Definition at line 260 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 269 of file qwindowsfontengine.cpp.
References getGlyphIndexes(), QFontEngine::GlyphIndicesOnly, QGlyphLayout::numGlyphs, Q_ASSERT, recalcAdvances(), and str.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 1145 of file qwindowsfontengine.cpp.
References QTransform::TxTranslate.
|
overridevirtual |
Reimplemented from QFontEngine.
Definition at line 809 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 494 of file qwindowsfontengine.cpp.
References QFontEngine::xHeight().