improve first_text_offset calculation again. Add TODO.