text/tab.go

Functions

Functions

func SetTabWidth

SetTabWidth sets the global tab width (number of space characters per tab).

Affects all text rendering (bitmap, outline, GPU paths).

Pass 0 or negative to reset to DefaultTabWidth.

func SetTabWidth(n int) {
	if n <= 0 {
		n = DefaultTabWidth
	}
	globalTabWidth = n
}

func TabWidth

TabWidth returns the current global tab width.

func TabWidth() int {
	return globalTabWidth
}