TLegend *legend = new TLegend(0.2, 0.2, 0.5, 0.5); legend->AddEntry("hist1", "Histogram 1", "l"); legend->AddEntry("hist2", "Histogram 2", "l"); legend->SetTextFont(132); // Set font to Times New Roman legend->Draw();In the example above, the font is set to font number 132, which corresponds to Times New Roman. The package library for this code is ROOT, which is an open-source software framework used in high-energy physics data analysis.