Inspired by code in pireal.
Supports zooming in and out with ctrl+scroll. It is a bit hacky, since I use sed in make to make it work, but whatever.