diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-10-09 07:50:19 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-10-09 11:27:52 (GMT) |
commit | f98f5c5432f13238fc640820cc222b671c1ee8df (patch) | |
tree | 3f0588d2f3e90cbf84e1f90959b0dcb15cb7c1fe /src/gui/text | |
parent | 05727386bec0142174c9cbaea6f2b3ca72a42b63 (diff) | |
download | Qt-f98f5c5432f13238fc640820cc222b671c1ee8df.zip Qt-f98f5c5432f13238fc640820cc222b671c1ee8df.tar.gz Qt-f98f5c5432f13238fc640820cc222b671c1ee8df.tar.bz2 |
Fixed text positioning when printing in HighResolution on Mac OS X
Reviewed-by: Richard
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qfontengine_mac.mm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm index 40db7b4..758d8af 100644 --- a/src/gui/text/qfontengine_mac.mm +++ b/src/gui/text/qfontengine_mac.mm @@ -138,9 +138,10 @@ QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, con QCFString name; ATSFontGetName(atsFontRef, kATSOptionFlagsDefault, &name); - QCFType<CTFontDescriptorRef> descriptor = CTFontDescriptorCreateWithNameAndSize(name, fontDef.pointSize); - QCFType<CTFontRef> baseFont = CTFontCreateWithFontDescriptor(descriptor, fontDef.pointSize, 0); - ctfont = CTFontCreateCopyWithSymbolicTraits(baseFont, fontDef.pointSize, 0, symbolicTraits, symbolicTraits); + + QCFType<CTFontDescriptorRef> descriptor = CTFontDescriptorCreateWithNameAndSize(name, fontDef.pixelSize); + QCFType<CTFontRef> baseFont = CTFontCreateWithFontDescriptor(descriptor, fontDef.pixelSize, 0); + ctfont = CTFontCreateCopyWithSymbolicTraits(baseFont, fontDef.pixelSize, 0, symbolicTraits, symbolicTraits); // CTFontCreateCopyWithSymbolicTraits returns NULL if we ask for a trait that does // not exist for the given font. (for example italic) |