toStyledDocument
Build a StyledDocument from this AnnotatedString. Each character's effective formatting is the union of every overlapping androidx.compose.ui.text.SpanStyle: a fontWeight of FontWeight.Bold or heavier maps to bold, FontStyle.Italic to italic, and TextDecoration.Underline / TextDecoration.LineThrough to underline / strikethrough. Newlines (\n) separate paragraphs and are not themselves emitted as text.