graphics: Add kerning for text generator.

Adjust character positions so that some pairs of characters can fit
more closely together.
graphics: Fix textgen with Python 2.

Previous fix for Python 3 broke the script under Python 2.