PDA

View Full Version : Font sizes



StevenB
4th October 2007, 22:58
I'm a bit confused about how font sizes work in Qt, particularly in GraphicsView.
From what I understand, a 72 point font should appear 1 inch tall on the screen, and print out 1 inch high. This is resolution independent, meaning that Qt will adjust the pixel height of a font in order to keep it the same size on the screen.

If I paint a 72 point font onto a QGraphicsItem which is added to a QGraphicsScene, how many scene units tall will it be (assuming I haven't done any scaling)? If I display the scene with QGraphicsView, will the font still be displayed in a resolution independent way?
Is there a document somewhere that explains all of the fine details of how this all works?

wysota
5th October 2007, 10:10
From what I understand, a 72 point font should appear 1 inch tall on the screen, and print out 1 inch high. This is resolution independent, meaning that Qt will adjust the pixel height of a font in order to keep it the same size on the screen.

Hmm... I thought this is how pixelSize worked.


If I paint a 72 point font onto a QGraphicsItem which is added to a QGraphicsScene, how many scene units tall will it be (assuming I haven't done any scaling)? If I display the scene with QGraphicsView, will the font still be displayed in a resolution independent way?
You are using some resolution so at some point in time even a resolution independent size will become physical. About scene units - it depends, if you didn't do any transformations then one logical point corresponds to one device (screen in this case) point.