class PDF::Reader::TextRun

def <=>(other)

in order of their position on a cartesian plain - Top Left to Bottom Right
Allows collections of TextRun objects to be sorted. They will be sorted
def <=>(other)
  if x == other.x && y == other.y
    0
  elsif y < other.y
    1
  elsif y > other.y
    -1
  elsif x < other.x
    -1
  elsif x > other.x
    1
  end
end