摘要 |
Laying out a paragraph using a layout services library. An entire paragraph is defined as a single text run. The text run is laid out by substituting glyphs for the characters of the text run and then positioning the glyphs. After the text run is laid out, the length of the text run is compared to the line length. If the length of the text run exceeds the line length, then the text run is divided into a parent text run and a child text run. If justification is enabled, then the parent text run is justified. If a child text run is created, then the length of the child text run is compared to the line length. If the length of the child text run exceeds the line length, then the process is repeated until the length of the last child text run does not exceed the line length. A layout services library provides text processing functions which support the paragraph layout and the justification.
|