rewrite font size determination fn