EmphasisTextScope

Collects the segments of one emphasis line. Calls are not composables; they only record spans that are later rendered as a single text.

Spacing is automatic: one space goes between segments unless either side already has whitespace at the boundary, or the next segment starts with punctuation (?!.,:;).

Functions

Link copied to clipboard
abstract fun FocusedText(text: String, color: Color = Color.Unspecified)

Appends text in the focused weight and color (primary when unspecified).

Link copied to clipboard
abstract fun Formatted(format: String, focused: String)

Appends a localised format string whose single %s placeholder becomes focused in the focused style; the rest stays unfocused. Example: Formatted("Plan the %s", "trip").

Link copied to clipboard
abstract fun NoSpace()

Suppresses the automatic space before the next segment (e.g. before "?").

Link copied to clipboard
abstract fun Space(count: Int = 1)

Overrides the automatic spacing before the next segment with count spaces.

Link copied to clipboard
abstract fun UnfocusedText(text: String)

Appends text in the unfocused weight and the baseline (accent) color.