TextStyle
class TextStyle(val fontSize: Float = 0.06f, val resolvedFontFamily: String? = null, val weight: FontWeight = FontWeight.Regular, val color: Int = WHITE, val backgroundColor: Int? = null, val alignment: TextAlignment = TextAlignment.Center, val maxWidth: Float = 0.9f)(source)
How burned-in text is drawn.
Sizes are fractions of the output frame rather than points, so the same style lands identically in a preview and in an export of any resolution.
Constructors
Link copied to clipboard
constructor(fontSize: Float = 0.06f, resolvedFontFamily: String? = null, weight: FontWeight = FontWeight.Regular, color: Int = WHITE, backgroundColor: Int? = null, alignment: TextAlignment = TextAlignment.Center, maxWidth: Float = 0.9f)
Properties
Link copied to clipboard
How lines are aligned within the text block.
Link copied to clipboard
Packed ARGB for a plate drawn behind the text, or null for none.
Link copied to clipboard
The font family to draw with, or null for the platform default. Filled in when the composition is built and used as-is at export.
Link copied to clipboard
How heavy the typeface is.