Calculate the pixel size of a string