Search code examples
ioscore-text

Using kCTLineBreakByCharWrapping for CTTypesetter?


I want to use CTTypesetter to layout text, I notice that CTTypesetter defaults to using kCTLineBreakByWordWrapping, from the docs I see that kCTParagraphStyleSpecifierLineBreakMode only applies to CTFramesetter, so I can't set break mode for CTTypesetter using this style specifier.

Question is: how do I change it to use kCTLineBreakByCharWrapping?


Solution

  • I figured it out a few days ago that what I was looking for is CTTypesetterSuggestClusterBreak.