Qt 4.8
Public Functions | Private Functions | Properties | Friends | List of all members
QFontEngineMac Class Reference

#include <qfontengine_mac_p.h>

Inheritance diagram for QFontEngineMac:
QFontEngine QObject

Public Functions

virtual void addGlyphsToPath (glyph_t *glyphs, QFixedPoint *positions, int numGlyphs, QPainterPath *path, QTextItem::RenderFlags)
 
virtual QImage alphaMapForGlyph (glyph_t)
 
virtual QImage alphaRGBMapForGlyph (glyph_t, QFixed subPixelPosition, int margin, const QTransform &t)
 
virtual QFixed ascent () const
 
virtual QFixed averageCharWidth () const
 
virtual glyph_metrics_t boundingBox (const QGlyphLayout &glyphs)
 
virtual glyph_metrics_t boundingBox (glyph_t glyph)
 
virtual bool canRender (const QChar *string, int len)
 
virtual QFixed descent () const
 
void draw (CGContextRef ctx, qreal x, qreal y, const QTextItemInt &ti, int paintDeviceHeight)
 
virtual FaceId faceId () const
 
virtual QByteArray getSfntTable (uint tag) const
 
virtual void getUnscaledGlyph (glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics)
 
virtual QFixed leading () const
 
virtual qreal maxCharWidth () const
 
virtual const char * name () const
 
virtual Properties properties () const
 
 QFontEngineMac (ATSUStyle baseStyle, ATSUFontID fontID, const QFontDef &def, QFontEngineMacMulti *multiEngine=0)
 
virtual void recalcAdvances (QGlyphLayout *, QTextEngine::ShaperFlags) const
 
virtual bool stringToCMap (const QChar *str, int len, QGlyphLayout *glyphs, int *numGlyphs, QTextEngine::ShaperFlags flags) const
 
virtual int synthesized () const
 
virtual Type type () const
 
virtual QFixed xHeight () const
 
virtual ~QFontEngineMac ()
 
- Public Functions inherited from QFontEngine
void addBitmapFontToPath (qreal x, qreal y, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags)
 
virtual void addOutlineToPath (qreal, qreal, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags flags)
 
virtual glyph_metrics_t alphaMapBoundingBox (glyph_t glyph, QFixed, const QTransform &matrix, GlyphFormat)
 
virtual QImage alphaMapForGlyph (glyph_t glyph, QFixed subPixelPosition)
 
virtual QImage alphaMapForGlyph (glyph_t, const QTransform &t)
 
virtual QImage alphaMapForGlyph (glyph_t, QFixed subPixelPosition, const QTransform &t)
 
virtual glyph_metrics_t boundingBox (glyph_t glyph, const QTransform &matrix)
 
virtual QFontEnginecloneWithSize (qreal) const
 
virtual void doKerning (QGlyphLayout *, QTextEngine::ShaperFlags) const
 
virtual QFixed emSquareSize () const
 
virtual void getGlyphBearings (glyph_t glyph, qreal *leftBearing=0, qreal *rightBearing=0)
 
void getGlyphPositions (const QGlyphLayout &glyphs, const QTransform &matrix, QTextItem::RenderFlags flags, QVarLengthArray< glyph_t > &glyphs_out, QVarLengthArray< QFixedPoint > &positions)
 
virtual HB_Error getPointInOutline (HB_Glyph glyph, int flags, hb_uint32 point, HB_Fixed *xpos, HB_Fixed *ypos, hb_uint32 *nPoints)
 
QByteArray getSfntTable (uint) const
 
virtual bool getSfntTableData (uint, uchar *, uint *) const
 
QFontEngineGlyphCacheglyphCache (void *key, QFontEngineGlyphCache::Type type, const QTransform &transform) const
 
virtual int glyphCount () const
 
HB_Face harfbuzzFace () const
 
HB_Font harfbuzzFont () const
 
virtual QFixed lineThickness () const
 
void loadKerningPairs (QFixed scalingFactor)
 
virtual qreal minLeftBearing () const
 
virtual qreal minRightBearing () const
 
 QFontEngine ()
 
virtual void removeGlyphFromCache (glyph_t)
 
void setGlyphCache (void *key, QFontEngineGlyphCache *data)
 
virtual bool supportsSubPixelPositions () const
 
glyph_metrics_t tightBoundingBox (const QGlyphLayout &glyphs)
 
virtual QFixed underlinePosition () const
 
virtual ~QFontEngine ()
 
- Public Functions inherited from QObject
bool blockSignals (bool b)
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More...
 
const QObjectListchildren () const
 Returns a list of child objects. More...
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectInfo ()
 Dumps information about signal connections, etc. More...
 
void dumpObjectTree ()
 Dumps a tree of children to the debug output. More...
 
QList< QByteArraydynamicPropertyNames () const
 Returns the names of all properties that were dynamically added to the object using setProperty(). More...
 
virtual bool event (QEvent *)
 This virtual function receives events to an object and should return true if the event e was recognized and processed. More...
 
virtual bool eventFilter (QObject *, QEvent *)
 Filters events if this object has been installed as an event filter for the watched object. More...
 
template<typename T >
findChild (const QString &aName=QString()) const
 Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More...
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More...
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More...
 
void installEventFilter (QObject *)
 Installs an event filter filterObj on this object. More...
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false. More...
 
void killTimer (int id)
 Kills the timer with timer identifier, id. More...
 
virtual const QMetaObjectmetaObject () const
 Returns a pointer to the meta-object of this object. More...
 
void moveToThread (QThread *thread)
 Changes the thread affinity for this object and its children. More...
 
QString objectName () const
 
QObjectparent () const
 Returns a pointer to the parent object. More...
 
QVariant property (const char *name) const
 Returns the value of the object's name property. More...
 
Q_INVOKABLE QObject (QObject *parent=0)
 Constructs an object with parent object parent. More...
 
void removeEventFilter (QObject *)
 Removes an event filter object obj from this object. More...
 
void setObjectName (const QString &name)
 
void setParent (QObject *)
 Makes the object a child of parent. More...
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value. More...
 
void setUserData (uint id, QObjectUserData *data)
 
bool signalsBlocked () const
 Returns true if signals are blocked; otherwise returns false. More...
 
int startTimer (int interval)
 Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More...
 
QThreadthread () const
 Returns the thread in which the object lives. More...
 
QObjectUserDatauserData (uint id) const
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects. More...
 

Private Functions

QImage imageForGlyph (glyph_t glyph, int margin, bool colorful)
 Helper function for alphaMapForGlyph and alphaRGBMapForGlyph. More...
 

Properties

QCFType< CGFontRef > cgFont
 
const unsigned char * cmap
 
QByteArray cmapTable
 
ATSUFontID fontID
 
QGlyphLayout kashidaGlyph
 
QFixed m_ascent
 
QFixed m_averageCharWidth
 
QFixed m_descent
 
QFixed m_leading
 
qreal m_maxCharWidth
 
QFixed m_xHeight
 
QFontEngineMacMultimultiEngine
 
ATSUStyle style
 
bool symbolCMap
 
int synthesisFlags
 
CGAffineTransform transform
 

Friends

class QFontEngineMacMulti
 

Additional Inherited Members

- Public Types inherited from QFontEngine
enum  GlyphFormat {
  Format_None, Format_Render = Format_None, Format_Mono, Format_A8,
  Format_A32
}
 
enum  SynthesizedFlags { SynthesizedItalic = 0x1, SynthesizedBold = 0x2, SynthesizedStretch = 0x4 }
 
enum  Type {
  Box, Multi, XLFD, Win,
  Mac, Freetype, QPF1, QPF2,
  Proxy, S60FontEngine, DirectWrite, TestFontEngine = 0x1000
}
 
- Public Slots inherited from QObject
void deleteLater ()
 Schedules this object for deletion. More...
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More...
 
- Static Public Functions inherited from QFontEngine
static QByteArray convertToPostscriptFontFamilyName (const QByteArray &fontFamily)
 
static const uchargetCMap (const uchar *table, uint tableSize, bool *isSymbolFont, int *cmapSize)
 
static quint32 getTrueTypeGlyphIndex (const uchar *cmap, uint unicode)
 
- Static Public Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More...
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 Disconnects signal in object sender from method in object receiver. More...
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
static QString tr (const char *sourceText, const char *comment=0, int n=-1)
 
static QString trUtf8 (const char *sourceText, const char *comment=0, int n=-1)
 
- Public Variables inherited from QFontEngine
uint cache_cost
 
int cache_count
 
QFontDef fontDef
 
uint fsType: 16
 
int glyphFormat
 
HB_Face hbFace
 
HB_FontRec hbFont
 
QVector< KernPairkerning_pairs
 
QAtomicInt ref
 
bool symbol
 
- Static Public Variables inherited from QObject
static const QMetaObject staticMetaObject
 This variable stores the meta-object for the class. More...
 
- Protected Functions inherited from QFontEngine
QFixed lastRightBearing (const QGlyphLayout &glyphs, bool round=false)
 
- Protected Functions inherited from QObject
virtual void childEvent (QChildEvent *)
 This event handler can be reimplemented in a subclass to receive child events. More...
 
virtual void connectNotify (const char *signal)
 This virtual function is called when something has been connected to signal in this object. More...
 
virtual void customEvent (QEvent *)
 This event handler can be reimplemented in a subclass to receive custom events. More...
 
virtual void disconnectNotify (const char *signal)
 This virtual function is called when something has been disconnected from signal in this object. More...
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal. More...
 
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More...
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *)
 This event handler can be reimplemented in a subclass to receive timer events for the object. More...
 
- Static Protected Functions inherited from QFontEngine
static const QVector< QRgb > & grayPalette ()
 
- Protected Variables inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Static Protected Variables inherited from QObject
static const QMetaObject staticQtMetaObject
 

Detailed Description

Definition at line 52 of file qfontengine_mac_p.h.

Constructors and Destructors

◆ QFontEngineMac()

QFontEngineMac::QFontEngineMac ( ATSUStyle  baseStyle,
ATSUFontID  fontID,
const QFontDef def,
QFontEngineMacMulti multiEngine = 0 
)

Definition at line 627 of file qfontengine_mac.mm.

628  : fontID(fontID), multiEngine(multiEngine), cmap(0), symbolCMap(false)
629 {
630  fontDef = def;
631  ATSUCreateAndCopyStyle(baseStyle, &style);
632  ATSFontRef atsFont = FMGetATSFontRefFromFont(fontID);
633  cgFont = CGFontCreateWithPlatformFont(&atsFont);
634 
635  const int maxAttributeCount = 4;
636  ATSUAttributeTag tags[maxAttributeCount + 1];
637  ByteCount sizes[maxAttributeCount + 1];
638  ATSUAttributeValuePtr values[maxAttributeCount + 1];
639  int attributeCount = 0;
640 
641  synthesisFlags = 0;
642 
643  // synthesizing using CG is not recommended
644  quint16 macStyle = 0;
645  {
646  uchar data[4];
647  ByteCount len = 4;
648  if (ATSFontGetTable(atsFont, MAKE_TAG('h', 'e', 'a', 'd'), 44, 4, &data, &len) == noErr)
649  macStyle = qFromBigEndian<quint16>(data);
650  }
651 
652  Boolean atsuBold = false;
653  Boolean atsuItalic = false;
654  if (fontDef.weight >= QFont::Bold) {
655  if (!(macStyle & 1)) {
657  atsuBold = true;
658  tags[attributeCount] = kATSUQDBoldfaceTag;
659  sizes[attributeCount] = sizeof(atsuBold);
660  values[attributeCount] = &atsuBold;
661  ++attributeCount;
662  }
663  }
665  if (!(macStyle & 2)) {
667  atsuItalic = true;
668  tags[attributeCount] = kATSUQDItalicTag;
669  sizes[attributeCount] = sizeof(atsuItalic);
670  values[attributeCount] = &atsuItalic;
671  ++attributeCount;
672  }
673  }
674 
675  tags[attributeCount] = kATSUFontTag;
676  values[attributeCount] = &fontID;
677  sizes[attributeCount] = sizeof(fontID);
678  ++attributeCount;
679 
680  Q_ASSERT(attributeCount < maxAttributeCount + 1);
681  OSStatus err = ATSUSetAttributes(style, attributeCount, tags, sizes, values);
682  Q_ASSERT(err == noErr);
683  Q_UNUSED(err);
684 
685  // CTFontCopyTable
686  quint16 tmpFsType;
687  if (ATSFontGetTable(atsFont, MAKE_TAG('O', 'S', '/', '2'), 8, 2, &tmpFsType, 0) == noErr)
688  fsType = qFromBigEndian<quint16>(tmpFsType);
689  else
690  fsType = 0;
691 
692  if (multiEngine)
693  transform = multiEngine->transform;
694  else
695  transform = CGAffineTransformIdentity;
696 
697  ATSUTextMeasurement metric;
698 
699  ATSUGetAttribute(style, kATSUAscentTag, sizeof(metric), &metric, 0);
700  m_ascent = FixRound(metric);
701 
702  ATSUGetAttribute(style, kATSUDescentTag, sizeof(metric), &metric, 0);
703  m_descent = FixRound(metric);
704 
705  ATSUGetAttribute(style, kATSULeadingTag, sizeof(metric), &metric, 0);
706  m_leading = FixRound(metric);
707 
708  ATSFontMetrics metrics;
709 
710  ATSFontGetHorizontalMetrics(FMGetATSFontRefFromFont(fontID), kATSOptionFlagsDefault, &metrics);
711  m_maxCharWidth = metrics.maxAdvanceWidth * fontDef.pointSize;
712 
713  ATSFontGetHorizontalMetrics(FMGetATSFontRefFromFont(fontID), kATSOptionFlagsDefault, &metrics);
714  m_xHeight = QFixed::fromReal(metrics.xHeight * fontDef.pointSize);
715 
716  ATSFontGetHorizontalMetrics(FMGetATSFontRefFromFont(fontID), kATSOptionFlagsDefault, &metrics);
717  m_averageCharWidth = QFixed::fromReal(metrics.avgAdvanceWidth * fontDef.pointSize);
718 
719  // Use width of 'X' if ATSFontGetHorizontalMetrics returns 0 for avgAdvanceWidth.
720  if (m_averageCharWidth == QFixed(0)) {
721  QChar c('X');
722  QGlyphLayoutArray<1> glyphs;
723  int nglyphs = 1;
724  stringToCMap(&c, 1, &glyphs, &nglyphs, 0);
725  glyph_metrics_t metrics = boundingBox(glyphs);
726  m_averageCharWidth = metrics.width;
727  }
728 }
QCFType< CGFontRef > cgFont
unsigned char c[8]
Definition: qnumeric_p.h:62
qreal pointSize
Definition: qfont_p.h:89
static QFixed fromReal(qreal r)
Definition: qfixed_p.h:70
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
The QChar class provides a 16-bit Unicode character.
Definition: qchar.h:72
#define MAKE_TAG(ch1, ch2, ch3, ch4)
virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs)
unsigned char uchar
Definition: qglobal.h:994
QFontEngineMacMulti * multiEngine
unsigned short quint16
Definition: qglobal.h:936
virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *numGlyphs, QTextEngine::ShaperFlags flags) const
static const char * data(const QByteArray &arr)
uint weight
Definition: qfont_p.h:95
quint16 values[128]
signed long OSStatus
quint16 qFromBigEndian< quint16 >(const uchar *src)
Definition: qendian.h:249
uint style
Definition: qfont_p.h:97
const unsigned char * cmap
CGAffineTransform transform
QFontDef fontDef
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
CGAffineTransform transform

◆ ~QFontEngineMac()

QFontEngineMac::~QFontEngineMac ( )
virtual

Definition at line 730 of file qfontengine_mac.mm.

731 {
732  ATSUDisposeStyle(style);
733 }

Functions

◆ addGlyphsToPath()

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

Reimplemented from QFontEngine.

Definition at line 918 of file qfontengine_mac.mm.

920 {
921  addGlyphsToPathHelper(style, glyphs, positions, numGlyphs, path);
922 }
static void addGlyphsToPathHelper(ATSUStyle style, glyph_t *glyphs, QFixedPoint *positions, int numGlyphs, QPainterPath *path)

◆ alphaMapForGlyph()

QImage QFontEngineMac::alphaMapForGlyph ( glyph_t  glyph)
virtual

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 981 of file qfontengine_mac.mm.

Referenced by type().

982 {
983  QImage im = imageForGlyph(glyph, 2, false);
984 
985  QImage indexed(im.width(), im.height(), QImage::Format_Indexed8);
986  QVector<QRgb> colors(256);
987  for (int i=0; i<256; ++i)
988  colors[i] = qRgba(0, 0, 0, i);
989  indexed.setColorTable(colors);
990 
991  for (int y=0; y<im.height(); ++y) {
992  uint *src = (uint*) im.scanLine(y);
993  uchar *dst = indexed.scanLine(y);
994  for (int x=0; x<im.width(); ++x) {
995  *dst = qGray(*src);
996  ++dst;
997  ++src;
998  }
999  }
1000 
1001  return indexed;
1002 }
unsigned char uchar
Definition: qglobal.h:994
Q_GUI_EXPORT_INLINE QRgb qRgba(int r, int g, int b, int a)
Definition: qrgb.h:72
QImage imageForGlyph(glyph_t glyph, int margin, bool colorful)
Helper function for alphaMapForGlyph and alphaRGBMapForGlyph.
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
unsigned int uint
Definition: qglobal.h:996
Q_GUI_EXPORT_INLINE int qGray(int r, int g, int b)
Definition: qrgb.h:75
int width() const
Returns the width of the image.
Definition: qimage.cpp:1557
int height() const
Returns the height of the image.
Definition: qimage.cpp:1572
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
Definition: qimage.cpp:1886

◆ alphaRGBMapForGlyph()

QImage QFontEngineMac::alphaRGBMapForGlyph ( glyph_t  glyph,
QFixed  subPixelPosition,
int  margin,
const QTransform t 
)
virtual

Reimplemented from QFontEngine.

Definition at line 1004 of file qfontengine_mac.mm.

Referenced by type().

1005 {
1006  QImage im = imageForGlyph(glyph, margin, true);
1007 
1008  if (t.type() >= QTransform::TxScale) {
1009  im = im.transformed(t);
1010  }
1011 
1013 
1014  return im;
1015 }
void qGamma_correct_back_to_linear_cs(QImage *image)
Definition: qimage.cpp:3938
TransformationType type() const
Returns the transformation type of this matrix.
QImage imageForGlyph(glyph_t glyph, int margin, bool colorful)
Helper function for alphaMapForGlyph and alphaRGBMapForGlyph.
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
QImage transformed(const QMatrix &matrix, Qt::TransformationMode mode=Qt::FastTransformation) const
Returns a copy of the image that is transformed using the given transformation matrix and transformat...
Definition: qimage.cpp:4698

◆ ascent()

QFixed QFontEngineMac::ascent ( ) const
virtual

Implements QFontEngine.

Definition at line 846 of file qfontengine_mac.mm.

Referenced by boundingBox().

847 {
849  ? m_ascent.round()
850  : m_ascent;
851 }
QFixed round() const
Definition: qfixed_p.h:80
QFontDef fontDef
uint styleStrategy
Definition: qfont_p.h:92

◆ averageCharWidth()

QFixed QFontEngineMac::averageCharWidth ( ) const
virtual

Reimplemented from QFontEngine.

Definition at line 883 of file qfontengine_mac.mm.

884 {
888 }
QFixed round() const
Definition: qfixed_p.h:80
QFontDef fontDef
uint styleStrategy
Definition: qfont_p.h:92

◆ boundingBox() [1/2]

glyph_metrics_t QFontEngineMac::boundingBox ( const QGlyphLayout glyphs)
virtual

Implements QFontEngine.

Definition at line 804 of file qfontengine_mac.mm.

Referenced by imageForGlyph(), and QFontEngineMac().

805 {
806  QFixed w;
808  for (int i = 0; i < glyphs.numGlyphs; ++i) {
809  w += round ? glyphs.effectiveAdvance(i).round()
810  : glyphs.effectiveAdvance(i);
811  }
812  return glyph_metrics_t(0, -(ascent()), w - lastRightBearing(glyphs, round), ascent()+descent(), w, 0);
813 }
virtual QFixed ascent() const
QFixed lastRightBearing(const QGlyphLayout &glyphs, bool round=false)
QFixed round() const
Definition: qfixed_p.h:80
virtual QFixed descent() const
QFixed effectiveAdvance(int item) const
QFontDef fontDef
uint styleStrategy
Definition: qfont_p.h:92

◆ boundingBox() [2/2]

glyph_metrics_t QFontEngineMac::boundingBox ( glyph_t  glyph)
virtual

Implements QFontEngine.

Definition at line 815 of file qfontengine_mac.mm.

816 {
817  GlyphID atsuGlyph = glyph;
818 
819  ATSGlyphScreenMetrics metrics;
820 
821  ATSUGlyphGetScreenMetrics(style, 1, &atsuGlyph, 0,
822  /* iForcingAntiAlias =*/ false,
823  /* iAntiAliasSwitch =*/true,
824  &metrics);
825 
826  // ### check again
827 
828  glyph_metrics_t gm;
829  gm.width = int(metrics.width);
830  gm.height = int(metrics.height);
831  gm.x = QFixed::fromReal(metrics.topLeft.x);
832  gm.y = -QFixed::fromReal(metrics.topLeft.y);
833  gm.xoff = QFixed::fromReal(metrics.deviceAdvance.x);
834  gm.yoff = QFixed::fromReal(metrics.deviceAdvance.y);
835 
837  gm.x = gm.x.floor();
838  gm.y = gm.y.floor();
839  gm.xoff = gm.xoff.round();
840  gm.yoff = gm.yoff.round();
841  }
842 
843  return gm;
844 }
static QFixed fromReal(qreal r)
Definition: qfixed_p.h:70
QFixed floor() const
Definition: qfixed_p.h:81
QFixed round() const
Definition: qfixed_p.h:80
quint16 GlyphID
QFontDef fontDef
uint styleStrategy
Definition: qfont_p.h:92

◆ canRender()

bool QFontEngineMac::canRender ( const QChar string,
int  len 
)
virtual

Implements QFontEngine.

Definition at line 1018 of file qfontengine_mac.mm.

Referenced by name(), and QFontEngineMacMulti::name().

1019 {
1020  Q_ASSERT(false);
1021  Q_UNUSED(string);
1022  Q_UNUSED(len);
1023  return false;
1024 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ descent()

QFixed QFontEngineMac::descent ( ) const
virtual

Implements QFontEngine.

Definition at line 853 of file qfontengine_mac.mm.

Referenced by boundingBox().

854 {
855  // subtract a pixel to even out the historical +1 in QFontMetrics::height().
856  // Fix in Qt 5.
858  ? m_descent.round() - 1
859  : m_descent;
860 }
QFixed round() const
Definition: qfixed_p.h:80
QFontDef fontDef
uint styleStrategy
Definition: qfont_p.h:92

◆ draw()

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

Definition at line 1026 of file qfontengine_mac.mm.

Referenced by type().

1027 {
1029  QVarLengthArray<glyph_t> glyphs;
1030  QTransform matrix;
1031  matrix.translate(x, y);
1032  getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);
1033  if (glyphs.size() == 0)
1034  return;
1035 
1036  CGContextSetFontSize(ctx, fontDef.pixelSize);
1037 
1038  CGAffineTransform oldTextMatrix = CGContextGetTextMatrix(ctx);
1039 
1040  CGAffineTransform cgMatrix = CGAffineTransformMake(1, 0, 0, -1, 0, -paintDeviceHeight);
1041 
1042  CGAffineTransformConcat(cgMatrix, oldTextMatrix);
1043 
1045  cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, -tanf(14 * acosf(0) / 90), 1, 0, 0));
1046 
1047  cgMatrix = CGAffineTransformConcat(cgMatrix, transform);
1048 
1049  CGContextSetTextMatrix(ctx, cgMatrix);
1050 
1051  CGContextSetTextDrawingMode(ctx, kCGTextFill);
1052 
1053 
1054  QVarLengthArray<CGSize> advances(glyphs.size());
1055  QVarLengthArray<CGGlyph> cgGlyphs(glyphs.size());
1056 
1057  for (int i = 0; i < glyphs.size() - 1; ++i) {
1058  advances[i].width = (positions[i + 1].x - positions[i].x).toReal();
1059  advances[i].height = (positions[i + 1].y - positions[i].y).toReal();
1060  cgGlyphs[i] = glyphs[i];
1061  }
1062  advances[glyphs.size() - 1].width = 0;
1063  advances[glyphs.size() - 1].height = 0;
1064  cgGlyphs[glyphs.size() - 1] = glyphs[glyphs.size() - 1];
1065 
1066  CGContextSetFont(ctx, cgFont);
1067 
1068  CGContextSetTextPosition(ctx, positions[0].x.toReal(), positions[0].y.toReal());
1069 
1070  CGContextShowGlyphsWithAdvances(ctx, cgGlyphs.data(), advances.data(), glyphs.size());
1071 
1073  CGContextSetTextPosition(ctx, positions[0].x.toReal() + 0.5 * lineThickness().toReal(),
1074  positions[0].y.toReal());
1075 
1076  CGContextShowGlyphsWithAdvances(ctx, cgGlyphs.data(), advances.data(), glyphs.size());
1077  }
1078 
1079  CGContextSetTextMatrix(ctx, oldTextMatrix);
1080 }
virtual QFixed lineThickness() const
QCFType< CGFontRef > cgFont
RenderFlags flags
QTransform & translate(qreal dx, qreal dy)
Moves the coordinate system dx along the x axis and dy along the y axis, and returns a reference to t...
Definition: qtransform.cpp:417
QGlyphLayout glyphs
static const QCssKnownValue positions[NumKnownPositionModes - 1]
Definition: qcssparser.cpp:329
void getGlyphPositions(const QGlyphLayout &glyphs, const QTransform &matrix, QTextItem::RenderFlags flags, QVarLengthArray< glyph_t > &glyphs_out, QVarLengthArray< QFixedPoint > &positions)
qreal pixelSize
Definition: qfont_p.h:90
#define ctx
Definition: qgl.cpp:6094
qreal toReal() const
Definition: qfixed_p.h:77
QFontDef fontDef
int size() const
static qreal toReal(Register *reg, int type, bool *ok=0)
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65
CGAffineTransform transform

◆ faceId()

QFontEngine::FaceId QFontEngineMac::faceId ( ) const
virtual

Reimplemented from QFontEngine.

Definition at line 1082 of file qfontengine_mac.mm.

Referenced by type().

1083 {
1084  FaceId ret;
1085 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
1087  // CTFontGetPlatformFont
1088  FSRef ref;
1089  if (ATSFontGetFileReference(FMGetATSFontRefFromFont(fontID), &ref) != noErr)
1090  return ret;
1091  ret.filename = QByteArray(128, 0);
1092  ret.index = fontID;
1093  FSRefMakePath(&ref, (UInt8 *)ret.filename.data(), ret.filename.size());
1094 }else
1095 #endif
1096 {
1097  FSSpec spec;
1098  if (ATSFontGetFileSpecification(FMGetATSFontRefFromFont(fontID), &spec) != noErr)
1099  return ret;
1100 
1101  FSRef ref;
1102  FSpMakeFSRef(&spec, &ref);
1103  ret.filename = QByteArray(128, 0);
1104  ret.index = fontID;
1105  FSRefMakePath(&ref, (UInt8 *)ret.filename.data(), ret.filename.size());
1106 }
1107  return ret;
1108 }
QAtomicInt ref
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
static const MacVersion MacintoshVersion
the version of the Macintosh operating system on which the application is run (Mac only)...
Definition: qglobal.h:1646

◆ getSfntTable()

QByteArray QFontEngineMac::getSfntTable ( uint  tag) const
virtual

Definition at line 1110 of file qfontengine_mac.mm.

Referenced by stringToCMap(), and type().

1111 {
1112  ATSFontRef atsFont = FMGetATSFontRefFromFont(fontID);
1113 
1114  ByteCount length;
1115  OSStatus status = ATSFontGetTable(atsFont, tag, 0, 0, 0, &length);
1116  if (status != noErr)
1117  return QByteArray();
1118  QByteArray table(length, 0);
1119  // CTFontCopyTable
1120  status = ATSFontGetTable(atsFont, tag, 0, table.length(), table.data(), &length);
1121  if (status != noErr)
1122  return QByteArray();
1123  return table;
1124 }
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
static LibLoadStatus status
Definition: qlocale_icu.cpp:69
signed long OSStatus

◆ getUnscaledGlyph()

void QFontEngineMac::getUnscaledGlyph ( glyph_t  glyph,
QPainterPath path,
glyph_metrics_t metrics 
)
virtual

Reimplemented from QFontEngine.

Definition at line 1183 of file qfontengine_mac.mm.

Referenced by type().

1184 {
1185  ATSUStyle unscaledStyle;
1186  ATSUCreateAndCopyStyle(style, &unscaledStyle);
1187 
1188  int emSquare = properties().emSquare.toInt();
1189 
1190  const int maxAttributeCount = 4;
1191  ATSUAttributeTag tags[maxAttributeCount + 1];
1192  ByteCount sizes[maxAttributeCount + 1];
1193  ATSUAttributeValuePtr values[maxAttributeCount + 1];
1194  int attributeCount = 0;
1195 
1196  Fixed size = FixRatio(emSquare, 1);
1197  tags[attributeCount] = kATSUSizeTag;
1198  sizes[attributeCount] = sizeof(size);
1199  values[attributeCount] = &size;
1200  ++attributeCount;
1201 
1202  Q_ASSERT(attributeCount < maxAttributeCount + 1);
1203  OSStatus err = ATSUSetAttributes(unscaledStyle, attributeCount, tags, sizes, values);
1204  Q_ASSERT(err == noErr);
1205  Q_UNUSED(err);
1206 
1207  // various CTFont metrics functions: CTFontGetBoundingRectsForGlyphs, CTFontGetAdvancesForGlyphs
1208  GlyphID atsuGlyph = glyph;
1209  ATSGlyphScreenMetrics atsuMetrics;
1210  ATSUGlyphGetScreenMetrics(unscaledStyle, 1, &atsuGlyph, 0,
1211  /* iForcingAntiAlias =*/ false,
1212  /* iAntiAliasSwitch =*/true,
1213  &atsuMetrics);
1214 
1215  metrics->width = int(atsuMetrics.width);
1216  metrics->height = int(atsuMetrics.height);
1217  metrics->x = QFixed::fromReal(atsuMetrics.topLeft.x);
1218  metrics->y = -QFixed::fromReal(atsuMetrics.topLeft.y);
1219  metrics->xoff = QFixed::fromReal(atsuMetrics.deviceAdvance.x);
1220  metrics->yoff = QFixed::fromReal(atsuMetrics.deviceAdvance.y);
1221 
1222  QFixedPoint p;
1223  addGlyphsToPathHelper(unscaledStyle, &glyph, &p, 1, path);
1224 
1225  ATSUDisposeStyle(unscaledStyle);
1226 }
static void addGlyphsToPathHelper(ATSUStyle style, glyph_t *glyphs, QFixedPoint *positions, int numGlyphs, QPainterPath *path)
static QFixed fromReal(qreal r)
Definition: qfixed_p.h:70
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
int toInt() const
Definition: qfixed_p.h:76
quint16 values[128]
signed long OSStatus
quint16 GlyphID
virtual Properties properties() const
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ imageForGlyph()

QImage QFontEngineMac::imageForGlyph ( glyph_t  glyph,
int  margin,
bool  colorful 
)
private

Helper function for alphaMapForGlyph and alphaRGBMapForGlyph.

The two are identical, except for the subpixel antialiasing...

Definition at line 929 of file qfontengine_mac.mm.

Referenced by alphaMapForGlyph(), alphaRGBMapForGlyph(), and type().

930 {
931  const glyph_metrics_t br = boundingBox(glyph);
933  im.fill(0xff000000);
934 
936  uint cgflags = kCGImageAlphaNoneSkipFirst;
937 #ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version
938  cgflags |= kCGBitmapByteOrder32Host;
939 #endif
940  CGContextRef ctx = CGBitmapContextCreate(im.bits(), im.width(), im.height(),
941  8, im.bytesPerLine(), colorspace,
942  cgflags);
943  CGContextSetFontSize(ctx, fontDef.pixelSize);
944  CGContextSetShouldAntialias(ctx, fontDef.pointSize > qt_antialiasing_threshold && !(fontDef.styleStrategy & QFont::NoAntialias));
945  // turn off sub-pixel hinting - no support for that in OpenGL
946  CGContextSetShouldSmoothFonts(ctx, colorful);
947  CGAffineTransform oldTextMatrix = CGContextGetTextMatrix(ctx);
948  CGAffineTransform cgMatrix = CGAffineTransformMake(1, 0, 0, 1, 0, 0);
949  CGAffineTransformConcat(cgMatrix, oldTextMatrix);
950 
952  cgMatrix = CGAffineTransformConcat(cgMatrix, CGAffineTransformMake(1, 0, tanf(14 * acosf(0) / 90), 1, 0, 0));
953 
954  cgMatrix = CGAffineTransformConcat(cgMatrix, transform);
955 
956  CGContextSetTextMatrix(ctx, cgMatrix);
957  CGContextSetRGBFillColor(ctx, 1, 1, 1, 1);
958  CGContextSetTextDrawingMode(ctx, kCGTextFill);
959  CGContextSetFont(ctx, cgFont);
960 
961  qreal pos_x = -br.x.toReal() + 1;
962  qreal pos_y = im.height() + br.y.toReal() - 2;
963  CGContextSetTextPosition(ctx, pos_x, pos_y);
964 
965  CGSize advance;
966  advance.width = 0;
967  advance.height = 0;
968  CGGlyph cgGlyph = glyph;
969  CGContextShowGlyphsWithAdvances(ctx, &cgGlyph, &advance, 1);
970 
972  CGContextSetTextPosition(ctx, pos_x + 0.5 * lineThickness().toReal(), pos_y);
973  CGContextShowGlyphsWithAdvances(ctx, &cgGlyph, &advance, 1);
974  }
975 
976  CGContextRelease(ctx);
977 
978  return im;
979 }
virtual QFixed lineThickness() const
static CGColorSpaceRef macGenericColorSpace()
QCFType< CGFontRef > cgFont
double qreal
Definition: qglobal.h:1193
qreal pointSize
Definition: qfont_p.h:89
virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs)
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
unsigned int uint
Definition: qglobal.h:996
int qt_antialiasing_threshold
qreal pixelSize
Definition: qfont_p.h:90
struct CGColorSpace * CGColorSpaceRef
#define ctx
Definition: qgl.cpp:6094
qreal toReal() const
Definition: qfixed_p.h:77
struct CGContext * CGContextRef
QFontDef fontDef
uint styleStrategy
Definition: qfont_p.h:92
Q_DECL_CONSTEXPR int qRound(qreal d)
Definition: qglobal.h:1203
static qreal toReal(Register *reg, int type, bool *ok=0)
CGAffineTransform transform

◆ leading()

QFixed QFontEngineMac::leading ( ) const
virtual

Implements QFontEngine.

Definition at line 862 of file qfontengine_mac.mm.

863 {
865  ? m_leading.round()
866  : m_leading;
867 }
QFixed round() const
Definition: qfixed_p.h:80
QFontDef fontDef
uint styleStrategy
Definition: qfont_p.h:92

◆ maxCharWidth()

qreal QFontEngineMac::maxCharWidth ( ) const
virtual

Implements QFontEngine.

Definition at line 869 of file qfontengine_mac.mm.

870 {
873  : m_maxCharWidth;
874 }
QFontDef fontDef
uint styleStrategy
Definition: qfont_p.h:92
Q_DECL_CONSTEXPR int qRound(qreal d)
Definition: qglobal.h:1203

◆ name()

virtual const char* QFontEngineMac::name ( ) const
inlinevirtual

Implements QFontEngine.

Definition at line 75 of file qfontengine_mac_p.h.

75 { return "QFontEngineMac"; }

◆ properties()

QFontEngine::Properties QFontEngineMac::properties ( ) const
virtual

Reimplemented from QFontEngine.

Definition at line 1126 of file qfontengine_mac.mm.

Referenced by getUnscaledGlyph(), and type().

1127 {
1129  ATSFontRef atsFont = FMGetATSFontRefFromFont(fontID);
1130  quint16 tmp;
1131  // CTFontGetUnitsPerEm
1132  if (ATSFontGetTable(atsFont, MAKE_TAG('h', 'e', 'a', 'd'), 18, 2, &tmp, 0) == noErr)
1133  props.emSquare = qFromBigEndian<quint16>(tmp);
1134  struct {
1135  qint16 xMin;
1136  qint16 yMin;
1137  qint16 xMax;
1138  qint16 yMax;
1139  } bbox;
1140  bbox.xMin = bbox.xMax = bbox.yMin = bbox.yMax = 0;
1141  // CTFontGetBoundingBox
1142  if (ATSFontGetTable(atsFont, MAKE_TAG('h', 'e', 'a', 'd'), 36, 8, &bbox, 0) == noErr) {
1143  bbox.xMin = qFromBigEndian<quint16>(bbox.xMin);
1144  bbox.yMin = qFromBigEndian<quint16>(bbox.yMin);
1145  bbox.xMax = qFromBigEndian<quint16>(bbox.xMax);
1146  bbox.yMax = qFromBigEndian<quint16>(bbox.yMax);
1147  }
1148  struct {
1149  qint16 ascender;
1150  qint16 descender;
1151  qint16 linegap;
1152  } metrics;
1153  metrics.ascender = metrics.descender = metrics.linegap = 0;
1154  // CTFontGetAscent, etc.
1155  if (ATSFontGetTable(atsFont, MAKE_TAG('h', 'h', 'e', 'a'), 4, 6, &metrics, 0) == noErr) {
1156  metrics.ascender = qFromBigEndian<quint16>(metrics.ascender);
1157  metrics.descender = qFromBigEndian<quint16>(metrics.descender);
1158  metrics.linegap = qFromBigEndian<quint16>(metrics.linegap);
1159  }
1160  props.ascent = metrics.ascender;
1161  props.descent = -metrics.descender;
1162  props.leading = metrics.linegap;
1163  props.boundingBox = QRectF(bbox.xMin, -bbox.yMax,
1164  bbox.xMax - bbox.xMin,
1165  bbox.yMax - bbox.yMin);
1166  props.italicAngle = 0;
1167  props.capHeight = props.ascent;
1168 
1169  qint16 lw = 0;
1170  // fonts lie
1171  if (ATSFontGetTable(atsFont, MAKE_TAG('p', 'o', 's', 't'), 10, 2, &lw, 0) == noErr)
1172  lw = qFromBigEndian<quint16>(lw);
1173  props.lineWidth = lw;
1174 
1175  // CTFontCopyPostScriptName
1176  QCFString psName;
1177  if (ATSFontGetPostScriptName(FMGetATSFontRefFromFont(fontID), kATSOptionFlagsDefault, &psName) == noErr)
1178  props.postscriptName = QString(psName).toUtf8();
1180  return props;
1181 }
QByteArray toUtf8() const Q_REQUIRED_RESULT
Returns a UTF-8 representation of the string as a QByteArray.
Definition: qstring.cpp:4074
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define MAKE_TAG(ch1, ch2, ch3, ch4)
The QRectF class defines a rectangle in the plane using floating point precision. ...
Definition: qrect.h:511
short qint16
Definition: qglobal.h:935
unsigned short quint16
Definition: qglobal.h:936
quint16 qFromBigEndian< quint16 >(const uchar *src)
Definition: qendian.h:249
static QByteArray convertToPostscriptFontFamilyName(const QByteArray &fontFamily)

◆ recalcAdvances()

void QFontEngineMac::recalcAdvances ( QGlyphLayout ,
QTextEngine::ShaperFlags   
) const
virtual

This is a callback from harfbuzz. The font engine uses the font-system in use to find out the advances of each glyph and set it on the layout.

Reimplemented from QFontEngine.

Definition at line 778 of file qfontengine_mac.mm.

Referenced by stringToCMap().

779 {
780  Q_UNUSED(flags)
781 
782  QVarLengthArray<GlyphID> atsuGlyphs(glyphs->numGlyphs);
783  for (int i = 0; i < glyphs->numGlyphs; ++i)
784  atsuGlyphs[i] = glyphs->glyphs[i];
785 
786  QVarLengthArray<ATSGlyphScreenMetrics> metrics(glyphs->numGlyphs);
787 
788  ATSUGlyphGetScreenMetrics(style, glyphs->numGlyphs, atsuGlyphs.data(), sizeof(GlyphID),
789  /* iForcingAntiAlias =*/ false,
790  /* iAntiAliasSwitch =*/true,
791  metrics.data());
792 
793  for (int i = 0; i < glyphs->numGlyphs; ++i) {
794  glyphs->advances_x[i] = QFixed::fromReal(metrics[i].deviceAdvance.x);
795  glyphs->advances_y[i] = QFixed::fromReal(metrics[i].deviceAdvance.y);
796 
798  glyphs->advances_x[i] = glyphs->advances_x[i].round();
799  glyphs->advances_y[i] = glyphs->advances_y[i].round();
800  }
801  }
802 }
static QFixed fromReal(qreal r)
Definition: qfixed_p.h:70
quint16 GlyphID
QFontDef fontDef
uint styleStrategy
Definition: qfont_p.h:92
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ stringToCMap()

bool QFontEngineMac::stringToCMap ( const QChar str,
int  len,
QGlyphLayout glyphs,
int *  numGlyphs,
QTextEngine::ShaperFlags  flags 
) const
virtual

Implements QFontEngine.

Definition at line 746 of file qfontengine_mac.mm.

Referenced by QFontEngineMac().

747 {
748  if (!cmap) {
749  cmapTable = getSfntTable(MAKE_TAG('c', 'm', 'a', 'p'));
750  int size = 0;
751  cmap = getCMap(reinterpret_cast<const uchar *>(cmapTable.constData()), cmapTable.size(), &symbolCMap, &size);
752  if (!cmap)
753  return false;
754  }
755  if (symbolCMap) {
756  for (int i = 0; i < len; ++i) {
757  unsigned int uc = getChar(str, i, len);
758  glyphs->glyphs[i] = getTrueTypeGlyphIndex(cmap, uc);
759  if(!glyphs->glyphs[i] && uc < 0x100)
760  glyphs->glyphs[i] = getTrueTypeGlyphIndex(cmap, uc + 0xf000);
761  }
762  } else {
763  for (int i = 0; i < len; ++i) {
764  unsigned int uc = getChar(str, i, len);
765  glyphs->glyphs[i] = getTrueTypeGlyphIndex(cmap, uc);
766  }
767  }
768 
769  *nglyphs = len;
770  glyphs->numGlyphs = *nglyphs;
771 
772  if (!(flags & QTextEngine::GlyphIndicesOnly))
773  recalcAdvances(glyphs, flags);
774 
775  return true;
776 }
HB_Glyph * glyphs
static const uchar * getCMap(const uchar *table, uint tableSize, bool *isSymbolFont, int *cmapSize)
static quint32 getTrueTypeGlyphIndex(const uchar *cmap, uint unicode)
#define MAKE_TAG(ch1, ch2, ch3, ch4)
static unsigned int getChar(const QChar *str, int &i, const int len)
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
QByteArray cmapTable
const unsigned char * cmap
int size() const
Returns the number of bytes in this byte array.
Definition: qbytearray.h:402
virtual QByteArray getSfntTable(uint tag) const
virtual void recalcAdvances(QGlyphLayout *, QTextEngine::ShaperFlags) const

◆ synthesized()

virtual int QFontEngineMac::synthesized ( ) const
inlinevirtual

Reimplemented from QFontEngine.

Definition at line 79 of file qfontengine_mac_p.h.

79 { return synthesisFlags; }

◆ type()

virtual Type QFontEngineMac::type ( ) const
inlinevirtual

Implements QFontEngine.

Definition at line 81 of file qfontengine_mac_p.h.

◆ xHeight()

QFixed QFontEngineMac::xHeight ( ) const
virtual

Reimplemented from QFontEngine.

Definition at line 876 of file qfontengine_mac.mm.

877 {
879  ? m_xHeight.round()
880  : m_xHeight;
881 }
QFixed round() const
Definition: qfixed_p.h:80
QFontDef fontDef
uint styleStrategy
Definition: qfont_p.h:92

Friends and Related Functions

◆ QFontEngineMacMulti

friend class QFontEngineMacMulti
friend

Definition at line 54 of file qfontengine_mac_p.h.

Properties

◆ cgFont

QCFType<CGFontRef> QFontEngineMac::cgFont
private

Definition at line 96 of file qfontengine_mac_p.h.

Referenced by draw(), imageForGlyph(), and QFontEngineMac().

◆ cmap

const unsigned char* QFontEngineMac::cmap
mutableprivate

Definition at line 101 of file qfontengine_mac_p.h.

Referenced by stringToCMap().

◆ cmapTable

QByteArray QFontEngineMac::cmapTable
mutableprivate

Definition at line 103 of file qfontengine_mac_p.h.

Referenced by stringToCMap().

◆ fontID

ATSUFontID QFontEngineMac::fontID
private

◆ kashidaGlyph

QGlyphLayout QFontEngineMac::kashidaGlyph
mutableprivate

Definition at line 99 of file qfontengine_mac_p.h.

◆ m_ascent

QFixed QFontEngineMac::m_ascent
private

Definition at line 105 of file qfontengine_mac_p.h.

Referenced by ascent(), and QFontEngineMac().

◆ m_averageCharWidth

QFixed QFontEngineMac::m_averageCharWidth
private

Definition at line 110 of file qfontengine_mac_p.h.

Referenced by averageCharWidth(), and QFontEngineMac().

◆ m_descent

QFixed QFontEngineMac::m_descent
private

Definition at line 106 of file qfontengine_mac_p.h.

Referenced by descent(), and QFontEngineMac().

◆ m_leading

QFixed QFontEngineMac::m_leading
private

Definition at line 107 of file qfontengine_mac_p.h.

Referenced by leading(), and QFontEngineMac().

◆ m_maxCharWidth

qreal QFontEngineMac::m_maxCharWidth
private

Definition at line 108 of file qfontengine_mac_p.h.

Referenced by maxCharWidth(), and QFontEngineMac().

◆ m_xHeight

QFixed QFontEngineMac::m_xHeight
private

Definition at line 109 of file qfontengine_mac_p.h.

Referenced by QFontEngineMac(), and xHeight().

◆ multiEngine

QFontEngineMacMulti* QFontEngineMac::multiEngine
private

Definition at line 100 of file qfontengine_mac_p.h.

Referenced by QFontEngineMacMulti::~QFontEngineMacMulti().

◆ style

ATSUStyle QFontEngineMac::style
private

◆ symbolCMap

bool QFontEngineMac::symbolCMap
mutableprivate

Definition at line 102 of file qfontengine_mac_p.h.

Referenced by stringToCMap().

◆ synthesisFlags

int QFontEngineMac::synthesisFlags
private

Definition at line 98 of file qfontengine_mac_p.h.

Referenced by draw(), imageForGlyph(), QFontEngineMac(), and synthesized().

◆ transform

CGAffineTransform QFontEngineMac::transform
private

Definition at line 104 of file qfontengine_mac_p.h.

Referenced by draw(), imageForGlyph(), and QFontEngineMac().


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