Skip navigation.
 
mlRe: Meaning of NSFont italicAngle?
FROM : Henry McGilton
DATE : Thu Nov 04 18:28:38 2004

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.


>
> but this is probably wrong, as for Times-Italic or Helvetica-Italic,
> it returns -1.5 or -1.2. Since this is negative, it is a
> counterclockwise angle


This appears not to be the case.


> 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?

    Regards,
       ........  Henry


===============================+============================
  Henry McGilton, Boulevardier |    Trilithon Software
    Objective-C/Java Composer  |    Seroia Research
-------------------------------+----------------------------
  mailto:<email_removed>  |  http://www.trilithon.com
                                |
===============================+============================

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