[Qt-interest] pdf printer 1200 DPI and font size

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Tue Apr 5 01:11:04 CEST 2011


Hi Sylvain, 
 
Now that the transform from mm to printer pixels is working OK, converting
font sizes from points (= 1/72 of an inch) to mm should be straight forward.
To correctly measure an individual character, you will need to get the
character's tightBoundingRect from the QFontInfo.  
 
Hope that helps, 
 
Tony
 

-----Original Message-----
Sent: Tuesday, 5 April 2011 01:17 AM


What should I put in setPointSizeF if I use the transform like below? 


    QTransform transformMM = QTransform::fromScale(
        printer.physicalDpiX() / 25.400,
        printer.physicalDpiY() / 25.400
    );
    painter.setWorldTransform(transformMM, false);

setPixelSize() seems to give correct but it is only integer...


do you have any idea?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110405/2071f779/attachment.html 


More information about the Qt-interest-old mailing list