TextKit Overview

TextKit goes back to the NeXT era, before Mac OS X was a thing. After the relatively new Cocoa frameworks for Mac app programming were introduced and introduced the “Cocoa Text System” title, iOS and UIKit stuck with “TextKit”, and in 2021 TextKit 2 returned.

This revolves around everything related to accepting textual user input on the Mac:

Even NSTextFields are just reusing a shared NSTextView, called the window’s field editor. It’s everywhere.

Jun 24 2024

The Rake and Its Prongs

We don’t think about this as we write: the blinking cursor tells a useful lie about what the text looks like, so we can work on an abstraction that is about the space between characters, and especially the space after the last character.

May 8 2024

Declarative Text Kit: Sketch of an API

I was fed up with writing long procedures to perform markup changes on the fly. This post contains an API that looks like something I would like to use.