• 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: What's wrong with this font thing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's wrong with this font thing?


  • Subject: Re: What's wrong with this font thing?
  • From: Aki Inoue <email@hidden>
  • Date: Thu, 30 Oct 2008 18:19:37 -0700

Looks like the typesetter behavior used by these NSStringDrawing methods are affecting the default line height.

Please file a bug.

Thanks,

Aki

On 2008/10/30, at 9:19, Randall Meadows wrote:

On Oct 30, 2008, at 10:02 AM, Randall Meadows wrote:

On Oct 30, 2008, at 9:53 AM, Randall Meadows wrote:

So how can I get a the width that a particular string is going to be drawn in, *and* disable that subsitution? Will calling NSLayoutManager setUsesScreenFonts:NO before calling NSString sizeWithAttributes: do the right thing? Or is there another tack I should be taking?

And where would I get a layout manager from if I'm trying to disable this before determining the size, not actually drawing it?


OK, I just tried passing

NSSize thisSize = [self boundingRectWithSize:NSMakeSize(CGFLOAT_MAX, CGFLOAT_MAX)
options:NSStringDrawingDisableScreenFontSubstitution
attributes:attrs].size;


and got the exact same behavior as I originally did, where a point size of 16 generated a height of 18, but a point size of 15 generated a height of 21, so apparently this did NOT disable the substitution. Does that only work in conjunction with other flags?
_______________________________________________


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

_______________________________________________

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: 
 >What's wrong with this font thing? (From: Randall Meadows <email@hidden>)
 >Re: What's wrong with this font thing? (From: Peter Ammon <email@hidden>)
 >Re: What's wrong with this font thing? (From: Randall Meadows <email@hidden>)
 >Re: What's wrong with this font thing? (From: Aki Inoue <email@hidden>)
 >Re: What's wrong with this font thing? (From: Randall Meadows <email@hidden>)
 >Re: What's wrong with this font thing? (From: Randall Meadows <email@hidden>)
 >Re: What's wrong with this font thing? (From: Randall Meadows <email@hidden>)

  • Prev by Date: Re: Help with NSBitmapImageRep, please
  • Next by Date: NSTextView actions
  • Previous by thread: Re: What's wrong with this font thing?
  • Next by thread: Static text over an image
  • Index(es):
    • Date
    • Thread