• 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: Disable Font Features (Kerning)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Disable Font Features (Kerning)
      • From: Andre Schnoor <email@hidden>
References: 
 >Disable Font Features (Kerning) (From: Andre Schnoor <email@hidden>)
 >Re: Disable Font Features (Kerning) (From: Aki Inoue <email@hidden>)
 >Re: Disable Font Features (Kerning) (From: Andre Schnoor <email@hidden>)

  • Prev by Date: [Moderator] Re: Git (and a rant on subversion)
  • Next by Date: Re: Disable Font Features (Kerning)
  • Previous by thread: Re: Disable Font Features (Kerning)
  • Next by thread: Re: Disable Font Features (Kerning)
  • Index(es):
    • Date
    • Thread