On Fri, Jan 24, 2014, at 11:36 AM, Quincey Morris wrote: > On Jan 24, 2014, at 09:58 , Kyle Sluder <k...@ksluder.com> wrote: > > > A quick test in TextEdit shows that AppKit does not render soft hyphens > > as hyphens, but it will break on them. > > Actually, TextEdit is Doing It Wrong™. > > Soft (or discretionary) hyphens mark the points in a word where the word > is allowed to break. A soft hyphen is invisible except when the word > actually breaks there** — in which case it is typeset as a regular hyphen > — and the word isn’t allowed to break anywhere but at a soft hyphen if it > has any of them. This means, in particular, that if the soft hyphen is > the first character of the word, the word won’t break at all (from > auto-hyphenation, I mean). > > As others pointed out, a non-breaking hyphen is more or less exactly the > opposite thing.
Yes, I think this confusion is entirely my own fault. But I still found a bug in AppKit, so some good has come out of it. :) To repeat my test, open a new TextEdit document and type the word "test". Then paste in a soft hyphen. Notice how the soft hyphen is correctly invisible. Then type the letters "ing" and a space. Copy and paste that a whole bunch. Resize the window and watch as the text correctly breaks at the soft hyphens, but fails to turn the hyphens visible. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com