Sep 19 2013

Fountain v1.0.1

Now that we’ve got our big Highland update out the door it’s time to give some attention to Fountain, our open source screenplay markup language. I’ve updated Fountain on Github to version 1.0.1. This sounds like a minor update, but there’s a lot here.

Dual Platform Support

Many people have asked for it, and here it is: Fountain now works for iOS.

Thanks to TextKit in iOS 7 the only thing that needed to change was references to NSFont. If you need Fountain to support < iOS 7, you just need to change FNPaginator’s height calculation method.

Tests, Tests, and More Tests

Thanks to wonderful work by John and Stu, Fountain is backed by a very nice spec, but unfortunately the Fountain source code wasn’t actually built against it1.

Fountain now has a complete set of tests that should cover the entirety of the Fountain spec. This will help speed up improvements to Fountain, and should make sure we don’t have any regressions.

One problem, not all tests pass with the current Fountain parser. Which brings me to the next point…

Future Work

Fountain needs a lot of work. First, FastFountainParser needs a fairly significant rewrite, not only to pass all the Fountain tests, but also to more modular and easier to manage.

Second, the Fountain API needs a significant cleanup. In hindsight, a lot of the choices I made when I first put it together turned out to be less than stellar. The API can definitely be cleaned up and made easier to work with.

Finally, we need a consistent naming convention that conforms to Apple’s naming guidelines. This would see FNScript change to FTNScript, and FastFountainParser become FTNParser. This would be a backwards incompatible change, but I think it will be in everyone’s long-term best interests.

I hope to get to these changes in the next few weeks. Stay tuned!

  1. Fountain started life as two separate specs – Fountain and SPMD. We were already pretty far along in development of Fountain and Highland when the two specs were merged together, and in our haste to get Highland out we just didn’t have enough time to go back and make sure Fountain worked against every part of the spec.