code: func (f *Fpdf) SplitLines(txt []byte, w float64) [][]byte {
  	// Function contributed by Bruno Michel
  	lines := [][]byte{}
  	cw := &f.currentFont.Cw
  	wmax := int(math.Ceil((w - 2*f.cMargin) * 1000 / f.fontSize))
  	s := bytes.Replace(txt, []byte("\r"), []byte{}, -1)
  	nb := len(s)
  	for nb > 0 && s[nb-1] == '\n' {
  		nb--
  	}
  	s = s[0:nb]
  	sep := -1
  	i := 0
  	j := 0
  	l := 0
  	for i < nb {
  		c := s[i]
  		l += cw[c]
  		if c == ' ' || c == '\t' || c == '\n' {
  			sep = i
  		}
  		if c == '\n' || l > wmax {
  			if sep == -1 {
  				if i == j {
  					i++
  				}
  				sep = i
  			} else {
  				i = sep + 1
  			}
  			lines = append(lines, s[j:sep])
  			sep = -1
  			j = i
  			l = 0
  		} else {
  			i++
  		}
  	}
  	if i != j {
  		lines = append(lines, s[j:i])
  	}
  	return lines
  }
docs: // SplitLines splits text into several lines using the current font. Each line
  // has its length limited to a maximum width given by w. This function can be
  // used to determine the total height of wrapped text for vertical placement
  // purposes.
  //
  // You can use MultiCell if you want to print a text on several lines in a
  // simple way.