Re: Disable Font Features (Kerning)
Re: Disable Font Features (Kerning)
- Subject: Re: Disable Font Features (Kerning)
- From: Andre Schnoor <email@hidden>
- Date: Wed, 04 Jul 2007 21:06:55 +0200
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