Dynamically compute max row height when outputting image

It may help fitting more glyphs in a single texture. You can use OUT_SIZE to set the texture size (512 seems to be better).