Lennart has been playing with Cairo. I have been playing with porting Python to C++, and I ported this scripts. It was not that hard as 2 of the bugs were due to the Python-esque indentation (yes scoping with indentation, what a nice idea), one is due to C being permissive (stupid typo), and the last due to a bad transcription when the Python binding of Cairo tranfsorm cairo_text_extents_t from a struct with named fields to an array with index...

Otherwise the biggest technical issue was to modify a bit the data types that use Python list to something that works with C++. I used the standard C++ library and a few of boost classes like boost::shared_ptr and boost::format.

Get the source: fring.cpp Build it with

g++ `pkg-config --libs --cflags cairomm-1.0` fring.cpp -g -o fring

Maybe it would be worthwhile to be write a small library that help porting from Python.