Implement text path trimming for shorter paths.