• 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
String fragment size?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

String fragment size?


  • Subject: String fragment size?
  • From: Dustin Mierau <email@hidden>
  • Date: Sun, 10 Feb 2002 03:57:40 -0800

Hey Hey!

I have a string that could be fairly large and, if this is the case, draw it on two lines instead of one. My question is, how can I calculate the optimal break point as to take up the least width possible when drawing my string?

Example:

My string: "This is a string and stuff and things"

and I want to draw it like:

This is a string and
stuff and things

I assumed AppKit would have something for me, perhaps in the plethora of text layout functions, but I could find nothing. If I have to go and draw the string glyph for glyph myself that is fine, I just don't want to do this and find out there is a single method that does it all for me :P

lates,
-dustin
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: String fragment size?
      • From: Markus Hitter <email@hidden>
  • Prev by Date: Re: Memory Mania Revisted
  • Next by Date: Re: Big performances pb
  • Previous by thread: Re: Big performances pb
  • Next by thread: Re: String fragment size?
  • Index(es):
    • Date
    • Thread