Re: Disable Font Features (Kerning)
Re: Disable Font Features (Kerning)
- Subject: Re: Disable Font Features (Kerning)
- From: Aki Inoue <email@hidden>
- Date: Wed, 4 Jul 2007 15:24:11 -0700
Are you using the right rendering mode when querying the individual
glyph widths ?
You can get what NSStringDrawing API uses via [font
screenFontWithRenderingMode:NSFontDefaultRenderingMode].
Aki
On 2007/07/04, at 12:06, Andre Schnoor wrote:
Aki Inoue wrote:
You can turn font kerning off by specifying 0 to
NSKernAttributeName explicitly.
Refer to the comment in AppKit/NSAttributedString.h.
Aki
Ah, thanks Aki. I'm now using this method (see below). It sets a
member variable 'attributes' which is used for all NSTextStorage
mutable strings as a default.
[attributes
setObject: [NSNumber numberWithFloat: 0.0]
forKey: NSKernAttributeName];
[attributes
setObject: [NSNumber numberWithInt: 0]
forKey: NSLigatureAttributeName];
I still have problems when exactly measuring individual glyph's
advances (widths), though. It seems that
NSString>>sizeWithAttributes: delivers varying results (i.e. the
sum of all character widths is NOT equal to the width of the string
as a whole). Argh.
Andre
_______________________________________________
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