TextStyle

data class TextStyle(val face: Face? = null, val sizeInEm: Double? = null, val justify: Boolean? = null, val lineHeightInEm: Double? = null, val textWidthFactor: Double? = null, val characterSpacingInEm: Double? = null, val wordSpacingInEm: Double? = null, val baselineShiftInEm: Double? = null, val horizontalAlign: Double? = null, val verticalAlign: Double? = null, val fill: ColorRGBa? = null, val stroke: ColorRGBa? = null, val strokeWeight: Double? = null, val strokeMode: StrokeMode? = null, val features: List<ShapeFeature> = emptyList(), val direction: Direction? = null, val language: String? = null, val hyphenate: Boolean? = null)(source)

Represents a style configuration for text rendering.

Constructors

Link copied to clipboard
constructor(face: Face? = null, sizeInEm: Double? = null, justify: Boolean? = null, lineHeightInEm: Double? = null, textWidthFactor: Double? = null, characterSpacingInEm: Double? = null, wordSpacingInEm: Double? = null, baselineShiftInEm: Double? = null, horizontalAlign: Double? = null, verticalAlign: Double? = null, fill: ColorRGBa? = null, stroke: ColorRGBa? = null, strokeWeight: Double? = null, strokeMode: StrokeMode? = null, features: List<ShapeFeature> = emptyList(), direction: Direction? = null, language: String? = null, hyphenate: Boolean? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Space added after every character, in em, like CSS letter-spacing. Ligatures are not formed when it is not zero.

Link copied to clipboard
val direction: Direction?

The paragraph direction, either Direction.LEFT_TO_RIGHT or Direction.RIGHT_TO_LEFT, or null to determine it from the first strong character of every paragraph. Mixed-direction text is ordered using org.openrndr.draw.font.internal.BidiTextDriver.

Link copied to clipboard
val face: Face?
Link copied to clipboard
val features: List<ShapeFeature>
Link copied to clipboard
val fill: ColorRGBa?
Link copied to clipboard

Defines the horizontal alignment of the text, typically in the range 0.0, 1.0.

Link copied to clipboard

Determines whether text with a language is hyphenated automatically. Words that contain soft hyphens are not hyphenated automatically.

Link copied to clipboard

Determines whether the text should be justified.

Link copied to clipboard

The language of the text as a language tag, for example en, en-GB or nl. It is passed to the shaper and, when hyphenate is enabled, used to hyphenate the text automatically, see Hyphenator.findPatternSet.

Link copied to clipboard

Specifies the line height multiplier for the text.

Link copied to clipboard
Link copied to clipboard
val stroke: ColorRGBa?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Defines the vertical alignment of the text, typically in the range 0.0, 1.0.

Link copied to clipboard

Space added to every space between words, in em, like CSS word-spacing.

Functions

Link copied to clipboard