• 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: How to make letters appear in italics?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make letters appear in italics?


  • Subject: Re: How to make letters appear in italics?
  • From: Martin Wierschin <email@hidden>
  • Date: Tue, 17 Mar 2009 16:36:42 -0700

On Mar 17, 2009, at 2:16 PM, Jim Correia wrote:
In the case where you want to remove the italic attribute, you should be using -convertFont:toNotHaveTrait:.

It actually doesn't matter, you can use the unitalic/unbold masks with -convertFont:toHaveTrait:



On Mar 17, 2009, at 2:26 PM, Iceberg-Dev wrote:
NSFontManager *fontManager = [NSFontManager sharedFontManager];
[fontManager convertFont: [NSFont fontWithName: @"Helvetica" size: 75] toHaveTrait: NSItalicFontMask];



Does one get the same results (Italic) when you use the NSObliquenessAttributeName attribute? Or are these totally different?

They are totally different.

NSItalicFontMask is a flag to be used with NSFontManager/NSFont. The flag can provide a font object which generates glyphs specifically designed by the font author to appear italic. If the font doesn't have a proper italic face, then the original font object will be returned.

On the other hand, NSObliquenessAttributeName is applied directly to NSAttributedString. The value of the attribute is an actual skew amount that affects the slant of all glyphs it is applied to, and doesn't depend on the font. The obliqueness attribute can be used to simulate italics for fonts that do not have such a typeface.

~Martin

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >How to make letters appear in italics? (From: Li Fumin <email@hidden>)
 >Re: How to make letters appear in italics? (From: Jim Correia <email@hidden>)
 >Re: How to make letters appear in italics? (From: Iceberg-Dev <email@hidden>)

  • Prev by Date: cast to pointer from int of diff size & IODisplayCreateInfoDictionary
  • Next by Date: "selector ... is passed a return code and caller specified in contextInfo" ?!?!
  • Previous by thread: Re: How to make letters appear in italics?
  • Next by thread: Re: How to make letters appear in italics?
  • Index(es):
    • Date
    • Thread