• 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: Controlling line tightening
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controlling line tightening


  • Subject: Re: Controlling line tightening
  • From: John Stiles <email@hidden>
  • Date: Wed, 12 Mar 2008 08:55:28 -0700

Interesting! I didn't think to use kerning directly. Thank you for the idea!! It makes sense since obviously I am trying to do something a little more sophisticated than the default "tighten" functionality.

How does "line tightening" pick an appropriate kerning value? I'm thinking you could use -cellSize to get the actual string width, and then you could figure out the ratio of cell frame to desired size to compute a kerning value... but I've never used kerning before so I could be off in the weeds here.


glenn andreas wrote:

On Mar 11, 2008, at 9:54 PM, John Stiles wrote:

Gah, I spoke too soon.
This "solution" actually disables tightening entirely. So I'm back to square one. Please help!


You could try to manually squeeze the result by setting an attributed string's NSKernAttributeName value, but that would be far from automatic (since you'd have to be constantly measuring the string, redoing the kerning, and, in all likelihood, handle the auto-ellipsification yourself).

It could probably be handled by a transformer in a binding, so it may not be too bad, though there's no obvious way for the binding to know the line width it needs to try to shrink the string to...


Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | prime : build, mutate, evolve, animate : the next generation of fractal art




_______________________________________________

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: Controlling line tightening
      • From: John Stiles <email@hidden>
References: 
 >Controlling line tightening (From: John Stiles <email@hidden>)
 >Re: Controlling line tightening (From: John Stiles <email@hidden>)
 >Re: Controlling line tightening (From: John Stiles <email@hidden>)
 >Re: Controlling line tightening (From: glenn andreas <email@hidden>)

  • Prev by Date: Help with Bindings
  • Next by Date: Re: runtime error
  • Previous by thread: Re: Controlling line tightening
  • Next by thread: Re: Controlling line tightening
  • Index(es):
    • Date
    • Thread