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:
QPainter p; p.begin(&pr); qDebug() << p.fontMetrics().lineSpacing() << p.fontMetrics().height() << p.fontMetrics().leading(); Output: 14 15 -1To 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
Bookmarks