Re: What's wrong with this font thing?
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