improve font and width auto-resize