func (s Style) Width(txt string) (max vg.Length) {
	w, _ := s.box(txt)
	return w
}
Width returns the width of lines of text
when using the given font before any text rotation is applied.
package text
import (
	"image/color"
	"math"
	"gonum.org/v1/plot/font"
	"gonum.org/v1/plot/vg"
)
type Handler interface {
	Cache() *font.Cache
	Extents(fnt font.Font) font.Extents
	Lines(txt string) []string
	Box(txt string, fnt font.Font) (width, height, depth vg.Length)
	Draw(c vg.Canvas, txt string, sty Style, pt vg.Point)
}
type XAlignment float64
const (
	XLeft XAlignment = 0
	XCenter XAlignment = -0.5
	XRight XAlignment = -1
)
type YAlignment float64
const (
	YTop YAlignment = -1
	YCenter YAlignment = -0.5
	YBottom YAlignment = 0
)
const (
	PosLeft   = -1
	PosBottom = -1
	PosCenter = 0
	PosTop    = +1
	PosRight  = +1
)
type Style struct {
	Color color.Color
	Font font.Font
	Rotation float64
	XAlign XAlignment
	YAlign YAlignment
	Handler Handler
}
func (s Style) FontExtents() font.Extents {
	return s.Handler.Extents(s.Font)
}