I have a root style sheet set up which changes all my pad colors, borders, fonts, etc from the default root values. In particular, I prefer to use font 102 (courier bold) but there doesn’t seem to be any method in gStyle to set the legend font. Am I missing something simple?
You are correct, currently the font is hardwired in the constructor. You must set
legend->SetTextFont(102);
to force a particular font.
I have modified TLegend in CVS head such that the default font can be taken from gStyle->GetTextFont().
Thanks for this remark.
I am still having issues setting the legend font from gStyle. I have tried using both gStyle->SetTextFont() and gStyle->SetLegendFont(), but neither option changes the default TLegend font.
Also, I have noticed that the TLegend::SetTextFont() method does not change the TLegend title font. Is there anyway to change the title font?