I'm replying to myself here
But I want to write about my findings, just in case somebody else is following this...
One thing I realized is that by calling setWindow(QRect(0, 0, 210, 297)) above I'm actually limiting the page resolution to only 210 by 297 pixels!
For lines it's "OK", but for text it's a disaster.
When I printed text I noticed that the kerning (inter-character spacing) didn't space properly, the reason being that there was not enough horizontal resolution. Let's face it, 210 pixels resolution for the page width is not very good...
I was thinking that a 10th of a millimeter might be OK, but even that is a little too low for kerning to function properly, so I decided to go for a 100th of a millimeter.
My new call is now setWindow(QRect(0, 0, 21000, 29700))
This way the kerning is working perfectly, I can still give my coordinates the way I want and the coordinates in my code are device-independant.
I still haven't found a way to specify font size in points. If I try the fonts become HUGE, so I'm sticking to setPixelSize(), which works, but it feels wierd to specify font size in 100ths of a millimeter...
/ Ingemar





Reply With Quote
Bookmarks