On Nov 12, 2009, at 2:21 PM, Jens Alfke wrote:

> 
> On Nov 12, 2009, at 9:39 AM, Eric Gorr wrote:
> 
>> Unfortunately, the link
>>     
>> <http://trac.webkit.org/projects/webkit/browser/trunk/WebCore/platform/mac/FontMac.mm#L583>
>> is no longer valid
> 
> The file's been moved in the WebKit source tree since that URL was posted. 
> Searching for 'FontMac.mm' in Trac shows that the up to date URL is
>       
> http://trac.webkit.org/browser/trunk/WebCore/platform/graphics/mac/FontMac.mm
> 
> 
> On Nov 12, 2009, at 10:46 AM, Eric Gorr wrote:
>> [italicTransform rotateByDegrees:kRotationForItalicText];
> 
> You don't want a rotation for that; use a skew transform.

Thanks for the updated link.

From there, if I located the correct bit of code, I found:

    CGAffineTransformMake(1, 0, -tanf(SYNTHETIC_OBLIQUE_ANGLE * acosf(0) / 90), 
1, 0, 0));

where SYNTHETIC_OBLIQUE_ANGLE = 14. 

My matrix math is a bit rusty...how would I turn that into a series of method 
calls to NSAffineTransform?

> And as a font weenie I am compelled to point out that this is not an italic 
> font, it's an oblique; and a synthetic oblique at that.
> 
> FYI, the 'Lucida Sans' font family, which is all but identical to Lucida 
> Grande, includes a true italic. It's on every Mac I've used, but I'm not sure 
> if it's in the base install, or installed as part of an external package like 
> iWork. It would be worth looking into, as the real italic looks much nicer 
> than a fake oblique.


I agree. I would much rather use a real italic, but, as you pointed out, I need 
to be certain that the font does exist. Of course, I could put in a lot of code 
to take all of the different failure cases into account...an option.




_______________________________________________

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