fix line breaking for text/font

please include on the 6.0 release branch