Font 63 and TPaveText

Hi I use font 63 for all my axis labels and legends. I also wanted to
put a TPaveText object on the plots but when I try to set:

gStyle->SetTextFont(63)
TPaveText * f = new TPaveText(0.1,0.1,0.5,0.5)
f->AddText("test")
f->Draw()

The TPaveText object is blank but when i do:

gStyle->SetTextFont(62)
TPaveText * f = new TPaveText(0.1,0.1,0.5,0.5)
f->AddText("test")
f->Draw()

It is there. Is there some problem with font 63? This is using ROOT v
5.14.00a on Debian GNU Linux. Thanks.


Loren A. Linden Levy
481 Loomis, Department of Physics
University of Illinois at Urbana-Champaign
1110 W. Green St., Urbana, IL 61801-3080
Tel: 217-244-7995 (NPL) / +049 040 8998 4789 (DESY)
Fax: 217-333-1215 (NPL) / +049 040 8998 4034 (DESY)
Cell: 217-369-6580 (U.S.) / +049 (0)151 5496 1831 (Germany)
Email: lindenle@uiuc.edu
url: w3.physics.uiuc.edu/~lindenle/



This email has been cryptographically signed.
Search for “lindenle” at pgp.mit.edu
to obtain my public key which can be used
to verify the authenticity of this message.



When you use a font style in pixels, you must set the font size in pixels too.

Rene

Rene,

This does not draw either:

gStyle->SetTextFont(63)
gStyle->SetTextSizePixels(20)
TPaveText * f = new TPaveText(0.1,0.1,0.5,0.5)
f->AddText("test")
f->Draw()

Nor does this:

gStyle->SetTextFont(63)
gStyle->SetTextSize(20)
TPaveText * f = new TPaveText(0.1,0.1,0.5,0.5)
f->AddText("test")
f->Draw()

By default, in a TPaveText the size of the text lines is computed automatically, such that all lines fit in the pave.
You must specify the text size for the TPaveText as shown below:

{ gStyle->SetTextFont(63); TPaveText * f = new TPaveText(0.1,0.1,0.5,0.5) ; f->SetTextSize(20); f->AddText("test") ; f->Draw(); }

OK thanks. That works perfectly.