Type TextRun

type TextRun struct {
	Column    int32
	Bytes     int32
	Cells     int32
	Color     Color
	Weight    float32
	Italic    bool
	Underline bool
	Strike    bool
	Ligatures bool
}

TextRun colors and places a stretch of a LabelRuns line: the Bytes bytes of the label's text that follow the previous run, drawn starting at cell Column and spanning Cells columns. Runs must cover the text in order and should split before every character that is not ASCII, so each such character sits on its own cell; a run holding a single character is centered within its Cells. Decorations are drawn across the run's whole cell span.

Ligatures asks the fixed-pitch renderer to shape the run as one line instead of placing one glyph per cell, so a font's programming ligatures appear. The shaped run is fitted to the run's full cell span; it therefore needs ASCII text and at least two cells. Other runs keep the one-glyph-per-cell rule.