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>.
Loading...
Searching...
No Matches
QFontEngineFT Class Reference

#include <qfontengine_ft_p.h>

+ Inheritance diagram for QFontEngineFT:
+ Collaboration diagram for QFontEngineFT:

Classes

struct  GlyphAndSubPixelPosition
 
struct  GlyphInfo
 
struct  QGlyphSet
 

Public Types

enum  Scaling { Scaled , Unscaled }
 
- Public Types inherited from QFontEngine
enum  Type {
  Box , Multi , Win , Mac ,
  Freetype , QPF1 , QPF2 , Proxy ,
  DirectWrite , TestFontEngine = 0x1000
}
 
enum  GlyphFormat {
  Format_None , Format_Render = Format_None , Format_Mono , Format_A8 ,
  Format_A32 , Format_ARGB
}
 
enum  ShaperFlag { DesignMetrics = 0x0002 , GlyphIndicesOnly = 0x0004 , FullStringFallback = 0x008 }
 
enum  SynthesizedFlags { SynthesizedItalic = 0x1 , SynthesizedBold = 0x2 , SynthesizedStretch = 0x4 }
 
enum  HintStyle { HintNone , HintLight , HintMedium , HintFull }
 
enum  SubpixelAntialiasingType {
  Subpixel_None , Subpixel_RGB , Subpixel_BGR , Subpixel_VRGB ,
  Subpixel_VBGR
}
 

Public Member Functions

QFontEngine::FaceId faceId () const override
 
QFontEngine::Properties properties () const override
 
QFixed emSquareSize () const override
 
bool supportsHorizontalSubPixelPositions () const override
 
bool supportsVerticalSubPixelPositions () const override
 
bool getSfntTableData (uint tag, uchar *buffer, uint *length) const override
 Returns true if the font table idetified by tag exists in the font; returns false otherwise.
 
int synthesized () const override
 
void initializeHeightMetrics () const override
 
QFixed capHeight () const override
 
QFixed xHeight () const override
 
QFixed averageCharWidth () const override
 
qreal maxCharWidth () const override
 
QFixed lineThickness () const override
 
QFixed underlinePosition () const override
 
glyph_t glyphIndex (uint ucs4) const override
 
void doKerning (QGlyphLayout *, ShaperFlags) const override
 
void getUnscaledGlyph (glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics) override
 
bool supportsTransformation (const QTransform &transform) const override
 
void addGlyphsToPath (glyph_t *glyphs, QFixedPoint *positions, int nglyphs, QPainterPath *path, QTextItem::RenderFlags flags) override
 
void addOutlineToPath (qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags) override
 
int stringToCMap (const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const override
 
glyph_metrics_t boundingBox (const QGlyphLayout &glyphs) override
 
glyph_metrics_t boundingBox (glyph_t glyph) override
 
glyph_metrics_t boundingBox (glyph_t glyph, const QTransform &matrix) override
 
void recalcAdvances (QGlyphLayout *glyphs, ShaperFlags flags) const override
 
QImage alphaMapForGlyph (glyph_t g) override
 
QImage alphaMapForGlyph (glyph_t, const QFixedPoint &) override
 
QImage alphaMapForGlyph (glyph_t glyph, const QFixedPoint &subPixelPosition, const QTransform &t) override
 
QImage alphaRGBMapForGlyph (glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t) override
 
QImage bitmapForGlyph (glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t, const QColor &color) override
 
glyph_metrics_t alphaMapBoundingBox (glyph_t glyph, const QFixedPoint &subPixelPosition, const QTransform &matrix, QFontEngine::GlyphFormat format) override
 
GlyphglyphData (glyph_t glyph, const QFixedPoint &subPixelPosition, GlyphFormat neededFormat, const QTransform &t) override
 
bool hasInternalCaching () const override
 
bool expectsGammaCorrectedBlending () const override
 
void removeGlyphFromCache (glyph_t glyph) override
 
int glyphMargin (QFontEngine::GlyphFormat) override
 
int glyphCount () const override
 
FT_Face lockFace (Scaling scale=Scaled) const
 
void unlockFace () const
 
FT_Face non_locked_face () const
 
bool drawAntialiased () const
 
bool invalid () const
 
bool isBitmapFont () const
 
bool isScalableBitmap () const
 
GlyphloadGlyph (uint glyph, const QFixedPoint &subPixelPosition, GlyphFormat format=Format_None, bool fetchMetricsOnly=false, bool disableOutlineDrawing=false) const
 
GlyphloadGlyph (QGlyphSet *set, uint glyph, const QFixedPoint &subPixelPosition, GlyphFormat=Format_None, bool fetchMetricsOnly=false, bool disableOutlineDrawing=false) const
 
GlyphloadGlyphFor (glyph_t g, const QFixedPoint &subPixelPosition, GlyphFormat format, const QTransform &t, bool fetchBoundingBox=false, bool disableOutlineDrawing=false)
 
QGlyphSetloadGlyphSet (const QTransform &matrix)
 
 QFontEngineFT (const QFontDef &fd)
 
virtual ~QFontEngineFT ()
 
bool init (FaceId faceId, bool antiaalias, GlyphFormat defaultFormat=Format_None, const QByteArray &fontData=QByteArray())
 
bool init (FaceId faceId, bool antialias, GlyphFormat format, QFreetypeFace *freetypeFace)
 
int getPointInOutline (glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints) override
 
void setQtDefaultHintStyle (QFont::HintingPreference hintingPreference)
 
void setDefaultHintStyle (HintStyle style) override
 
QFontEnginecloneWithSize (qreal pixelSize) const override
 
Qt::HANDLE handle () const override
 
bool initFromFontEngine (const QFontEngineFT *fontEngine)
 
HintStyle defaultHintStyle () const
 
- Public Member Functions inherited from QFontEngine
virtual ~QFontEngine ()
 
Type type () const
 
QByteArray getSfntTable (uint tag) const
 
bool supportsSubPixelPositions () const
 
virtual QFixedPoint subPixelPositionFor (const QFixedPoint &position) const
 
QFixed subPixelPositionForX (QFixed x) const
 
bool isColorFont () const
 
void getGlyphPositions (const QGlyphLayout &glyphs, const QTransform &matrix, QTextItem::RenderFlags flags, QVarLengthArray< glyph_t > &glyphs_out, QVarLengthArray< QFixedPoint > &positions)
 
void addBitmapFontToPath (qreal x, qreal y, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags)
 
virtual QImage alphaMapForGlyph (glyph_t, const QTransform &t)
 
glyph_metrics_t tightBoundingBox (const QGlyphLayout &glyphs)
 
virtual QFixed ascent () const
 
virtual QFixed descent () const
 
virtual QFixed leading () const
 
virtual qreal minLeftBearing () const
 
virtual qreal minRightBearing () const
 
virtual void getGlyphBearings (glyph_t glyph, qreal *leftBearing=nullptr, qreal *rightBearing=nullptr)
 
bool canRender (uint ucs4) const
 
virtual bool canRender (const QChar *str, int len) const
 
voidharfbuzzFont () const
 
voidharfbuzzFace () const
 
bool supportsScript (QChar::Script script) const
 
void clearGlyphCache (const void *key)
 
void setGlyphCache (const void *key, QFontEngineGlyphCache *data)
 
QFontEngineGlyphCacheglyphCache (const void *key, GlyphFormat format, const QTransform &transform, const QColor &color=QColor()) const
 
virtual bool hasUnreliableGlyphOutline () const
 
void loadKerningPairs (QFixed scalingFactor)
 

Static Public Member Functions

static QFontEngineFTcreate (const QFontDef &fontDef, FaceId faceId, const QByteArray &fontData=QByteArray())
 
static QFontEngineFTcreate (const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference, const QMap< QFont::Tag, float > &variableAxisValue)
 
- Static Public Member Functions inherited from QFontEngine
static bool isIgnorableChar (char32_t ucs4)
 
static bool scriptRequiresOpenType (QChar::Script script)
 
static const uchargetCMap (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)
 

Protected Attributes

QFreetypeFacefreetype
 
int default_load_flags
 
HintStyle default_hint_style
 
bool antialias
 
bool transform
 
bool embolden
 
bool obliquen
 
SubpixelAntialiasingType subpixelType
 
int lcdFilterType
 
bool embeddedbitmap
 
bool cacheEnabled
 
bool forceAutoHint
 
bool stemDarkeningDriver
 
- Protected Attributes inherited from QFontEngine
QFixed m_ascent
 
QFixed m_descent
 
QFixed m_leading
 
bool m_heightMetricsQueried
 

Friends

class QFontEngineFTRawFont
 
class QFontconfigDatabase
 
class QFreeTypeFontDatabase
 
class QFontEngineMultiFontConfig
 

Additional Inherited Members

- Public Attributes inherited from QFontEngine
QAtomicInt ref
 
QFontDef fontDef
 
Holder font_
 
Holder face_
 
struct QFontEngine::FaceData faceData
 
uint cache_cost
 
uint fsType: 16
 
bool symbol
 
bool isSmoothlyScalable
 
QList< KernPairkerning_pairs
 
GlyphFormat glyphFormat
 
int m_subPixelPositionCount
 
- 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
 

Detailed Description

Definition at line 99 of file qfontengine_ft_p.h.

Member Enumeration Documentation

◆ Scaling

Enumerator
Scaled 
Unscaled 

Definition at line 217 of file qfontengine_ft_p.h.

Constructor & Destructor Documentation

◆ QFontEngineFT()

QFontEngineFT::QFontEngineFT ( const QFontDef & fd)

Definition at line 794 of file qfontengine_ft.cpp.

References antialias, QFontEngine::cache_cost, cacheEnabled, default_hint_style, default_load_flags, embeddedbitmap, embolden, QFontEngine::fontDef, forceAutoHint, QFontEngine::Format_None, freetype, ftInitialDefaultHintStyle, QByteArray::isEmpty(), lcdFilterType, QFontEngine::m_subPixelPositionCount, obliquen, qgetenv(), stemDarkeningDriver, QFontEngine::Subpixel_None, subpixelType, and QByteArray::toInt().

Referenced by cloneWithSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~QFontEngineFT()

QFontEngineFT::~QFontEngineFT ( )
virtual

Definition at line 822 of file qfontengine_ft.cpp.

References freetype, and QFreetypeFace::release().

+ Here is the call graph for this function:

Member Function Documentation

◆ addGlyphsToPath()

void QFontEngineFT::addGlyphsToPath ( glyph_t * glyphs,
QFixedPoint * positions,
int nglyphs,
QPainterPath * path,
QTextItem::RenderFlags flags )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1627 of file qfontengine_ft.cpp.

References QFreetypeFace::addGlyphToPath(), embolden, lockFace(), obliquen, positions, unlockFace(), and Unscaled.

+ Here is the call graph for this function:

◆ addOutlineToPath()

void QFontEngineFT::addOutlineToPath ( qreal x,
qreal y,
const QGlyphLayout & glyphs,
QPainterPath * path,
QTextItem::RenderFlags flags )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1603 of file qfontengine_ft.cpp.

References QFreetypeFace::addBitmapToPath(), QFontEngine::addOutlineToPath(), QFreetypeFace::face, freetype, QFontEngine::getGlyphPositions(), lockFace(), QGlyphLayout::numGlyphs, positions, QTransform::translate(), unlockFace(), and Unscaled.

+ Here is the call graph for this function:

◆ alphaMapBoundingBox()

glyph_metrics_t QFontEngineFT::alphaMapBoundingBox ( glyph_t glyph,
const QFixedPoint & subPixelPosition,
const QTransform & matrix,
QFontEngine::GlyphFormat format )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1944 of file qfontengine_ft.cpp.

References cacheEnabled, CEIL, emptyGlyph, QFreetypeFace::face, FLOOR, QFontEngine::Format_A8, QFontEngine::Format_Mono, freetype, isScalableBitmap(), loadGlyphFor(), lockFace(), ROUND, TRUNC, QTransform::TxTranslate, unlockFace(), and glyph_metrics_t::x.

Referenced by boundingBox().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ alphaMapForGlyph() [1/3]

QImage QFontEngineFT::alphaMapForGlyph ( glyph_t glyph)
inlineoverridevirtual

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 196 of file qfontengine_ft_p.h.

References alphaMapForGlyph().

Referenced by alphaMapForGlyph(), and alphaMapForGlyph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ alphaMapForGlyph() [2/3]

QImage QFontEngineFT::alphaMapForGlyph ( glyph_t glyph,
const QFixedPoint & subPixelPosition,
const QTransform & t )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 2079 of file qfontengine_ft.cpp.

References alphaMapFromGlyphData(), antialias, cacheEnabled, emptyGlyph, QFreetypeFace::face, QFontEngine::Format_A8, QFontEngine::Format_Mono, freetype, loadGlyphFor(), Qt::SmoothTransformation, and QTransform::TxTranslate.

+ Here is the call graph for this function:

◆ alphaMapForGlyph() [3/3]

QImage QFontEngineFT::alphaMapForGlyph ( glyph_t g,
const QFixedPoint & subPixelPosition )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 2074 of file qfontengine_ft.cpp.

References alphaMapForGlyph().

+ Here is the call graph for this function:

◆ alphaRGBMapForGlyph()

QImage QFontEngineFT::alphaRGBMapForGlyph ( glyph_t g,
const QFixedPoint & subPixelPosition,
const QTransform & t )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 2101 of file qfontengine_ft.cpp.

References alphaMapFromGlyphData(), QFontEngine::alphaRGBMapForGlyph(), cacheEnabled, emptyGlyph, QFontEngine::Format_A32, loadGlyphFor(), and QTransform::TxRotate.

+ Here is the call graph for this function:

◆ averageCharWidth()

QFixed QFontEngineFT::averageCharWidth ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1444 of file qfontengine_ft.cpp.

References QFontEngine::averageCharWidth(), emSquareSize(), QFreetypeFace::face, freetype, lockFace(), and unlockFace().

+ Here is the call graph for this function:

◆ bitmapForGlyph()

QImage QFontEngineFT::bitmapForGlyph ( glyph_t g,
const QFixedPoint & subPixelPosition,
const QTransform & t,
const QColor & color )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 2124 of file qfontengine_ft.cpp.

References cacheEnabled, QImage::copy(), QFontEngine::Glyph::data, emptyGlyph, QFontEngine::Format_ARGB, QImage::Format_ARGB32_Premultiplied, QImage::Format_Mono, QFontEngine::Format_Mono, QFontEngine::Glyph::height, loadGlyphFor(), Q_UNUSED, QTransform::scale(), Qt::SmoothTransformation, QFixed::toReal(), and QFontEngine::Glyph::width.

+ Here is the call graph for this function:

◆ boundingBox() [1/3]

◆ boundingBox() [2/3]

glyph_metrics_t QFontEngineFT::boundingBox ( glyph_t glyph)
overridevirtual

Implements QFontEngine.

Definition at line 1898 of file qfontengine_ft.cpp.

References cacheEnabled, CEIL, emptyGlyph, FLOOR, QFontEngine::Format_None, QFontEngineFT::QGlyphSet::getGlyph(), isScalableBitmap(), loadGlyph(), lockFace(), ROUND, TRUNC, unlockFace(), and QFontEngine::Glyph::x.

+ Here is the call graph for this function:

◆ boundingBox() [3/3]

glyph_metrics_t QFontEngineFT::boundingBox ( glyph_t glyph,
const QTransform & matrix )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1939 of file qfontengine_ft.cpp.

References alphaMapBoundingBox(), and QFontEngine::Format_None.

+ Here is the call graph for this function:

◆ capHeight()

QFixed QFontEngineFT::capHeight ( ) const
overridevirtual

Implements QFontEngine.

Definition at line 1419 of file qfontengine_ft.cpp.

References QFontEngine::calculatedCapHeight(), QFreetypeFace::face, freetype, QFixed::fromFixed(), lockFace(), and unlockFace().

+ Here is the call graph for this function:

◆ cloneWithSize()

QFontEngine * QFontEngineFT::cloneWithSize ( qreal pixelSize) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 2298 of file qfontengine_ft.cpp.

References QFontEngineFT(), QFontEngine::fontDef, and QFontDef::pixelSize.

+ Here is the call graph for this function:

◆ create() [1/2]

QFontEngineFT * QFontEngineFT::create ( const QByteArray & fontData,
qreal pixelSize,
QFont::HintingPreference hintingPreference,
const QMap< QFont::Tag, float > & variableAxisValue )
static

◆ create() [2/2]

QFontEngineFT * QFontEngineFT::create ( const QFontDef & fontDef,
FaceId faceId,
const QByteArray & fontData = QByteArray() )
static

Definition at line 712 of file qfontengine_ft.cpp.

References antialias, engine, faceId(), QFontEngine::fontDef, QFontEngine::Format_A32, QFontEngine::Format_A8, QFontEngine::Format_Mono, QFontDef::hintingPreference, QFont::NoAntialias, QFont::NoSubpixelAntialias, qWarning, QFontDef::styleStrategy, QFontEngine::Subpixel_None, subpixelAntialiasingTypeHint(), and subpixelType.

Referenced by QFreeTypeFontDatabase::fontEngine(), QFreeTypeFontDatabase::fontEngine(), and QCoreTextFontDatabaseEngineFactory< T >::fontEngine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ defaultHintStyle()

HintStyle QFontEngineFT::defaultHintStyle ( ) const
inline

Definition at line 269 of file qfontengine_ft_p.h.

◆ doKerning()

void QFontEngineFT::doKerning ( QGlyphLayout * ,
ShaperFlags  ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1475 of file qfontengine_ft.cpp.

References QFontEngine::DesignMetrics, QFontEngine::doKerning(), emSquareSize(), QFreetypeFace::face, freetype, QFontEngine::loadKerningPairs(), lockFace(), and unlockFace().

+ Here is the call graph for this function:

◆ drawAntialiased()

bool QFontEngineFT::drawAntialiased ( ) const
inline

Definition at line 226 of file qfontengine_ft_p.h.

◆ emSquareSize()

QFixed QFontEngineFT::emSquareSize ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1379 of file qfontengine_ft.cpp.

References QFreetypeFace::face, and freetype.

Referenced by averageCharWidth(), doKerning(), and xHeight().

+ Here is the caller graph for this function:

◆ expectsGammaCorrectedBlending()

bool QFontEngineFT::expectsGammaCorrectedBlending ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1018 of file qfontengine_ft.cpp.

References stemDarkeningDriver.

◆ faceId()

QFontEngine::FaceId QFontEngineFT::faceId ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1364 of file qfontengine_ft.cpp.

Referenced by create(), init(), and init().

+ Here is the caller graph for this function:

◆ getPointInOutline()

int QFontEngineFT::getPointInOutline ( glyph_t glyph,
int flags,
quint32 point,
QFixed * xpos,
QFixed * ypos,
quint32 * nPoints )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 2265 of file qfontengine_ft.cpp.

References QFontEngine::Format_A8, freetype, QFreetypeFace::getPointInOutline(), lockFace(), and unlockFace().

+ Here is the call graph for this function:

◆ getSfntTableData()

bool QFontEngineFT::getSfntTableData ( uint tag,
uchar * buffer,
uint * length ) const
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 1387 of file qfontengine_ft.cpp.

References QFreetypeFace::face, freetype, ft_getSfntTable(), and tag.

+ Here is the call graph for this function:

◆ getUnscaledGlyph()

void QFontEngineFT::getUnscaledGlyph ( glyph_t glyph,
QPainterPath * path,
glyph_metrics_t * metrics )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1568 of file qfontengine_ft.cpp.

References QFreetypeFace::addBitmapToPath(), QFreetypeFace::addGlyphToPath(), QFreetypeFace::face, freetype, QFixed::fromFixed(), lockFace(), QFreetypeFace::matrix, unlockFace(), Unscaled, and QFixedPoint::x.

+ Here is the call graph for this function:

◆ glyphCount()

int QFontEngineFT::glyphCount ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 2159 of file qfontengine_ft.cpp.

References lockFace(), and unlockFace().

+ Here is the call graph for this function:

◆ glyphData()

QFontEngine::Glyph * QFontEngineFT::glyphData ( glyph_t glyph,
const QFixedPoint & subPixelPosition,
QFontEngine::GlyphFormat neededFormat,
const QTransform & t )
overridevirtual

Reimplemented from QFontEngine.

Definition at line 2018 of file qfontengine_ft.cpp.

References cacheEnabled, QFontEngine::Format_A8, QFontEngine::Format_Mono, QFontEngine::Format_None, glyphIndex(), QFontEngine::Glyph::height, isBitmapFont(), loadGlyphFor(), Q_ASSERT, and QFontEngine::Glyph::width.

+ Here is the call graph for this function:

◆ glyphIndex()

glyph_t QFontEngineFT::glyphIndex ( uint ucs4) const
overridevirtual

Implements QFontEngine.

Definition at line 1649 of file qfontengine_ft.cpp.

References QFreetypeFace::cmapCache, QFreetypeFace::cmapCacheSize, QFreetypeFace::face, freetype, QFontEngine::symbol, QFreetypeFace::symbol_map, and QFreetypeFace::unicode_map.

Referenced by glyphData().

+ Here is the caller graph for this function:

◆ glyphMargin()

int QFontEngineFT::glyphMargin ( QFontEngine::GlyphFormat )
inlineoverridevirtual

Reimplemented from QFontEngine.

Definition at line 213 of file qfontengine_ft_p.h.

◆ handle()

Qt::HANDLE QFontEngineFT::handle ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 2311 of file qfontengine_ft.cpp.

References non_locked_face().

+ Here is the call graph for this function:

◆ hasInternalCaching()

bool QFontEngineFT::hasInternalCaching ( ) const
inlineoverridevirtual

Reimplemented from QFontEngine.

Definition at line 209 of file qfontengine_ft_p.h.

◆ init() [1/2]

bool QFontEngineFT::init ( FaceId faceId,
bool antiaalias,
GlyphFormat defaultFormat = Format_None,
const QByteArray & fontData = QByteArray() )

Definition at line 828 of file qfontengine_ft.cpp.

References antialias, faceId(), QFreetypeFace::getFace(), and init().

Referenced by init(), and initFromFontEngine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init() [2/2]

◆ initFromFontEngine()

bool QFontEngineFT::initFromFontEngine ( const QFontEngineFT * fontEngine)

Definition at line 2276 of file qfontengine_ft.cpp.

References antialias, default_hint_style, default_load_flags, embeddedbitmap, embolden, freetype, init(), lcdFilterType, obliquen, QBasicAtomicInteger< T >::ref(), and subpixelType.

+ Here is the call graph for this function:

◆ initializeHeightMetrics()

void QFontEngineFT::initializeHeightMetrics ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1404 of file qfontengine_ft.cpp.

References QFixed::fromFixed(), QFontEngine::initializeHeightMetrics(), QFontEngine::m_ascent, QFontEngine::m_descent, and QFontEngine::m_leading.

+ Here is the call graph for this function:

◆ invalid()

bool QFontEngineFT::invalid ( ) const
inline

Definition at line 227 of file qfontengine_ft_p.h.

◆ isBitmapFont()

bool QFontEngineFT::isBitmapFont ( ) const
inline

Definition at line 228 of file qfontengine_ft_p.h.

Referenced by glyphData().

+ Here is the caller graph for this function:

◆ isScalableBitmap()

bool QFontEngineFT::isScalableBitmap ( ) const
inline

Definition at line 229 of file qfontengine_ft_p.h.

Referenced by alphaMapBoundingBox(), boundingBox(), boundingBox(), init(), and loadGlyph().

+ Here is the caller graph for this function:

◆ lineThickness()

QFixed QFontEngineFT::lineThickness ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1465 of file qfontengine_ft.cpp.

◆ loadGlyph() [1/2]

◆ loadGlyph() [2/2]

Glyph * QFontEngineFT::loadGlyph ( uint glyph,
const QFixedPoint & subPixelPosition,
GlyphFormat format = Format_None,
bool fetchMetricsOnly = false,
bool disableOutlineDrawing = false ) const
inline

Definition at line 231 of file qfontengine_ft_p.h.

Referenced by boundingBox(), boundingBox(), loadGlyphFor(), and recalcAdvances().

+ Here is the caller graph for this function:

◆ loadGlyphFor()

QFontEngineFT::Glyph * QFontEngineFT::loadGlyphFor ( glyph_t g,
const QFixedPoint & subPixelPosition,
GlyphFormat format,
const QTransform & t,
bool fetchBoundingBox = false,
bool disableOutlineDrawing = false )

Definition at line 2045 of file qfontengine_ft.cpp.

References QFontEngine::Glyph::data, default_hint_style, QFontEngine::Glyph::format, freetype, QFontEngine::HintNone, is2dRotation(), loadGlyph(), loadGlyphSet(), lockFace(), QFreetypeFace::matrix, QTransformToFTMatrix(), QTransform::TxScale, and unlockFace().

Referenced by alphaMapBoundingBox(), alphaMapForGlyph(), alphaRGBMapForGlyph(), bitmapForGlyph(), and glyphData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadGlyphSet()

QFontEngineFT::QGlyphSet * QFontEngineFT::loadGlyphSet ( const QTransform & matrix)

Definition at line 1556 of file qfontengine_ft.cpp.

References cacheEnabled, QFreetypeFace::face, QFontEngine::fontDef, freetype, QTransform::TxShear, and QTransform::TxTranslate.

Referenced by loadGlyphFor().

+ Here is the caller graph for this function:

◆ lockFace()

FT_Face QFontEngineFT::lockFace ( Scaling scale = Scaled) const

Definition at line 2170 of file qfontengine_ft.cpp.

References QFreetypeFace::face, freetype, QFreetypeFace::lock(), QFreetypeFace::matrix, Unscaled, QFreetypeFace::xsize, and QFreetypeFace::ysize.

Referenced by addGlyphsToPath(), addOutlineToPath(), alphaMapBoundingBox(), averageCharWidth(), boundingBox(), boundingBox(), capHeight(), doKerning(), getPointInOutline(), getUnscaledGlyph(), glyphCount(), init(), loadGlyphFor(), recalcAdvances(), and xHeight().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maxCharWidth()

qreal QFontEngineFT::maxCharWidth ( ) const
overridevirtual

Implements QFontEngine.

Definition at line 1457 of file qfontengine_ft.cpp.

References QFixed::fromFixed(), and QFixed::toReal().

+ Here is the call graph for this function:

◆ non_locked_face()

FT_Face QFontEngineFT::non_locked_face ( ) const

Definition at line 2200 of file qfontengine_ft.cpp.

References QFreetypeFace::face, and freetype.

Referenced by handle().

+ Here is the caller graph for this function:

◆ properties()

QFontEngine::Properties QFontEngineFT::properties ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1369 of file qfontengine_ft.cpp.

References QFontEngine::convertToPostscriptFontFamilyName(), QFontDef::families, QFontEngine::fontDef, freetype, QFontEngine::Properties::postscriptName, and QFreetypeFace::properties().

+ Here is the call graph for this function:

◆ recalcAdvances()

void QFontEngineFT::recalcAdvances ( QGlyphLayout * glyphs,
ShaperFlags flags ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1799 of file qfontengine_ft.cpp.

References QGlyphLayout::advances, cacheEnabled, emptyGlyph, QFontEngine::Format_Mono, QFontEngine::Format_None, QFixed::fromFixed(), QFontEngineFT::QGlyphSet::getGlyph(), QGlyphLayout::glyphs, i, loadGlyph(), lockFace(), QGlyphLayout::numGlyphs, and unlockFace().

Referenced by stringToCMap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeGlyphFromCache()

void QFontEngineFT::removeGlyphFromCache ( glyph_t glyph)
overridevirtual

Reimplemented from QFontEngine.

Definition at line 2154 of file qfontengine_ft.cpp.

References QFontEngineFT::QGlyphSet::removeGlyphFromCache().

+ Here is the call graph for this function:

◆ setDefaultHintStyle()

void QFontEngineFT::setDefaultHintStyle ( HintStyle style)
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1013 of file qfontengine_ft.cpp.

References default_hint_style.

Referenced by setQtDefaultHintStyle().

+ Here is the caller graph for this function:

◆ setQtDefaultHintStyle()

void QFontEngineFT::setQtDefaultHintStyle ( QFont::HintingPreference hintingPreference)

Definition at line 995 of file qfontengine_ft.cpp.

References ftInitialDefaultHintStyle, QFontEngine::HintFull, QFontEngine::HintLight, QFontEngine::HintNone, QFont::PreferDefaultHinting, QFont::PreferFullHinting, QFont::PreferNoHinting, QFont::PreferVerticalHinting, and setDefaultHintStyle().

+ Here is the call graph for this function:

◆ stringToCMap()

int QFontEngineFT::stringToCMap ( const QChar * str,
int len,
QGlyphLayout * glyphs,
int * nglyphs,
ShaperFlags flags ) const
overridevirtual

Implements QFontEngine.

Definition at line 1681 of file qfontengine_ft.cpp.

References QFreetypeFace::cmapCache, QFreetypeFace::cmapCacheSize, QFreetypeFace::face, freetype, QFontEngine::GlyphIndicesOnly, QGlyphLayout::glyphs, QFontEngine::isIgnorableChar(), it, QGlyphLayout::numGlyphs, Q_ASSERT, recalcAdvances(), str, QFontEngine::symbol, QFreetypeFace::symbol_map, and QFreetypeFace::unicode_map.

+ Here is the call graph for this function:

◆ supportsHorizontalSubPixelPositions()

bool QFontEngineFT::supportsHorizontalSubPixelPositions ( ) const
inlineoverridevirtual

Reimplemented from QFontEngine.

Definition at line 154 of file qfontengine_ft_p.h.

◆ supportsTransformation()

bool QFontEngineFT::supportsTransformation ( const QTransform & transform) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1598 of file qfontengine_ft.cpp.

References freetype, QFreetypeFace::isScalable(), QFreetypeFace::isScalableBitmap(), and QTransform::TxRotate.

+ Here is the call graph for this function:

◆ supportsVerticalSubPixelPositions()

bool QFontEngineFT::supportsVerticalSubPixelPositions ( ) const
inlineoverridevirtual

Reimplemented from QFontEngine.

Definition at line 160 of file qfontengine_ft_p.h.

◆ synthesized()

◆ underlinePosition()

QFixed QFontEngineFT::underlinePosition ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1470 of file qfontengine_ft.cpp.

◆ unlockFace()

void QFontEngineFT::unlockFace ( ) const

Definition at line 2195 of file qfontengine_ft.cpp.

References freetype, and QFreetypeFace::unlock().

Referenced by addGlyphsToPath(), addOutlineToPath(), alphaMapBoundingBox(), averageCharWidth(), boundingBox(), boundingBox(), capHeight(), doKerning(), getPointInOutline(), getUnscaledGlyph(), glyphCount(), init(), loadGlyphFor(), recalcAdvances(), and xHeight().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xHeight()

QFixed QFontEngineFT::xHeight ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1431 of file qfontengine_ft.cpp.

References emSquareSize(), QFreetypeFace::face, freetype, lockFace(), unlockFace(), and QFontEngine::xHeight().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QFontconfigDatabase

friend class QFontconfigDatabase
friend

Definition at line 292 of file qfontengine_ft_p.h.

◆ QFontEngineFTRawFont

friend class QFontEngineFTRawFont
friend

Definition at line 291 of file qfontengine_ft_p.h.

◆ QFontEngineMultiFontConfig

friend class QFontEngineMultiFontConfig
friend

Definition at line 294 of file qfontengine_ft_p.h.

◆ QFreeTypeFontDatabase

friend class QFreeTypeFontDatabase
friend

Definition at line 293 of file qfontengine_ft_p.h.

Member Data Documentation

◆ antialias

bool QFontEngineFT::antialias
protected

◆ cacheEnabled

◆ default_hint_style

HintStyle QFontEngineFT::default_hint_style
protected

◆ default_load_flags

int QFontEngineFT::default_load_flags
mutableprotected

Definition at line 277 of file qfontengine_ft_p.h.

Referenced by QFontEngineFT(), initFromFontEngine(), and loadGlyph().

◆ embeddedbitmap

bool QFontEngineFT::embeddedbitmap
protected

Definition at line 285 of file qfontengine_ft_p.h.

Referenced by QFontEngineFT(), and initFromFontEngine().

◆ embolden

bool QFontEngineFT::embolden
protected

◆ forceAutoHint

bool QFontEngineFT::forceAutoHint
protected

Definition at line 287 of file qfontengine_ft_p.h.

Referenced by QFontEngineFT().

◆ freetype

◆ lcdFilterType

int QFontEngineFT::lcdFilterType
protected

Definition at line 284 of file qfontengine_ft_p.h.

Referenced by QFontEngineFT(), initFromFontEngine(), and loadGlyph().

◆ obliquen

bool QFontEngineFT::obliquen
protected

◆ stemDarkeningDriver

bool QFontEngineFT::stemDarkeningDriver
protected

Definition at line 288 of file qfontengine_ft_p.h.

Referenced by QFontEngineFT(), expectsGammaCorrectedBlending(), and init().

◆ subpixelType

SubpixelAntialiasingType QFontEngineFT::subpixelType
protected

Definition at line 283 of file qfontengine_ft_p.h.

Referenced by QFontEngineFT(), create(), initFromFontEngine(), and loadGlyph().

◆ transform

bool QFontEngineFT::transform
protected

Definition at line 280 of file qfontengine_ft_p.h.


The documentation for this class was generated from the following files: