font metrics calculations fixed