Refactor getFontSize by using knowledge that font size is 1-3px smaller than element height