summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_mac.mm
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2010-09-03 13:49:33 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2010-09-10 13:51:56 (GMT)
commitf2f6330d915cbe3d0989ad280738ed0a6954cd35 (patch)
treef92f2fd2ae59ef883a06d230d80763293c988903 /src/gui/text/qfontengine_mac.mm
parent1e8e290fb5d9b0d059711b9e53ea588872a59c57 (diff)
downloadQt-f2f6330d915cbe3d0989ad280738ed0a6954cd35.zip
Qt-f2f6330d915cbe3d0989ad280738ed0a6954cd35.tar.gz
Qt-f2f6330d915cbe3d0989ad280738ed0a6954cd35.tar.bz2
Fix Core Text font loading for certain Mac Fonts
Font names enumerated by Core Text cannot be found by ATSFontFamilyFindFromName because ATS is expecting native names instead of the names returned by Core Text. This patch get rid of ATS font matching code in Cocoa code path to simplify the code, avoid deprecation warnings (in the future) and fix this issue. Task-number: QTBUG-11145 Reviewed-by: Eskil
Diffstat (limited to 'src/gui/text/qfontengine_mac.mm')
-rw-r--r--src/gui/text/qfontengine_mac.mm5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 1ca6ec3..894de44 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -143,7 +143,7 @@ void qmacfontengine_gamma_correct(QImage *image)
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
-QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, const ATSFontRef &atsFontRef, const QFontDef &fontDef, bool kerning)
+QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const QCFString &name, const QFontDef &fontDef, bool kerning)
: QFontEngineMulti(0)
{
this->fontDef = fontDef;
@@ -159,9 +159,6 @@ QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, con
break;
}
- QCFString name;
- ATSFontGetName(atsFontRef, kATSOptionFlagsDefault, &name);
-
transform = CGAffineTransformIdentity;
if (fontDef.stretch != 100) {
transform = CGAffineTransformMakeScale(float(fontDef.stretch) / float(100), 1);