Absolute font sizes in root and postscript

Dear All,

I am trying to create default font sizes for my plots.
I experience that the font size given (for a TAxis, in normal text or wherever)

TAxis::SetTitleSize(2)

is relative and if I resize the TCanvas or rescale the postscript before I write it (e.g. with
gStyle->SetPaperSize(8.,8.):wink: all fonts get smaller or bigger. The line width on the other hand stays the same (of histos, e.g.).

Is there a way to specify an absolute size like in word or staroffice where you say font size 12. And then the font is size 12 when I print it. And not 24 just because I pressed the View 200% button before printing ā€¦

Cheers
Andi

In TAttText one can read:

void SetTextSizePixels(Int_t npixels)

Set the text size in pixels.
If the font precision is greater than 2, the text size is set to npixels,
otherwise the text size is computed as a per cent of the pad size.

Thanks for the hint,

but how does that go with setting the label and title size of a TAxis which is done with:
TAxis::SetTitleSize(ā€¦)

and

TAxis::SetLabelSize(ā€¦)?

They will ignore whatever i do with TAttText::SetTextSizePixels(ā€¦)?

Thanks
Andi

Hi,

hmm, on the TAttText page it says:
- precision = 3 scalable and rotatable hardware fonts. Text size
- is given in pixels.

so that might include the label and title fonts of every graphics object.

I try!

Andi

Ok, thanks!

the precision=3 thing solves my problem :slight_smile:

fonts always have the same size now (i hope also when I do a postscript).

They look a bit more ugly now but Iā€™m sure on paper its fine!

Thanks
Andi