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
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 , 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

 QCoreTextFontEngine (CTFontRef font, const QFontDef &def)
 
 QCoreTextFontEngine (CGFontRef font, const QFontDef &def)
 
 ~QCoreTextFontEngine ()
 
glyph_t glyphIndex (uint ucs4) const override
 
int 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
 
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)
 
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, const QTransform &t)
 
virtual GlyphglyphData (glyph_t glyph, const QFixedPoint &subPixelPosition, GlyphFormat neededFormat, const QTransform &t)
 
virtual bool hasInternalCaching () const
 
virtual void removeGlyphFromCache (glyph_t)
 
virtual glyph_metrics_t boundingBox (const QGlyphLayout &glyphs)
 
virtual glyph_metrics_t boundingBox (glyph_t glyph, const QTransform &matrix)
 
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 int glyphCount () 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 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, 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 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
 
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 161 of file qfontengine_coretext.mm.

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

Referenced by cloneWithSize().

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

◆ QCoreTextFontEngine() [2/3]

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

Definition at line 169 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 184 of file qfontengine_coretext.mm.

◆ QCoreTextFontEngine() [3/3]

QCoreTextFontEngine::QCoreTextFontEngine ( const QFontDef & def)
protected

Definition at line 177 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 479 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 511 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 815 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 810 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 837 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 356 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 845 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 313 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 884 of file qfontengine_coretext.mm.

References ctfont.

◆ capHeight()

QFixed QCoreTextFontEngine::capHeight ( ) const
overridevirtual

Implements QFontEngine.

Definition at line 342 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 922 of file qfontengine_coretext.mm.

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

+ Here is the call graph for this function:

◆ create()

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

Definition at line 131 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 58 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 987 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 )

Definition at line 375 of file qfontengine_coretext.mm.

References ctfont, QFontEngine::fontDef, QFontEngine::getGlyphPositions(), i, lineThickness(), QFontDef::pixelSize, positions, Q_UNUSED, qt_scaleForTransform(), synthesisFlags, QFontEngine::SynthesizedBold, QFontEngine::SynthesizedItalic, SYNTHETIC_ITALIC_SKEW, QFixed::toReal(), and QTransform::translate().

+ Here is the call graph for this function:

◆ emSquareSize()

QFixed QCoreTextFontEngine::emSquareSize ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 917 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 687 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 879 of file qfontengine_coretext.mm.

References face_id.

◆ fontSmoothing()

QCoreTextFontEngine::FontSmoothing QCoreTextFontEngine::fontSmoothing ( )
static

Definition at line 608 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 692 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 890 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 895 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 259 of file qfontengine_coretext.mm.

References ctfont, Q_UNLIKELY, and str.

Referenced by maxCharWidth().

+ 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 931 of file qfontengine_coretext.mm.

References ctfont.

◆ hasColorGlyphs()

bool QCoreTextFontEngine::hasColorGlyphs ( ) const
protected

Definition at line 369 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 333 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 947 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 868 of file qfontengine_coretext.mm.

References QGlyphLayout::advances, QFont::AnyStretch, ctfont, 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 361 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 957 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 74 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 853 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 665 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 670 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()

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

Implements QFontEngine.

Definition at line 278 of file qfontengine_coretext.mm.

References ctfont, QString::data(), QFontEngine::GlyphIndicesOnly, QGlyphLayout::glyphs, QFontEngine::isIgnorableChar(), it, 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 936 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 952 of file qfontengine_coretext.mm.

References underlinePos.

◆ xHeight()

QFixed QCoreTextFontEngine::xHeight ( ) const
overridevirtual

Reimplemented from QFontEngine.

Definition at line 351 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: