Move typesetting functions to their own file.
Implement proportional typesetting.