piedra
September 18, 2015, 9:20am
1
Hi,
I’m using ROOT 6.02/05. When I do
root -l fonts.C
with the simple ROOT macro below and save to pdf, the text “QWERTY” appears in the display with a much larger font, even if it appears correct when I open the pdf file. Is there any simple way to fix the display?
Thanks,
Jonatan
void fonts()
{
TH1F* dummy = new TH1F("dummy", "dummy", 100, 0, 100);
TCanvas* c1 = new TCanvas("c1", "c1");
dummy->Draw();
TLatex* tl = new TLatex(0.3, 0.3, "QWERTY");
tl->SetNDC(kTRUE);
tl->SetTextFont(61);
tl->SetTextSize(0.05);
tl->Draw("same");
c1->SaveAs("fonts.pdf");
}
couet
September 18, 2015, 12:08pm
2
seems to me it is fine.
void fonts()
{
TH1F* dummy = new TH1F("dummy", "dummy", 100, 0, 100);
TCanvas* c1 = new TCanvas("c1", "c1");
dummy->Draw();
TLatex* tl = new TLatex(0.3, 0.3, "QWERTY");
tl->SetNDC(kTRUE);
tl->SetTextFont(61);
tl->SetTextSize(0.05);
tl->Draw();
TLine *line = new TLine(14.,0.26,55.,0.26);
line->SetLineColor(kRed);
line->Draw();
line = new TLine(14.,0.31,55.,0.31);
line->Draw();
line->SetLineColor(kRed);
c1->SaveAs("fonts.pdf");
}
piedra
September 18, 2015, 12:21pm
3
This is what I get saving to pdf,
and this is what I get when I don’t save to pdf,
Best,
Jonatan
couet
September 18, 2015, 12:29pm
4
Oops yes … that’s really big ! …
I see you are using 6.02
I am using 6.05
can you try a more recent version ?
piedra
September 18, 2015, 2:25pm
5
The ROOT version that I use comes with the CMSSW package, and the latest that I’ve found is 6.02/10.
If by ROOT 6.05 this display feature disappears, I guess I can wait.
Thanks!
Jonatan