• 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: Custom line breaking in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom line breaking in NSTextView


  • Subject: Re: Custom line breaking in NSTextView
  • From: Aki Inoue <email@hidden>
  • Date: Wed, 27 Jul 2005 19:04:13 -0700

But even in such cases, there is a case I want to break the line when the
last character of the line meets some condition.

I suppose this is Japanese-style Kinsoku processing.

Yes, I admit that the current line break customization behavior gives less precise control there.
It is among the enhancement items I have for a future release.


Aki

Dear Aki,

on 05.7.28 9:55 AM, Aki Inoue at email@hidden wrote:

1) Determine which is the first character that no longer fits on the
   current line;

2) Once that character is found, go back from there and look for a
   suitable place where to break the line.

Your suggestion would allow me to customize 2), which is not what I
want; I need to customize 1).

I really don't see why you think it doesn't work.  In order to fit a
pre-defined number of characters in a line, you need to specify
sufficiently large number for the container width.  From there, the
glyph position passed to the method should be always larger than the
number of characters.


I have also a headache in the line breaking customization.

For Example, when the length of the line was a little shorter than the
container width, the method [NSAttributedString
lineBreakBeforeIndex:withinRange:] will never be called.  You can't
customize the break in such cases.

But even in such cases, there is a case I want to break the line when the
last character of the line meets some condition.


I hope If I could customize the default breaking location for
[NSAttributedString lineBreakBeforeIndex:withinRange:].

Satoshi
-----------------------------------------------------
Satoshi Matsumoto <email@hidden>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802




_______________________________________________ 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: 
 >Re: Custom line breaking in NSTextView (From: Satoshi Matsumoto <email@hidden>)

  • Prev by Date: Re: CoreData Tutorial bindings
  • Next by Date: Double Click in NSTableView
  • Previous by thread: Re: Custom line breaking in NSTextView
  • Next by thread: Re: Custom line breaking in NSTextView
  • Index(es):
    • Date
    • Thread