Formatted Text Control Has a New Home and is Open Sourced

For more info see Bob’s blog:


If I were to rewrite the FTC, I would model it after Apple’s TextKit. I have been recently diving into the more advanced features of TextKit and have done some amazing things with it. For example, you could have floating images that would reformat the text in realtime as you drag a picture around. Theoretically, anything Apple’s Pages could do, the FTC could also do.

There are three classes which forms the core of TextKit including NSTextStorage, NSLayoutManager and NSTextContainer. There is one missing component that stands in the way which is glyph management. With proper glyph management, the FTC could be opened up to also do amazing things that would be cross platform compliant. Either a plugin needs to be written or Xojo provides proper glyph management.

I believe modeling the FTC after TextKit would also make the FTC speedier in the end. Who doesn’t like speedier and more capabilities? But, it does come at the cost of a rewrite.

the great strength of FTC is to be multi platform. if you rely on apple models, it could be very difficult to transpose it to windows, and even harder to linux.

Just to clarify, the rewrite would be to “duplicate" NSTextStorage, NSLayoutManager and NSTextContainer in Xojo code which would make it cross platform. What is needed is glue code to get the glyphs used for metrics and rendering.

In fact, it would make linux support far more reliable.