code: func (f *Fpdf) AddFontFromReader(familyStr, styleStr string, r io.Reader) {
  	if f.err != nil {
  		return
  	}
  	// dbg("Adding family [%s], style [%s]", familyStr, styleStr)
  	var ok bool
  	fontkey := getFontKey(familyStr, styleStr)
  	_, ok = f.fonts[fontkey]
  	if ok {
  		return
  	}
  	var info fontDefType
  	info = f.loadfont(r)
  	if f.err != nil {
  		return
  	}
  	if len(info.Diff) > 0 {
  		// Search existing encodings
  		n := -1
  		for j, str := range f.diffs {
  			if str == info.Diff {
  				n = j + 1
  				break
  			}
  		}
  		if n < 0 {
  			f.diffs = append(f.diffs, info.Diff)
  			n = len(f.diffs)
  		}
  		info.DiffN = n
  	}
  	// dbg("font [%s], type [%s]", info.File, info.Tp)
  	if len(info.File) > 0 {
  		// Embedded font
  		if info.Tp == "TrueType" {
  			f.fontFiles[info.File] = fontFileType{length1: int64(info.OriginalSize)}
  		} else {
  			f.fontFiles[info.File] = fontFileType{length1: int64(info.Size1), length2: int64(info.Size2)}
  		}
  	}
  	f.fonts[fontkey] = info
  	return
  }
docs: // AddFontFromReader imports a TrueType, OpenType or Type1 font and makes it
  // available using a reader that satisifies the io.Reader interface. See
  // AddFont for details about familyStr and styleStr.