UnsafeMutableBufferPointer has a nice API for setting elements font to back, so you might shoehorn the implementation in that direction (as I have done). In doing this, you have to perform some wizardry because the characters are extracted back to front by a remainder operation. Going the other way turns out to be faster.