moved maxFontSizeForText to GraphicsUtils