This might seem like a lot of changes for small result, but let me explain this a bit. What I really want to do is pretty up Info Editor. But it and the Python Console share drawing code. Specifically Python Console uses Info Editor's TextView code.
The way these two editors share code makes it difficult for them to vary as much as they really should, and make them both a little harder to read and follow. As a small example, both editors have separate CONSOLE_DRAW_MARGIN defines. And if you want to change the margin of the python console you must change both of these (or it doesn't display correctly) but also affects the Info editor. There many things like this in this code.
So this patch breaks that dependency so that these two editors can draw themselves any way they wish without affecting the other. I've tried to do it in a way that makes the least amount of change. But does make it much easier to read since many of the generic structures and pointers could instead have specific types. So in the end it is simpler and easier to read and maintain.
While I was in there I also made it so that the Python console has a margin that changes properly with user scale. And the cursor gets wider with scale too, as it is harder to see on high-dpi displays like Retina.