Reordering in levels 0 and 1

Another common operation in the more complex shapers is when things reorder. In those cases, to maintain monotone clusters, HB merges the clusters of everything in the reordering sequence. For example, let's again start with the character sequence:

   A,B,C,D,E
   0,1,2,3,4

If D is reordered before B, then the B, C, and D clusters merge, and we get:

   A,D,B,C,E
   0,1,1,1,4

This is clearly not ideal, but it is the only sensible way to maintain monotone indices and retain the true relationship between glyphs and characters.