Well, I experimented a bit and tried:

const CGFloat kRotationForItalicText = -15.0;
                        
NSAffineTransform *italicTransform = [NSAffineTransform transform];
                        
[italicTransform scaleBy:[NSFont 
systemFontSizeForControlSize:NSMiniControlSize]];
[italicTransform rotateByDegrees:kRotationForItalicText];

but, the text drawn with the system font created with this transform was not 
what I would call very readable. A 15 degree rotation seems to be correct.

If anyone has any suggestions on how best to handle this, I would be interested.


On Nov 12, 2009, at 12:39 PM, Eric Gorr wrote:

> I need to be able to do this same thing and found this old thread and reply:
> 
>     http://lists.apple.com/archives/Cocoa-dev/2007/Jan/msg00577.html
> 
> I assume the answer has not changed. Unfortunately, the link
> 
>     
> <http://trac.webkit.org/projects/webkit/browser/trunk/WebCore/platform/mac/FontMac.mm#L583>
> 
> is no longer valid and I was wondering if anyone knew what the appropriate 
> NSAffineTransform would be to pass into +fontWithDescriptor:textTransform:
> 
> Ultimately, I believe the call I will want to make is:
> 
>     [NSFont fontWithDescriptor:[[NSFont 
> systemFontSizeForControlSize:NSMiniControlSize] fontDescriptor] 
> textTransform:italicTransform];


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to