Error when adding fonts from google

Am working on a pdf report i want to make. am tring to use the font roboto from google.
Downloaded the Roboto font with all the rrf files. here is what am doing to get the font

//Set font**
gofpdf.MakeFont(“font/Roboto/Roboto-Regular.ttf”, “font/”, “font”, nil, true)
pdf.AddFont(“Roboto”, “B”, “Roboto-Regular.json”)
//Create header for pages to page*************
pdf.SetHeaderFunc(func() {
//Add Logo******
pdf.Image(“IFM-Site-Logo.png”, 154, 40, 30, 0, false, “”, 0, “”)
//Add Address Field***
pdf.SetFont(“Times”, “”, 16)
lines := pdf.SplitLines([]byte(Address()), 85)

	for _, line := range lines {
		pdf.CellFormat(180.0, 5, string(line), "", 2, "L", false, 0, "")

now as it is my code will run but the second i do pdf.SetFont(“Roboto”,"", 10) it brakes throws and error indext out of bount for the next line.
Am not sure why this is happening any advice?

The problem is that the addFont should match the name of thre ttf file so this is what made it work for me.

errs := gofpdf.MakeFont(“font/Roboto/Roboto-Regular.ttf”, “font/”, “font”, nil, true)
if errs != nil {
fmt.Println(“Something is wrong with font maker”)
errs2 := gofpdf.MakeFont(“font/Roboto/Roboto-Bold.ttf”, “font/”, “font”, nil, true)
if errs2 != nil {
fmt.Println(“Something is wrong with font maker”)
pdf.AddFont(“Roboto-Regular”, “”, “Roboto-Regular.json”)
pdf.AddFont(“Roboto-Bold”, “”, “Roboto-Bold.json”)