2014 Linux Symposium, July 14-16

Real Time Collaboration in FontForge

Ben Martin (monkeyiq@users.sourceforge.net)

I hope you attend this talk if you want to add collaboration to an open source project but have been holding off because you don't want to make wide spread code changes to the project. I will show how real time collaboration can be added to any program which already has a robust undo and redo mechanism. I'll include concrete examples from the code that I implemented in FontForge which allows glyphs and font metrics to be edited by multiple parties using many different operating systems. By reusing the undo system of a program the impact of the collaboration code can be minimized and greatly localized in the code. This keeps developers who do not care about collaboration happy because they do not need to see or understand the collaboration code in order to continue to contribute to the code base.

Another great feature of real time collaboration is that other programs can be created to hook into the session. Not every program in the session needs to be able to make changes or understand every network message to produce a useful result. For example, with FontForge a process can be a member of the collaboration session and every time a change to a glyph is made a new binary font is created and a Websocket message is pushed to Web browsers telling them to rerender using the new font. This allows fonts to be designed and the results seen very quickly on the intended target device such as a tablet.

Real time collaboration has been implemented for FontForge using the zeroMQ library. zmq was initially developed for financial service corporations who must share a lot of data to a lot of people very fast, such as in stock trading systems. It provides concurrency by passing information as messages rather than a true shared state. The current network protocol for sharing font data in FontForge could become more like an interchange file format, to open up the possibility for specialized font editor tools that are focused on only some particular aspects of type design. For example, a program for kerning with a tactile UI does not need to understand anything about altering the shapes of glyphs, but can still be part of the process.

Policies   |   Media Archives