类型 TextDirection

API 文档由 Go 源码生成,内容为英文。

type TextDirection uint8

TextDirection is the direction of a paragraph of text.

常量

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
)

构造函数

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.