Replaced deprecated textlib calls with core_text calls