openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@apache.org
Subject svn commit: r1562051 - /openoffice/trunk/main/vcl/aqua/source/gdi/ctfonts.cxx
Date Tue, 28 Jan 2014 12:41:54 GMT
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,



Mime
View raw message