• 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: Randall Meadows <email@hidden>
  • Date: Thu, 30 Oct 2008 10:02:53 -0600

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

On Oct 29, 2008, at 6:05 PM, Aki Inoue wrote:

The "threshold" being discussed here is the boundary between the screen font vs printer font in NSFont jargon.

For font size smaller than 16pt, we automatically substitute the default printer font to its corresponding screen font.
The metrics gap is caused by the substitution.


You can disable the auto-substitution with NSStringDrawingDisableScreenFontSubstitution flag.

Cool, I can see I can use this in boundingRectWithSize:options:attributes: as well as the draw; I'll try that out (I was using sizeWithAttributes:, but I can switch that). Do I assume correctly that they perform the same basic functionality?

OK, I assumed INcorrectly. That method takes a size already, and it's the size that I'm primarily interested in.


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


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


  • Follow-Ups:
    • Re: What's wrong with this font thing?
      • From: Randall Meadows <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>)

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