Fit a text file to an image's shape