Re: [ROOT] Fixed (in pixels) font size in canvas

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Nov 30 2000 - 17:27:24 MET


Hi Anton,
This could be achieved by using the existing TAttText class
with some new conventions on the font precision and text size.
We already use font precisions 0, 1 and 2. One could use another number
to select a fixed size font in pixels.

Rene Brun

On Thu, 30 Nov 2000 FOKIN@tsl.uu.se wrote:

> Hi rooters,
> perhaps this question has been already asked, but anyway...
> This is nice that ROOT allowes different elements in Canvas to be scalable
> and adopt their sizes to canvas size. On the other hand it doesn't look
> great if a user resizes a canvas and suddenly gets huge headers or numbers
> on axis, i.e. all text based elements.
> 
> Is it possible to get control over font size. In different situations I
> would like to do.
> 
> 1. Fix font size (in pixels or "normal" units!) independetly on the canvas/
> pad/element size. Say "Courier 12".
> 2. Set min/max size (again in pixels!). Sometimes it is really nice to
> have smaller font size if you shrink a histogram, but as I said it doesn't 
> look nice if axis label takes half of the screen when you maximize canvas
> window :)
> 
> Best regards,
> Anton
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:38 MET