Fixes to calculation of TextField line metrics