Correction of text positions