From a quick skim of the source code this is mostly precalulated. Basically each document is rendered as one rectange, where the shader converts the current position to the row/column of the character to be rendered. There is one texture that holds the length and starting offset of each line (using one pixel per line), and another texture that for each offset tells you which glyph to render (using one pixel per glyp). The third texture is the glyph map that holds the actual glpyhs (a simple 256x256 texture of all supported characters). The last texture is static, the other two are calculated once as the document is loaded, and there is a neat shader that uses all three textures to render the actual document view. Since the shader is sampled at fewer points if the rectangle takes up fewer pixels on your screen this works out well for zoomed out views.