TextWithReadingCore
The core composable for displaying text with optional furigana (phonetic readings).
This function renders the given formattedText along with its readings (if any and if furiganaEnabled is true), positioning the furigana above the corresponding characters. This is especially useful for displaying Japanese kanji with phonetic guides.
All standard text styling parameters behave similarly to androidx.compose.material3.Text. If you are setting your own style, consider using LocalTextStyle and TextStyle.copy to retain theme-based defaults.
Parameters
The text to be displayed. May include furigana data formatted like [漢字[かんじ]]
.
Whether to enable the furigana. If false, normal text component will be used.
Space between the main text and the furigana. If unspecified, uses style.fontSize * 0.03f
.
Font size for the furigana text. If unspecified, style.fontSize * 0.45f
.
Line height for the furigana text. If unspecified, uses furiganaFontSize * 1.2f
.
Letter spacing for the furigana text. If unspecified, uses -style.fontSize * 0.03f
.
Modifier to apply to the layout.
Text color. If Color.Unspecified, falls back to style.color or LocalContentColor.
Text style configuration such as font, color, line height, etc.
Font size for the main text.
Typeface variant to use (e.g., italic).
Font thickness to use (e.g., FontWeight.Bold).
Font family to use.
Space to add between letters.
Decorations to apply (e.g., underline).
Alignment of text within the paragraph.
Line height in TextUnit (e.g., sp or em).
How to handle visual overflow.
Whether to wrap at soft line breaks.
Callback triggered when a new text layout is calculated.