A view has a 1) top left beginning text mark. Starting from this text mark, the paint method will start painting word by word. "Word" is something to be determined either by searching for spaces or something to be determined by custom parsing rules to find a good word-break point. Therefore there is a word-break-point state machine. This state machine should also work backwards and be able to find a "close" next error resume point. Depending on text attibutes etc there's an optimal number of characters to begin trying to fit into a single line. Should it not fit or leave room, binary search will find the actual number, taking into account the word boundaries. Many optimizations are by paragraph, therefore there is a text mark on the beginning of each paragraph. Many of the state machines will auto-reset on each paragraph break. Others don't.