More work on text_layout