I have a string in a .txt which I process as follow:
ks = Import["string.txt"];
Export["res", Style[ks, 8, Black, FontFamily -> "Courier"], "PNG",
ImageSize -> {8 sx, 4 sy}];
res = Import["res"];
Export["res.gif", res];
Here I have two problems. First, none of the monospaced fonts seems to make the end image look monospaced. (I believe this was somehow addressed in a previous question but no solution was found.) To get around this I thought for drawing the characters individually, but that would be resource-intensive. Is there a way to get real monospaced text from Wolfram?
The second problem is that the output images seem to have a fixed sized for the amount of characters that may fit in a line, therefore rendering partial lines of text. I think this is because of the way Mathematica imports the string but don't know how to solve it. An example is shown below.
I appreciate your help.
Sample input: http://pastebin.com/5ThLXw6L (Because it is long)
Sample output:
Which comes from: