Grapheme Wrapping across Rich Styles

THPDFHeadlessDocument.SetRichTextFieldValueWithAppearance keeps complete Unicode grapheme clusters on one physical line when an overwide word spans multiple typed rich text runs

Changing a font, color or size does not create a permitted emergency break inside a base character and its combining marks, including when an empty run separates their styles

The fitter calculates grapheme boundaries over the complete logical group, measures the actual styled appearance fragments and assigns each selected range to one line before painting its separate font resources

Exponential probes followed by bounded prefix searches avoid repeatedly measuring the unused paragraph tail; cancellation is observed while preparing each range and each native fragment

The original V, canonical RV, typed styles, character spacing and measured baselines remain intact through saving and reloading

An indivisible styled cluster that exceeds the whole content width remains together and is subject to the widget content clip, matching the existing single-cluster behavior; the next cluster continues on another line

Disabled wrapping retains a single physical line

This layout behavior also applies to actual native Linux JSON forms.fill calls using richTextRuns and characterSpacing, without changing the versioned operation record

Shaping and mark placement across different style fragments, mixed-style paragraph bidi and arbitrary XHTML remain further integration work

See legal style group wrapping, Unicode grapheme boundaries and native rich text fields