TextWithReading
fun TextWithReading(formattedText: String, modifier: Modifier = Modifier, color: Color = Color.Unspecified, fontSize: TextUnit = TextUnit.Unspecified, fontStyle: FontStyle? = null, fontWeight: FontWeight? = null, fontFamily: FontFamily? = null, letterSpacing: TextUnit = TextUnit.Unspecified, textDecoration: TextDecoration? = null, textAlign: TextAlign? = null, lineHeight: TextUnit = TextUnit.Unspecified, overflow: TextOverflow = TextOverflow.Clip, softWrap: Boolean = true, maxLines: Int = Int.MAX_VALUE, minLines: Int = 1, onTextLayout: (TextLayoutResult) -> Unit? = null, style: TextStyle = LocalTextStyle.current, furiganaEnabled: Boolean = true, furiganaGap: TextUnit = TextUnit.Unspecified, furiganaFontSize: TextUnit = TextUnit.Unspecified, furiganaLineHeight: TextUnit = TextUnit.Unspecified, furiganaLetterSpacing: TextUnit = TextUnit.Unspecified)
Material2-compatible variant of TextWithReadingCore.
Resolves the color parameter according to Material2 conventions: it uses color if explicitly set, otherwise falls back to style.color, and finally to LocalContentColor with LocalContentAlpha if neither are specified.
Intended for use with androidx.compose.material.MaterialTheme. This ensures consistency with Material2's text color and content alpha behavior.
This function supports rendering Japanese text with furigana (phonetic readings) above kanji, using inline markup such as [漢字[かんじ]]
to denote readings.
For detailed control over furigana appearance and layout behavior, see the base implementation in TextWithReadingCore.