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
QFontEngineBox Class Reference

#include <qfontengine_p.h>

+ Inheritance diagram for QFontEngineBox:
+ Collaboration diagram for QFontEngineBox:

Public Member Functions

 QFontEngineBox (int size)
 
 ~QFontEngineBox ()
 
virtual glyph_t glyphIndex (uint ucs4) const override
 
virtual int stringToCMap (const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const override
 
virtual void recalcAdvances (QGlyphLayout *, ShaperFlags) const override
 
void draw (QPaintEngine *p, qreal x, qreal y, const QTextItemInt &si)
 
virtual void addOutlineToPath (qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags flags) override
 
virtual glyph_metrics_t boundingBox (const QGlyphLayout &glyphs) override
 
virtual glyph_metrics_t boundingBox (glyph_t glyph) override
 
virtual QFontEnginecloneWithSize (qreal pixelSize) const override
 
virtual QFixed ascent () const override
 
virtual QFixed capHeight () const override
 
virtual QFixed descent () const override
 
virtual QFixed leading () const override
 
virtual qreal maxCharWidth () const override
 
virtual qreal minLeftBearing () const override
 
virtual qreal minRightBearing () const override
 
virtual QImage alphaMapForGlyph (glyph_t) override
 
virtual bool canRender (const QChar *string, int len) const override
 
int size () const
 
- Public Member Functions inherited from QFontEngine
virtual ~QFontEngine ()
 
Type type () const
 
virtual Properties properties () const
 
virtual void getUnscaledGlyph (glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics)
 
QByteArray getSfntTable (uint tag) const
 
virtual bool getSfntTableData (uint tag, uchar *buffer, uint *length) const
 Returns true if the font table idetified by tag exists in the font; returns false otherwise.
 
virtual FaceId faceId () const
 
virtual int synthesized () const
 
bool supportsSubPixelPositions () const
 
virtual bool supportsHorizontalSubPixelPositions () const
 
virtual bool supportsVerticalSubPixelPositions () const
 
virtual QFixedPoint subPixelPositionFor (const QFixedPoint &position) const
 
QFixed subPixelPositionForX (QFixed x) const
 
bool isColorFont () const
 
virtual QFixed emSquareSize () const
 
virtual void doKerning (QGlyphLayout *, ShaperFlags) const
 
virtual void addGlyphsToPath (glyph_t *glyphs, QFixedPoint *positions, int nglyphs, QPainterPath *path, QTextItem::RenderFlags flags)
 
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 glyph, const QFixedPoint &subPixelPosition)
 
virtual QImage alphaMapForGlyph (glyph_t, const QTransform &t)
 
virtual QImage alphaMapForGlyph (glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t)
 
virtual QImage alphaRGBMapForGlyph (glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t)
 
virtual QImage bitmapForGlyph (glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t, const QColor &color=QColor())
 
virtual GlyphglyphData (glyph_t glyph, const QFixedPoint &subPixelPosition, GlyphFormat neededFormat, const QTransform &t)
 
virtual bool hasInternalCaching () const
 
virtual glyph_metrics_t alphaMapBoundingBox (glyph_t glyph, const QFixedPoint &, const QTransform &matrix, GlyphFormat)
 
virtual void removeGlyphFromCache (glyph_t)
 
virtual glyph_metrics_t boundingBox (glyph_t glyph, const QTransform &matrix)
 
glyph_metrics_t tightBoundingBox (const QGlyphLayout &glyphs)
 
virtual QFixed xHeight () const
 
virtual QFixed averageCharWidth () const
 
virtual QFixed lineThickness () const
 
virtual QFixed underlinePosition () const
 
virtual void getGlyphBearings (glyph_t glyph, qreal *leftBearing=nullptr, qreal *rightBearing=nullptr)
 
bool canRender (uint ucs4) const
 
virtual bool supportsTransformation (const QTransform &transform) const
 
virtual int glyphCount () const
 
virtual int glyphMargin (GlyphFormat format)
 
virtual Qt::HANDLE handle () const
 
voidharfbuzzFont () const
 
voidharfbuzzFace () const
 
bool supportsScript (QChar::Script script) const
 
virtual int getPointInOutline (glyph_t glyph, int flags, quint32 point, QFixed *xpos, QFixed *ypos, quint32 *nPoints)
 
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
 
virtual bool expectsGammaCorrectedBlending () const
 
virtual void setDefaultHintStyle (HintStyle)
 
void loadKerningPairs (QFixed scalingFactor)
 

Protected Member Functions

 QFontEngineBox (Type type, int size)
 
- Protected Member Functions inherited from QFontEngine
 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
 

Friends

class QFontPrivate
 

Additional Inherited Members

- 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
}
 
- 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)
 
- 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 Attributes inherited from QFontEngine
QFixed m_ascent
 
QFixed m_descent
 
QFixed m_leading
 
bool m_heightMetricsQueried
 

Detailed Description

Definition at line 398 of file qfontengine_p.h.

Constructor & Destructor Documentation

◆ QFontEngineBox() [1/2]

QFontEngineBox::QFontEngineBox ( int size)

Definition at line 1522 of file qfontengine.cpp.

References QFontEngineBox(), and QFontEngine::cache_cost.

Referenced by QFontEngineBox(), QFontEngineBox(), and cloneWithSize().

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

◆ ~QFontEngineBox()

QFontEngineBox::~QFontEngineBox ( )

Definition at line 1536 of file qfontengine.cpp.

◆ QFontEngineBox() [2/2]

QFontEngineBox::QFontEngineBox ( Type type,
int size )
explicitprotected

Definition at line 1529 of file qfontengine.cpp.

References QFontEngineBox(), and QFontEngine::cache_cost.

+ Here is the call graph for this function:

Member Function Documentation

◆ addOutlineToPath()

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

Reimplemented from QFontEngine.

Definition at line 1576 of file qfontengine.cpp.

References QTransform::fromTranslate(), QFontEngine::getGlyphPositions(), QGlyphLayout::numGlyphs, and positions.

+ Here is the call graph for this function:

◆ alphaMapForGlyph()

QImage QFontEngineBox::alphaMapForGlyph ( glyph_t glyph)
overridevirtual

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 1669 of file qfontengine.cpp.

References QImage::Format_Alpha8, and i.

◆ ascent()

QFixed QFontEngineBox::ascent ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1638 of file qfontengine.cpp.

◆ boundingBox() [1/2]

glyph_metrics_t QFontEngineBox::boundingBox ( const QGlyphLayout & glyphs)
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1591 of file qfontengine.cpp.

References QGlyphLayout::numGlyphs, and glyph_metrics_t::width.

◆ boundingBox() [2/2]

glyph_metrics_t QFontEngineBox::boundingBox ( glyph_t glyph)
overridevirtual

Implements QFontEngine.

Definition at line 1627 of file qfontengine.cpp.

◆ canRender()

bool QFontEngineBox::canRender ( const QChar * string,
int len ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1664 of file qfontengine.cpp.

◆ capHeight()

QFixed QFontEngineBox::capHeight ( ) const
overridevirtual

Implements QFontEngine.

Definition at line 1643 of file qfontengine.cpp.

◆ cloneWithSize()

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

Reimplemented from QFontEngine.

Definition at line 1632 of file qfontengine.cpp.

References QFontEngineBox().

+ Here is the call graph for this function:

◆ descent()

QFixed QFontEngineBox::descent ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1648 of file qfontengine.cpp.

◆ draw()

void QFontEngineBox::draw ( QPaintEngine * p,
qreal x,
qreal y,
const QTextItemInt & si )

Definition at line 1600 of file qfontengine.cpp.

References QPainter::drawRect(), QTransform::fromTranslate(), QFontEngine::lineThickness(), Qt::NoBrush, painter, QPainter::pen(), positions, QPainter::restore(), QPainter::save(), QPainter::setBrush(), QPainter::setPen(), and QPen::setWidthF().

+ Here is the call graph for this function:

◆ glyphIndex()

glyph_t QFontEngineBox::glyphIndex ( uint ucs4) const
overridevirtual

Implements QFontEngine.

Definition at line 1540 of file qfontengine.cpp.

References Q_UNUSED.

◆ leading()

QFixed QFontEngineBox::leading ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1653 of file qfontengine.cpp.

References QFixed::ceil(), and QFixed::fromReal().

+ Here is the call graph for this function:

◆ maxCharWidth()

qreal QFontEngineBox::maxCharWidth ( ) const
overridevirtual

Implements QFontEngine.

Definition at line 1659 of file qfontengine.cpp.

◆ minLeftBearing()

virtual qreal QFontEngineBox::minLeftBearing ( ) const
inlineoverridevirtual

Reimplemented from QFontEngine.

Definition at line 420 of file qfontengine_p.h.

◆ minRightBearing()

virtual qreal QFontEngineBox::minRightBearing ( ) const
inlineoverridevirtual

Reimplemented from QFontEngine.

Definition at line 421 of file qfontengine_p.h.

◆ recalcAdvances()

void QFontEngineBox::recalcAdvances ( QGlyphLayout * ,
ShaperFlags  ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 1570 of file qfontengine.cpp.

References QGlyphLayout::advances, i, and QGlyphLayout::numGlyphs.

Referenced by stringToCMap().

+ Here is the caller graph for this function:

◆ size()

int QFontEngineBox::size ( ) const
inline

Definition at line 426 of file qfontengine_p.h.

◆ stringToCMap()

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

Implements QFontEngine.

Definition at line 1546 of file qfontengine.cpp.

References QFontEngine::GlyphIndicesOnly, QGlyphLayout::glyphs, it, QGlyphLayout::numGlyphs, Q_ASSERT, recalcAdvances(), and str.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QFontPrivate

friend class QFontPrivate
friend

Definition at line 432 of file qfontengine_p.h.


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