Rich Text Style Group Wrapping
Typed rich field appearances calculate Unicode 17 default line-break opportunities over complete paragraphs, retaining the original style offsets for every painted fragment
A change of font style, size or color does not create a legal word boundary; nonbreaking spaces, opening punctuation and numeric context remain connected across run boundaries
When a legal group fits a fresh line, the layout measures each actual styled fragment through the same appearance builder used for painting and moves the whole group before appending any fragment if the current line lacks room
Each run keeps its font, size, color and decorations; different point sizes share the actual line baseline derived from each embedded font's metrics
Groups wider than the content rectangle use complete styled grapheme ranges for emergency fitting, preserving base characters and combining marks on one physical line across style seams; shaping across styles remains further integration work
A CRLF split between adjacent style runs creates one actual line break and one canonical XHTML br element, including when empty style runs occur between CR and LF
An explicit paragraph transition separates the contexts and selects the next paragraph's first run alignment
Disabling WrapText preserves a single physical line across style changes, while explicit line and paragraph breaks still apply
Run offsets and group cursors advance through the paragraph without scanning the full style array at every scalar boundary; glyph, font, fragment, object and cancellation limits still apply
The native JSON forms.fill operation reaches the same group fitting and preserves its established operation record layout and transactional publication
Actual acceptance
Saved fixtures cover a word spanning regular and bold text, a nonbreaking-space seam, opening parentheses, CRLF split between styles, a currency and decimal group, mixed point sizes and disabled wrapping
Independent readers inspect exact V and RV, embedded font identities, actual glyph maps and advances, inner text matrices plus outer transforms, physical baselines, content bounds and visible pixels for both widgets
Mixed-style paragraph bidi, contextual joining across style changes, arbitrary XHTML and additional CSS consumers remain separate active work
Native rich fields · Unicode opportunities · Grapheme fitting