Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
fonts.C
Go to the documentation of this file.
1 void drawtext(double x, double y, int f, const char *s)
2 {
3  TLatex *t = new TLatex(x,y,Form("#font[41]{%d :} %s",f,s));
4  t->SetTextFont(f);
5  t->SetTextAlign(12);
6  t->SetTextSize(0.048);
7  t->Draw();
8 }
9 
10 TCanvas * fonts()
11 {
12  TCanvas *Tf = new TCanvas("Tf", "Tf",0,0,500,700);
13  Tf->Range(0,0,1,1);
14  Tf->SetBorderSize(2);
15  Tf->SetFrameFillColor(0);
16 
17  double y = 0.95;
18  for (int f = 12; f<=152; f+=10) {
19  if (f!=142) drawtext(0.02,y, f,"ABCDEFGH abcdefgh 0123456789 @#$");
20  else drawtext(0.02,y, f,"ABCD efgh 01234 @#$");
21  y -= 0.065;
22  }
23  return Tf;
24 }