• 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: Drawing NSAttributedString with negative leading/spacing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing NSAttributedString with negative leading/spacing?


  • Subject: Re: Drawing NSAttributedString with negative leading/spacing?
  • From: Douglas Davidson <email@hidden>
  • Date: Fri, 10 Feb 2006 09:06:11 -0800


On Feb 10, 2006, at 8:52 AM, Jonathan del Strother wrote:

I'm using NSAttributedString to draw strings into an image.

Frustratingly, NSParagraphStyle doesn't allow you to set negative line spacings. This is possible in, say, Illustrator, and can come in handy, since certain fonts are quite widely spaced (eg Verdana).

I've tried the naive approach of bypassing setParagraphSpacing: by setting the _paragraphSpacing/_lineSpacing ivars manually, but that isn't working. Any other suggestions on getting around this?


You can set a maximum line height, which may allow you to get the effect you want. Try using the spacing panel in TextEdit; you can use the "at most" line height setting (maximum line height), or the "exactly" line height setting (which corresponds to setting both minimum and maximum line height to the same value).


Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Drawing NSAttributedString with negative leading/spacing? (From: Jonathan del Strother <email@hidden>)

  • Prev by Date: Problem moving subview within superview
  • Next by Date: Re: Problem moving subview within superview
  • Previous by thread: Drawing NSAttributedString with negative leading/spacing?
  • Next by thread: Problem moving subview within superview
  • Index(es):
    • Date
    • Thread