Skip navigation.
 
mlRe: Meaning of NSFont italicAngle?
FROM : Thomas Lachand-Robert
DATE : Thu Nov 04 19:47:14 2004

Le 4 nov. 04, à 18:28, Henry McGilton a écrit :

>
> On Wednesday, November 3, 2004, at 02:15 PM, Thomas Lachand-Robert 
> wrote:
>

>> Hi all,
>>
>> I would like to know the true meaning of italicAngle for a NSFont. 
>> The doc says:
>>
>> - (float)italicAngle
>> Returns the receiver’s italic angle, the amount that the font is 
>> slanted in degrees clockwise from the vertical, as read from its AFM 
>> file.

>
> What 'doc' are you reading?  My documentation of NSFont says:
>
>        Returns the receiver's italic angle, the amount that the font
>        is slanted in degrees counterclockwise from the vertical,
>        as read from its AFM file.
>
> Note  'counterclockwise'.  Given that context, a clockwise slant 
> should
> be interpreted as a negative number.  In general, Adobe PostScript (and
> by extension, font metrics) use positive values to mean 
> counterclockwise
> rotations.
>


I return you the question. (Maybe you got the doc for Tiger?) I just 
copied and paste from Apple's developer doc. I get the same on the web 
site:
http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSFont.html#//apple_ref/doc/uid/
20000382/italicAngle

Anyway I don't mind much the sign, since I know how the fonts are 
slanted in my case. I am looking for the amount.

>> And 1.5 degree is a very small angle, so it's probably not that
>> (but in radians, it's too much!). Could it be the tangent of the 
>> angle?

>
> I checked the AFM file for Times-Italic.  The AFM file says that the
> Italic angle is  -15.5.  I used TextEdit to display some Times-Italic
> text at large size, and, using my trusty Protractors application, 
> measured
> the angle as being approximately 15 degrees clockwise from the 
> vertical.
>
> I also checked the AFM file for Helvetica-Oblique.  The AFM file says 
> that the
> Italic angle is  -12.0.  I used TextEdit to display some 
> Helvetica-Oblique
> text at large size, and, using my trusty Protractors application, 
> measured
> the angle as being approximately 12 degrees clockwise from the 
> vertical.
>
> I also checked for Optima-Oblique (which for some obscure reason Cocoa 
> wants
> to be called Optima-Italic).  The AFM file says Italic angle is  -11.0 
> (this
> is an old AFM file).  The system reports the angle as  -1.2.
>
> Very unlikely that the number is the tangent.  The tangent of -15.5 
> degrees
> is about -0.278.
>
> There does seem to be some kind of anomaly, though.  It's as if the 
> system is
> off by a factor of ten in every case.
>
> Could somebody at Apple comment on this anomaly?
>

Yes I agree with you: it's probably a factor 10 or something. Anyway 
you proved that it is NOT the value in the AFM file, so the doc is 
definitely wrong.

Thanks for your comments and experiments,

Thomas Lachand-Robert
********************** <email_removed>
<< Et le chemin est long du projet à la chose. >> Molière, Tartuffe.

Related mailsAuthorDate
mlMeaning of NSFont italicAngle? Thomas Lachand-Rob… Nov 3, 23:15
mlRe: Meaning of NSFont italicAngle? Henry McGilton Nov 4, 18:28
mlRe: Meaning of NSFont italicAngle? Thomas Lachand-Rob… Nov 4, 19:47
mlRe: Meaning of NSFont italicAngle? Henry McGilton Nov 4, 20:45
mlRe: Meaning of NSFont italicAngle? mmalcolm crawford Nov 4, 23:56