• 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: Thomas Lachand-Robert <email@hidden>
  • Date: Thu, 4 Nov 2004 19:47:14 +0100


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@hidden
<< Et le chemin est long du projet à la chose. >> Molière, Tartuffe.

_______________________________________________
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: Henry McGilton <email@hidden>
References: 
 >Re: Meaning of NSFont italicAngle? (From: Henry McGilton <email@hidden>)

  • Prev by Date: NSArrayController and retainCount
  • Next by Date: Re: NSSplitView replacement
  • Previous by thread: Re: Meaning of NSFont italicAngle?
  • Next by thread: Re: Meaning of NSFont italicAngle?
  • Index(es):
    • Date
    • Thread