Initial work on creating a version that works for both iOS, AppKit and pure CoreText.

Lost changes from a distant world.