Type TextDirection

type TextDirection uint8

TextDirection is the direction of a paragraph of text.

Constants

const (
	// DirectionAuto takes the direction of the first strong character of the text.
	DirectionAuto TextDirection = iota
	// DirectionLTR is left to right.
	DirectionLTR
	// DirectionRTL is right to left.
	DirectionRTL
)

Constructors

TextDirectionOf#

func TextDirectionOf(value string) TextDirection

TextDirectionOf is the paragraph direction value has when no direction is set: right to left when its first strong character is Hebrew, Arabic or another right-to-left letter (UAX #9, rules P2 and P3), left to right otherwise. A paragraph that wraps takes it from its whole text and gives it to each line in TextStyle.Direction.