Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QCoreTextFontEngine Class Reference

#include <qfontengine_coretext_p.h>

+ Inheritance diagram for QCoreTextFontEngine:
+ Collaboration diagram for QCoreTextFontEngine:

Public Types

enum  FontSmoothing { Disabled , Subpixel , Grayscale }
 
- 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 }
 
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

 QCoreTextFontEngine (CTFontRef font, const QFontDef &def)
 
 QCoreTextFontEngine (CGFontRef font, const QFontDef &def)
 
 ~QCoreTextFontEngine ()
 
glyph_t glyphIndex (uint ucs4) const override
 
bool stringToCMap (const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const override
 
void recalcAdvances (QGlyphLayout *, ShaperFlags) const override
 
glyph_metrics_t boundingBox (glyph_t glyph) override
 
QFixed capHeight () const override
 
QFixed xHeight () const override
 
qreal maxCharWidth () const override
 
QFixed averageCharWidth () const override
 
void addGlyphsToPath (glyph_t *glyphs, QFixedPoint *positions, int numGlyphs, QPainterPath *path, QTextItem::RenderFlags) override
 
bool canRender (const QChar *string, int len) const override
 
int synthesized () const override
 
bool supportsHorizontalSubPixelPositions () const override
 
bool supportsVerticalSubPixelPositions () const override
 
QFixed lineThickness () const override
 
QFixed underlinePosition () const override
 
void draw (CGContextRef ctx, qreal x, qreal y, const QTextItemInt &ti, int paintDeviceHeight)
 
FaceId faceId () const override
 
bool getSfntTableData (uint, uchar *, uint *) const override
 Returns true if the font table idetified by tag exists in the font; returns false otherwise.
 
void getUnscaledGlyph (glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics) override
 
QImage alphaMapForGlyph (glyph_t, const QFixedPoint &subPixelPosition) override
 
QImage alphaMapForGlyph (glyph_t glyph, const QFixedPoint &subPixelPosition, const QTransform &t) override
 
QImage alphaRGBMapForGlyph (glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t) override
 
glyph_metrics_t alphaMapBoundingBox (glyph_t glyph, const QFixedPoint &, const QTransform &matrix, GlyphFormat) override
 
QImage bitmapForGlyph (glyph_t, const QFixedPoint &subPixelPosition, const QTransform &t, const QColor &color) override
 
QFixed emSquareSize () const override
 
void doKerning (QGlyphLayout *g, ShaperFlags flags) const override
 
bool supportsTransformation (const QTransform &transform) const override
 
bool expectsGammaCorrectedBlending () const override
 
QFontEnginecloneWithSize (qreal pixelSize) const override
 
Qt::HANDLE handle () const override
 
int glyphMargin (QFontEngine::GlyphFormat format) override
 
QFontEngine::Properties properties () const override
 
 Q_ENUM (FontSmoothing)
 
- 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
 
virtual QFixed emSquareSize () const
 
virtual glyph_t glyphIndex (uint ucs4) const =0
 
virtual bool stringToCMap (const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, ShaperFlags flags) const =0
 
virtual void recalcAdvances (QGlyphLayout *, ShaperFlags) 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)
 
virtual void addOutlineToPath (qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags)
 
void addBitmapFontToPath (qreal x, qreal y, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags)
 
virtual QImage alphaMapForGlyph (glyph_t)
 
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 (const QGlyphLayout &glyphs)
 
virtual glyph_metrics_t boundingBox (glyph_t glyph)=0
 
virtual glyph_metrics_t boundingBox (glyph_t glyph, const QTransform &matrix)
 
glyph_metrics_t tightBoundingBox (const QGlyphLayout &glyphs)
 
virtual QFixed ascent () const
 
virtual QFixed capHeight () const =0
 
virtual QFixed descent () const
 
virtual QFixed leading () const
 
virtual QFixed xHeight () const
 
virtual QFixed averageCharWidth () const
 
virtual QFixed lineThickness () const
 
virtual QFixed underlinePosition () const
 
virtual qreal maxCharWidth () const =0
 
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
 
virtual bool supportsTransformation (const QTransform &transform) const
 
virtual int glyphCount () const
 
virtual int glyphMargin (GlyphFormat format)
 
virtual QFontEnginecloneWithSize (qreal) const
 
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)
 

Static Public Member Functions

static FontSmoothing fontSmoothing ()
 
static qreal fontSmoothingGamma ()
 
static bool ct_getSfntTable (void *user_data, uint tag, uchar *buffer, uint *length)
 
static QFont::Weight qtWeightFromCFWeight (float value)
 
static QCoreTextFontEnginecreate (const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference)
 
- Static Public Member Functions inherited from QFontEngine
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 Member Functions

 QCoreTextFontEngine (const QFontDef &def)
 
void init ()
 
QImage imageForGlyph (glyph_t glyph, const QFixedPoint &subPixelPosition, const QTransform &m, const QColor &color=QColor())
 
void loadAdvancesForGlyphs (QVarLengthArray< CGGlyph > &cgGlyphs, QGlyphLayout *glyphs) const
 
bool hasColorGlyphs () const
 
bool shouldAntialias () const
 
bool shouldSmoothFont () const
 
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
 
virtual void initializeHeightMetrics () const
 
bool processHheaTable () const
 
bool processOS2Table () const
 

Protected Attributes

QCFType< CTFontRef > ctfont
 
QCFType< CGFontRef > cgFont
 
int synthesisFlags
 
CGAffineTransform transform
 
QFixed avgCharWidth
 
QFixed underlineThickness
 
QFixed underlinePos
 
QFontEngine::FaceId face_id
 
bool kerningPairsLoaded
 
- Protected Attributes inherited from QFontEngine
QFixed m_ascent
 
QFixed m_descent
 
QFixed m_leading
 
bool m_heightMetricsQueried
 

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
 

Detailed Description

Definition at line 31 of file qfontengine_coretext_p.h.

Member Enumeration Documentation

◆ FontSmoothing

Enumerator
Disabled 
Subpixel 
Grayscale 

Definition at line 85 of file qfontengine_coretext_p.h.

Constructor & Destructor Documentation

◆ QCoreTextFontEngine() [1/3]

QCoreTextFontEngine::QCoreTextFontEngine ( CTFontRef  font,
const QFontDef def 
)

Definition at line 154 of file qfontengine_coretext.mm.

References cgFont, QCFType< T >::constructFromGet(), ctfont, font, and init().

+ Here is the call graph for this function:

◆ QCoreTextFontEngine() [2/3]

QCoreTextFontEngine::QCoreTextFontEngine ( CGFontRef  font,
const QFontDef def 
)

Definition at line 162 of file qfontengine_coretext.mm.

References cgFont, QCFType< T >::constructFromGet(), ctfont, font, QFontEngine::fontDef, init(), and QFontDef::pixelSize.

+ Here is the call graph for this function:

◆ ~QCoreTextFontEngine()

QCoreTextFontEngine::~QCoreTextFontEngine ( )

Definition at line 177 of file qfontengine_coretext.mm.

◆ QCoreTextFontEngine() [3/3]

QCoreTextFontEngine::QCoreTextFontEngine ( const QFontDef def)
protected

Definition at line 170 of file qfontengine_coretext.mm.

References QFontEngine::fontDef, and qt_transform_from_fontdef().

+ Here is the call graph for this function:

Member Function Documentation

◆ addGlyphsToPath()

void QCoreTextFontEngine::addGlyphsToPath ( glyph_t glyphs,
QFixedPoint positions,
int  numGlyphs,
QPainterPath path,
QTextItem::RenderFlags   
)
overridevirtual

Reimplemented from QFontEngine.

Definition at line 470 of file qfontengine_coretext.mm.

References convertCGPathToQPainterPath(), ctfont, QFontEngine::fontDef, hasColorGlyphs(), i, info, positions, QFontDef::stretch, synthesisFlags, QFontEngine::SynthesizedItalic, and SYNTHETIC_ITALIC_SKEW.

+ Here is the call graph for this function:

◆ alphaMapBoundingBox()

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

Reimplemented from QFontEngine.

Definition at line 502 of file qfontengine_coretext.mm.

References QFontEngine::alphaMapBoundingBox(), QFont::AnyStretch, boundingBox(), QFontEngine::fontDef, QFontEngine::Format_A32, QFontEngine::Format_A8, glyph_metrics_t::height, qcoretextfontengine_scaleMetrics(), QTransform::scale(), QFontDef::stretch, QTransform::TxScale, glyph_metrics_t::width, glyph_metrics_t::x, xform, and glyph_metrics_t::y.

Referenced by imageForGlyph().

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

◆ alphaMapForGlyph() [1/2]

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

Reimplemented from QFontEngine.

Definition at line 804 of file qfontengine_coretext.mm.

References QFontEngine::alphaMapForGlyph(), QImage::Format_Alpha8, QImage::height(), imageForGlyph(), qGray(), QImage::scanLine(), QTransform::TxScale, and QImage::width().

+ Here is the call graph for this function:

◆ alphaMapForGlyph() [2/2]

QImage QCoreTextFontEngine::alphaMapForGlyph ( glyph_t  glyph,
const QFixedPoint subPixelPosition 
)
overridevirtual

Reimplemented from QFontEngine.

Definition at line 799 of file qfontengine_coretext.mm.

References alphaMapForGlyph().

Referenced by alphaMapForGlyph().

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

◆ alphaRGBMapForGlyph()

QImage QCoreTextFontEngine::alphaRGBMapForGlyph ( glyph_t  glyph,
const QFixedPoint subPixelPosition,
const QTransform t 
)
overridevirtual

Reimplemented from QFontEngine.

Definition at line 826 of file qfontengine_coretext.mm.

References QFontEngine::alphaRGBMapForGlyph(), imageForGlyph(), and QTransform::TxScale.

+ Here is the call graph for this function:

◆ averageCharWidth()

QFixed QCoreTextFontEngine::averageCharWidth ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 347 of file qfontengine_coretext.mm.

References avgCharWidth.

◆ bitmapForGlyph()

QImage QCoreTextFontEngine::bitmapForGlyph ( glyph_t  glyph,
const QFixedPoint subPixelPosition,
const QTransform t,
const QColor color 
)
overridevirtual

Reimplemented from QFontEngine.

Definition at line 834 of file qfontengine_coretext.mm.

References QFontEngine::bitmapForGlyph(), imageForGlyph(), and QTransform::TxScale.

+ Here is the call graph for this function:

◆ boundingBox()

glyph_metrics_t QCoreTextFontEngine::boundingBox ( glyph_t  glyph)
overridevirtual

Implements QFontEngine.

Definition at line 304 of file qfontengine_coretext.mm.

References ctfont, QFixed::fromReal(), rect, ret, synthesisFlags, QFontEngine::SynthesizedItalic, and SYNTHETIC_ITALIC_SKEW.

Referenced by alphaMapBoundingBox(), getUnscaledGlyph(), and maxCharWidth().

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

◆ canRender()

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

Reimplemented from QFontEngine.

Definition at line 873 of file qfontengine_coretext.mm.

References ctfont, and QVarLengthArray< T, Prealloc >::data().

+ Here is the call graph for this function:

◆ capHeight()

QFixed QCoreTextFontEngine::capHeight ( ) const
overridevirtual

Implements QFontEngine.

Definition at line 333 of file qfontengine_coretext.mm.

References QFontEngine::calculatedCapHeight(), ctfont, and QFixed::fromReal().

+ Here is the call graph for this function:

◆ cloneWithSize()

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

Reimplemented from QFontEngine.

Reimplemented in QCoreTextRawFontEngine.

Definition at line 911 of file qfontengine_coretext.mm.

References cgFont, QFontEngine::fontDef, QFontDef::pixelSize, QFontDef::pointSize, and qt_defaultDpi().

+ Here is the call graph for this function:

◆ create()

QCoreTextFontEngine * QCoreTextFontEngine::create ( const QByteArray fontData,
qreal  pixelSize,
QFont::HintingPreference  hintingPreference 
)
static

Definition at line 128 of file qfontengine_coretext.mm.

References cgFont, QFontDef::pixelSize, QFontDef::pointSize, Q_UNUSED, qt_defaultDpi(), and qWarning.

+ Here is the call graph for this function:

◆ ct_getSfntTable()

bool QCoreTextFontEngine::ct_getSfntTable ( void user_data,
uint  tag,
uchar buffer,
uint length 
)
static

Definition at line 55 of file qfontengine_coretext.mm.

References ctfont, Q_ASSERT, tag, and user_data.

Referenced by getFontDescription(), and getSfntTableData().

+ Here is the caller graph for this function:

◆ doKerning()

void QCoreTextFontEngine::doKerning ( QGlyphLayout g,
ShaperFlags  flags 
) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 976 of file qfontengine_coretext.mm.

References ctfont, QFontEngine::doKerning(), QFixed::fromReal(), kerningPairsLoaded, and QFontEngine::loadKerningPairs().

+ Here is the call graph for this function:

◆ draw()

void QCoreTextFontEngine::draw ( CGContextRef  ctx,
qreal  x,
qreal  y,
const QTextItemInt ti,
int  paintDeviceHeight 
)

◆ emSquareSize()

QFixed QCoreTextFontEngine::emSquareSize ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 906 of file qfontengine_coretext.mm.

References ctfont.

Referenced by properties().

+ Here is the caller graph for this function:

◆ expectsGammaCorrectedBlending()

bool QCoreTextFontEngine::expectsGammaCorrectedBlending ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 678 of file qfontengine_coretext.mm.

References fontSmoothing(), shouldSmoothFont(), and Subpixel.

Referenced by imageForGlyph().

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

◆ faceId()

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

Reimplemented from QFontEngine.

Definition at line 868 of file qfontengine_coretext.mm.

References face_id.

◆ fontSmoothing()

QCoreTextFontEngine::FontSmoothing QCoreTextFontEngine::fontSmoothing ( )
static

Definition at line 599 of file qfontengine_coretext.mm.

References defaults, Disabled, font, fontSmoothing(), QImage::Format_RGB32, Grayscale, QImage::pixel(), qBlue(), qCDebug, qGreen(), qRed(), QRgb, sp, and Subpixel.

Referenced by expectsGammaCorrectedBlending(), fontSmoothing(), QCocoaTheme::handleSystemThemeChange(), imageForGlyph(), init(), and shouldSmoothFont().

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

◆ fontSmoothingGamma()

qreal QCoreTextFontEngine::fontSmoothingGamma ( )
static

Definition at line 683 of file qfontengine_coretext.mm.

Referenced by QCocoaIntegration::styleHint().

+ Here is the caller graph for this function:

◆ getSfntTableData()

bool QCoreTextFontEngine::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 879 of file qfontengine_coretext.mm.

References ct_getSfntTable(), ctfont, and tag.

+ Here is the call graph for this function:

◆ getUnscaledGlyph()

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

Reimplemented from QFontEngine.

Definition at line 884 of file qfontengine_coretext.mm.

References boundingBox(), convertCGPathToQPainterPath(), ctfont, QFixed::fromReal(), glyph_metrics_t::height, info, QFixed::toReal(), glyph_metrics_t::width, glyph_metrics_t::x, glyph_metrics_t::xoff, glyph_metrics_t::y, and glyph_metrics_t::yoff.

+ Here is the call graph for this function:

◆ glyphIndex()

glyph_t QCoreTextFontEngine::glyphIndex ( uint  ucs4) const
overridevirtual

Implements QFontEngine.

Definition at line 251 of file qfontengine_coretext.mm.

References ctfont, QChar::highSurrogate(), QChar::lowSurrogate(), Q_UNLIKELY, QChar::requiresSurrogates(), and str.

Referenced by maxCharWidth().

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

◆ glyphMargin()

int QCoreTextFontEngine::glyphMargin ( QFontEngine::GlyphFormat  format)
inlineoverridevirtual

Reimplemented from QFontEngine.

Definition at line 81 of file qfontengine_coretext_p.h.

References Q_UNUSED.

◆ handle()

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

Reimplemented from QFontEngine.

Definition at line 920 of file qfontengine_coretext.mm.

References ctfont.

◆ hasColorGlyphs()

bool QCoreTextFontEngine::hasColorGlyphs ( ) const
protected

Definition at line 360 of file qfontengine_coretext.mm.

References QFontEngine::Format_ARGB, and QFontEngine::glyphFormat.

Referenced by addGlyphsToPath(), imageForGlyph(), and shouldSmoothFont().

+ Here is the caller graph for this function:

◆ imageForGlyph()

◆ init()

◆ initializeHeightMetrics()

void QCoreTextFontEngine::initializeHeightMetrics ( ) const
overrideprotectedvirtual

Reimplemented from QFontEngine.

Definition at line 324 of file qfontengine_coretext.mm.

References ctfont, QFixed::fromReal(), QFontEngine::m_ascent, QFontEngine::m_descent, QFontEngine::m_heightMetricsQueried, and QFontEngine::m_leading.

+ Here is the call graph for this function:

◆ lineThickness()

QFixed QCoreTextFontEngine::lineThickness ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 936 of file qfontengine_coretext.mm.

References underlineThickness.

Referenced by draw(), and imageForGlyph().

+ Here is the caller graph for this function:

◆ loadAdvancesForGlyphs()

void QCoreTextFontEngine::loadAdvancesForGlyphs ( QVarLengthArray< CGGlyph > &  cgGlyphs,
QGlyphLayout glyphs 
) const
protected

Definition at line 857 of file qfontengine_coretext.mm.

References QGlyphLayout::advances, QFont::AnyStretch, ctfont, QVarLengthArray< T, Prealloc >::data(), QFontEngine::fontDef, QFixed::fromReal(), i, QGlyphLayout::numGlyphs, and QFontDef::stretch.

Referenced by recalcAdvances(), and stringToCMap().

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

◆ maxCharWidth()

qreal QCoreTextFontEngine::maxCharWidth ( ) const
overridevirtual

Implements QFontEngine.

Definition at line 352 of file qfontengine_coretext.mm.

References boundingBox(), glyphIndex(), QFixed::toReal(), and glyph_metrics_t::xoff.

+ Here is the call graph for this function:

◆ properties()

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

Reimplemented from QFontEngine.

Definition at line 946 of file qfontengine_coretext.mm.

References ctfont, emSquareSize(), and QFixed::fromReal().

+ Here is the call graph for this function:

◆ Q_ENUM()

QCoreTextFontEngine::Q_ENUM ( FontSmoothing  )

◆ qtWeightFromCFWeight()

QFont::Weight QCoreTextFontEngine::qtWeightFromCFWeight ( float  value)
static

Definition at line 71 of file qfontengine_coretext.mm.

References QFont::Black, QFont::Bold, COMPARE_WEIGHT_DISTANCE, QFont::DemiBold, QFont::ExtraBold, QFont::ExtraLight, QFont::Light, QFont::Medium, QFont::Normal, qAbs(), ret, and QFont::Thin.

Referenced by getFontDescription(), and init().

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

◆ recalcAdvances()

void QCoreTextFontEngine::recalcAdvances ( QGlyphLayout ,
ShaperFlags   
) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 842 of file qfontengine_coretext.mm.

References QGlyphLayout::glyphs, QFontEngineMulti::highByte(), i, loadAdvancesForGlyphs(), QGlyphLayout::numGlyphs, Q_ASSERT, and Q_UNUSED.

+ Here is the call graph for this function:

◆ shouldAntialias()

bool QCoreTextFontEngine::shouldAntialias ( ) const
protected

Definition at line 656 of file qfontengine_coretext.mm.

References QFontEngine::fontDef, QFont::NoAntialias, and QFontDef::styleStrategy.

Referenced by imageForGlyph(), and shouldSmoothFont().

+ Here is the caller graph for this function:

◆ shouldSmoothFont()

bool QCoreTextFontEngine::shouldSmoothFont ( ) const
protected

Definition at line 661 of file qfontengine_coretext.mm.

References Disabled, QFontEngine::fontDef, fontSmoothing(), Grayscale, hasColorGlyphs(), QFont::NoSubpixelAntialias, shouldAntialias(), QFontDef::styleStrategy, and Subpixel.

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

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

◆ stringToCMap()

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

Implements QFontEngine.

Definition at line 270 of file qfontengine_coretext.mm.

References ctfont, QVarLengthArray< T, Prealloc >::data(), QFontEngine::GlyphIndicesOnly, QGlyphLayout::glyphs, i, loadAdvancesForGlyphs(), QGlyphLayout::numGlyphs, Q_ASSERT, and str.

+ Here is the call graph for this function:

◆ supportsHorizontalSubPixelPositions()

bool QCoreTextFontEngine::supportsHorizontalSubPixelPositions ( ) const
inlineoverridevirtual

Reimplemented from QFontEngine.

Definition at line 57 of file qfontengine_coretext_p.h.

◆ supportsTransformation()

bool QCoreTextFontEngine::supportsTransformation ( const QTransform transform) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 925 of file qfontengine_coretext.mm.

References QTransform::TxScale.

◆ supportsVerticalSubPixelPositions()

bool QCoreTextFontEngine::supportsVerticalSubPixelPositions ( ) const
inlineoverridevirtual

Reimplemented from QFontEngine.

Definition at line 58 of file qfontengine_coretext_p.h.

◆ synthesized()

int QCoreTextFontEngine::synthesized ( ) const
inlineoverridevirtual

Reimplemented from QFontEngine.

Definition at line 56 of file qfontengine_coretext_p.h.

◆ underlinePosition()

QFixed QCoreTextFontEngine::underlinePosition ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 941 of file qfontengine_coretext.mm.

References underlinePos.

◆ xHeight()

QFixed QCoreTextFontEngine::xHeight ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 342 of file qfontengine_coretext.mm.

References ctfont, and QFixed::fromReal().

+ Here is the call graph for this function:

Member Data Documentation

◆ avgCharWidth

QFixed QCoreTextFontEngine::avgCharWidth
protected

Definition at line 110 of file qfontengine_coretext_p.h.

Referenced by averageCharWidth(), and init().

◆ cgFont

QCFType<CGFontRef> QCoreTextFontEngine::cgFont
protected

◆ ctfont

◆ face_id

QFontEngine::FaceId QCoreTextFontEngine::face_id
protected

Definition at line 113 of file qfontengine_coretext_p.h.

Referenced by faceId(), and init().

◆ kerningPairsLoaded

bool QCoreTextFontEngine::kerningPairsLoaded
mutableprotected

Definition at line 114 of file qfontengine_coretext_p.h.

Referenced by doKerning(), and init().

◆ synthesisFlags

int QCoreTextFontEngine::synthesisFlags
protected

Definition at line 108 of file qfontengine_coretext_p.h.

Referenced by addGlyphsToPath(), boundingBox(), draw(), imageForGlyph(), and init().

◆ transform

CGAffineTransform QCoreTextFontEngine::transform
protected

Definition at line 109 of file qfontengine_coretext_p.h.

◆ underlinePos

QFixed QCoreTextFontEngine::underlinePos
protected

Definition at line 112 of file qfontengine_coretext_p.h.

Referenced by init(), and underlinePosition().

◆ underlineThickness

QFixed QCoreTextFontEngine::underlineThickness
protected

Definition at line 111 of file qfontengine_coretext_p.h.

Referenced by init(), and lineThickness().


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