fix text size calculation