• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Meaning of NSFont italicAngle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Meaning of NSFont italicAngle?


  • Subject: Re: Meaning of NSFont italicAngle?
  • From: Henry McGilton <email@hidden>
  • Date: Thu, 4 Nov 2004 09:28:38 -0800


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@hidden | http://www.trilithon.com | ===============================+============================

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Meaning of NSFont italicAngle?
      • From: Thomas Lachand-Robert <email@hidden>
References: 
 >Meaning of NSFont italicAngle? (From: Thomas Lachand-Robert <email@hidden>)

  • Prev by Date: Keyboard shortcuts and scroll views
  • Next by Date: Re: [OT] Contract Work
  • Previous by thread: Meaning of NSFont italicAngle?
  • Next by thread: Re: Meaning of NSFont italicAngle?
  • Index(es):
    • Date
    • Thread