Itemizing rich text into an array of segments and shaping them.
Itemization deals with breaking down the text into the largest pieces that
have enough relevant properties in common to be shaped as a unit, but are
also the smallest pieces that are allowed to be word-wrapped.
Script and language detection and BiDi level analysis is also included here.
See the source code for more info.