Integer Font Size for Plots

I am trying to make a graph in ROOT and having a hard time with the fonts. What I’d really like to do is issue a single command to control all the fonts on the page, i.e.

gStyle->SetGlobalFontSize(12)

where all the fonts on the page would be exactly 12 point and not depend on pad sizes or anything else.

Because such a command doesn’t exist, I’ve tried to set all the fonts individually to a common size, 12 point. Unfortunately I haven’t been able to figure out how to size the text for a plot’s title. Also, even though I can set the size for the axis labels and titles, I can’t set them to an integer size. As I adjust the font size it goes from 10.6 to 12.37

Here’s a simple script I use to work with font sizes and also the pdf output that I get from such a script.

I’m using a windows machine, root 5.12.00, and Adobe Illustrator on the pdf to tell me the font size.

Any help or guiadance would be greatly appreciated.

John Estrada
font.pdf (16.4 KB)
font.cxx (2.75 KB)

The global settings changing text sizes via gStyle are the following:

SetTitleFontSize
SetStatFontSize
SetTitleYSize
SetTitleSize
SetLabelSize

see documentation of class TAttText.
To set the font size in pixels, select fonts with precision 3 (default is 2)
gStyle->SetLabelFont(63,“xyz”);
gStyle->SetLabelSize(12,“xyz”);

All fonts used for axis labels will be 12 pixels independently of the pad size.

Rene