Refactoring deprecated string drawing methods.