summaryrefslogtreecommitdiffstats
path: root/src/widgets/platforms/mac/qfontengine_coretext.mm
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-07-12 12:52:22 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-07-12 12:52:22 +0200
commit2371147354d4436bb54c588662ac315dd4c2f940 (patch)
tree5c90b1dd18de394cff2fb4e1bedc628da3c7d341 /src/widgets/platforms/mac/qfontengine_coretext.mm
parent54ec6d177e0e8fb04cd01e70461484a80ca1f7a4 (diff)
parent82454b6014a7ee0b048b4db8d64a21de849d4ab9 (diff)
Merge remote branch 'gerrit/master' into refactor
Conflicts: src/gui/image/qicon.cpp src/gui/image/qicon.h src/gui/image/qicon_p.h src/gui/text/qfontdatabase.cpp src/plugins/platforms/wayland/gl_integration/qwaylandglwindowsurface.cpp src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandglcontext.cpp src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglwindow.cpp sync.profile Change-Id: Ie0a23a12177ff51bf562e15b2dd41f071afb19b4
Diffstat (limited to 'src/widgets/platforms/mac/qfontengine_coretext.mm')
-rw-r--r--src/widgets/platforms/mac/qfontengine_coretext.mm20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/widgets/platforms/mac/qfontengine_coretext.mm b/src/widgets/platforms/mac/qfontengine_coretext.mm
index a68a1551d9..303da8d363 100644
--- a/src/widgets/platforms/mac/qfontengine_coretext.mm
+++ b/src/widgets/platforms/mac/qfontengine_coretext.mm
@@ -492,17 +492,6 @@ void QCoreTextFontEngine::init()
avgCharWidth = QFixed::fromReal(width * fontDef.pixelSize / emSize);
} else
avgCharWidth = QFontEngine::averageCharWidth();
-
- ctMaxCharWidth = ctMinLeftBearing = ctMinRightBearing = 0;
- QByteArray hheaTable = getSfntTable(MAKE_TAG('h', 'h', 'e', 'a'));
- if (hheaTable.size() >= 16) {
- quint16 width = qFromBigEndian<quint16>(reinterpret_cast<const uchar *>(hheaTable.constData() + 10));
- ctMaxCharWidth = width * fontDef.pixelSize / emSize;
- qint16 bearing = qFromBigEndian<qint16>(reinterpret_cast<const uchar *>(hheaTable.constData() + 12));
- ctMinLeftBearing = bearing * fontDef.pixelSize / emSize;
- bearing = qFromBigEndian<qint16>(reinterpret_cast<const uchar *>(hheaTable.constData() + 14));
- ctMinRightBearing = bearing * fontDef.pixelSize / emSize;
- }
}
bool QCoreTextFontEngine::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs,
@@ -599,20 +588,17 @@ QFixed QCoreTextFontEngine::averageCharWidth() const
qreal QCoreTextFontEngine::maxCharWidth() const
{
- return (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
- ? qRound(ctMaxCharWidth) : ctMaxCharWidth;
+ return 0;
}
qreal QCoreTextFontEngine::minLeftBearing() const
{
- return (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
- ? qRound(ctMinLeftBearing) : ctMinLeftBearing;
+ return 0;
}
qreal QCoreTextFontEngine::minRightBearing() const
{
- return (fontDef.styleStrategy & QFont::ForceIntegerMetrics)
- ? qRound(ctMinRightBearing) : ctMinLeftBearing;
+ return 0;
}
void QCoreTextFontEngine::draw(CGContextRef ctx, qreal x, qreal y, const QTextItemInt &ti, int paintDeviceHeight)