Maintain text matrix and text line matrix