Boundary detection is OK now.

My text boundary detection is done by collecting xMax, xMin, yMax,
and yMin, and set width and height as follows.

    width = xMax - xMin;
    height = yMax - yMin;

The 'OK' means that xMin and yMin is now considered, instead of
assuming 0 in previous commits.
Refactoring: move utf8 to utf32 converter into a function.