Fast mapping between character objects and their ordinal positions in wrapped text