StyleInfo

@Serializable
class StyleInfo(val family: String? = null, val faceMismatch: FaceMismatch? = null, val bold: Boolean? = null, val italic: Boolean? = null, val size: Numeric? = null, val color: ContentColor? = null, val xScale: Numeric? = null, val skew: Numeric? = null)

Style information for a specific text selection or cursor position during content editing. This class holds various text formatting properties like font family, size, color, and style.

Constructors

Link copied to clipboard
constructor(family: String? = null, faceMismatch: FaceMismatch? = null, bold: Boolean? = null, italic: Boolean? = null, size: Numeric? = null, color: ContentColor? = null, xScale: Numeric? = null, skew: Numeric? = null)

Properties

Link copied to clipboard

Whether the text is bold, or null if mixed or unknown.

Link copied to clipboard

The text color as an ARGB integer, or null if mixed or unknown.

Link copied to clipboard

Returns the text color as an integer, or null if not set.

Link copied to clipboard

Information about a font face that couldn't be matched, or null if the font is available. This is set when the selection contains a single face that can't be matched, but not when multiple faces are selected.

Link copied to clipboard

The font family name, or null if multiple fonts are selected or unknown.

Link copied to clipboard

Returns the font size formatted as a string with up to two decimal places.

Link copied to clipboard

Returns true if the selection contains multiple different fonts.

Link copied to clipboard

Returns true if the font couldn't be resolved or matched.

Link copied to clipboard

Returns true if the font is successfully resolved (not mixed and not unknown).

Link copied to clipboard

Whether the text is italic, or null if mixed or unknown.

Link copied to clipboard
@Transient
val pointFormat: DecimalFormat

Decimal format used for formatting point sizes with up to two decimal places.

Link copied to clipboard

Returns the font size suitable for display in the UI styling bar.

Link copied to clipboard

The font size in points, or null if mixed or unknown.

Link copied to clipboard

The skew (slant) factor, or null if not set.

Link copied to clipboard

The horizontal scale factor, or null if not set.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Checks equality based on all style properties.

Link copied to clipboard

Returns a display-friendly font name for the UI.

Link copied to clipboard
open override fun hashCode(): Int

Returns a hash code based on all style properties.

Link copied to clipboard
open override fun toString(): String

Returns a string representation of the style information including font, size, color, and style.