Hi,

I though I understood what linespacing, leading and height meant, but I guess I still need to learn more. Following code returns leading() as a negative number.


Qt Code:
  1. p.begin(&pr);
  2.  
  3. qDebug() << p.fontMetrics().lineSpacing() << p.fontMetrics().height() << p.fontMetrics().leading();
  4.  
  5. Output:
  6. 14 15 -1
To copy to clipboard, switch view to plain text mode 

Obviously then, when my program prints on Cups-PDF printer using QPainter, the output doesn't look right. I tried this with at least two different fonts (DejaVu Sans and Trebuchet MS).

Rest of my application looks normal, so I conclude my code isn't quite correct. Any ideas what could I be missing?

Thanks