Return-Path: X-Original-To: apmail-openoffice-commits-archive@www.apache.org Delivered-To: apmail-openoffice-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8634E10150 for ; Tue, 28 Jan 2014 12:42:22 +0000 (UTC) Received: (qmail 87715 invoked by uid 500); 28 Jan 2014 12:42:21 -0000 Delivered-To: apmail-openoffice-commits-archive@openoffice.apache.org Received: (qmail 87515 invoked by uid 500); 28 Jan 2014 12:42:17 -0000 Mailing-List: contact commits-help@openoffice.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openoffice.apache.org Delivered-To: mailing list commits@openoffice.apache.org Received: (qmail 87489 invoked by uid 99); 28 Jan 2014 12:42:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 12:42:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 12:42:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 861102388868; Tue, 28 Jan 2014 12:41:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1562051 - /openoffice/trunk/main/vcl/aqua/source/gdi/ctfonts.cxx Date: Tue, 28 Jan 2014 12:41:54 -0000 To: commits@openoffice.apache.org From: hdu@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140128124154.861102388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hdu Date: Tue Jan 28 12:41:54 2014 New Revision: 1562051 URL: http://svn.apache.org/r1562051 Log: #i124121# emulate oblique/italic for CoreText fonts without such styles Modified: openoffice/trunk/main/vcl/aqua/source/gdi/ctfonts.cxx Modified: openoffice/trunk/main/vcl/aqua/source/gdi/ctfonts.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/gdi/ctfonts.cxx?rev=1562051&r1=1562050&r2=1562051&view=diff ============================================================================== --- openoffice/trunk/main/vcl/aqua/source/gdi/ctfonts.cxx (original) +++ openoffice/trunk/main/vcl/aqua/source/gdi/ctfonts.cxx Tue Jan 28 12:41:54 2014 @@ -109,6 +109,16 @@ CTTextStyle::CTTextStyle( const ImplFont pMatrix = &aMatrix; } + // handle emulation of italic/oblique styles if requested and the font doesn't provide them + if( ((pReqFont->meItalic == ITALIC_NORMAL) || (pReqFont->meItalic == ITALIC_OBLIQUE)) + && (mpFontData->meItalic != ITALIC_NORMAL) + && (mpFontData->meItalic != ITALIC_OBLIQUE)) + { + if( !pMatrix) + pMatrix = &(aMatrix = CGAffineTransformIdentity); + aMatrix = CGAffineTransformConcat(aMatrix, CGAffineTransformMake( 1, 0, 0.375F, 1, 0, 0)); + } + // create the style object for CoreText font attributes static const CFIndex nMaxDictSize = 16; // TODO: does this really suffice? mpStyleDict = CFDictionaryCreateMutable( NULL, nMaxDictSize,