code: func (f *Fpdf) GetStringWidth(s string) float64 {
  	if f.err != nil {
  		return 0
  	}
  	w := 0
  	for _, ch := range []byte(s) {
  		if ch == 0 {
  			break
  		}
  		w += f.currentFont.Cw[ch]
  	}
  	return float64(w) * f.fontSize / 1000
  }
docs: // GetStringWidth returns the length of a string in user units. A font must be
  // currently selected.