code: func TextMaxExtents(font *truetype.Font, fontSize float64,
  	text string) (width int, height int) {
  
  	c := ftContext(font, fontSize)
  	emSquarePix := int(c.PointToFix32(fontSize) >> 8)
  	return len(text) * emSquarePix, emSquarePix
  }
docs: // Returns the max width and height extents of a string given a font.
  // This is calculated by determining the number of pixels in an "em" unit
  // for the given font, and multiplying by the number of characters in 'text'.
  // Since a particular character may be smaller than one "em" unit, this has
  // a tendency to overestimate the extents.
  // It is provided because I do not know how to calculate the precise extents
  // using freetype-go.
  // TODO: This does not currently account for multiple lines. It may never do so.