Looks good to me. Thanks everyone!
The problem is not unique to this code. I found someone having the same problem on...
Part of the problem is that leading() can be negative. In the case of Lucidatypewriter,9,-1,2,50,0,0,0,1,0,...
Re-reading what's in the official documentation, I believe that you are right. http://qt-project.org/doc/qt-4.8/qfontmetrics.html#lineSpacing...
Re-reading what's in the official documentation, I believe that you are right. http://qt-project.org/doc/qt-4.8/qfontmetrics.html#lineSpacing...
The same change must also be made to lineNumbers.cpp or else the line numbers don't...
Attached is a patch that corrects the problem. text.cpp was using QFontMetrics::lineSpacing()...
Underscores and other hanging characters not drawn in v4.0