From 3e99ab21d389e12b5fca3ef6828a8cded49489ec Mon Sep 17 00:00:00 2001 From: Herbert Dürr Date: Tue, 28 Jan 2014 13:31:31 +0000 Subject: Resolves: #i124121# prevent italic emulation with ITALIC_DONTKNOW fonts (cherry picked from commit a8cd1fab9a17df6179c31e1a73816f1bcd627a9b) Conflicts: vcl/aqua/source/gdi/ctfonts.cxx Change-Id: Ib2893a0ce119ac56ac7091fd18a652fe990e82ec --- vcl/quartz/ctfonts.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index ea4cdadf6510..fffd680a14ac 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -74,7 +74,9 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD ) CFDictionarySetValue( mpStyleDict, kCTVerticalFormsAttributeName, pCFVertBool ); // fake bold - if ((pReqFont->GetWeight() >= WEIGHT_BOLD) && (mpFontData->GetWeight() < WEIGHT_SEMIBOLD)) + if ( (pReqFont->GetWeight() >= WEIGHT_BOLD) && + ((mpFontData->GetWeight() < WEIGHT_SEMIBOLD) && + (mpFontData->GetWeight() != WEIGHT_DONTKNOW)) ) { int nStroke = -10.0; CFNumberRef rStroke = CFNumberCreate(NULL, kCFNumberSInt32Type, &nStroke); @@ -83,7 +85,7 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD ) // fake italic if (((pReqFont->GetSlant() == ITALIC_NORMAL) || (pReqFont->GetSlant() == ITALIC_OBLIQUE)) - && !((mpFontData->GetSlant() == ITALIC_NORMAL) || (mpFontData->GetSlant() == ITALIC_OBLIQUE))) + && (mpFontData->GetSlant() == ITALIC_NONE)) { aMatrix = CGAffineTransformConcat(aMatrix, CGAffineTransformMake(1, 0, toRadian(120), 1, 0, 0)); } -- cgit