06/05/2014 11:14, Vincent van Ravesteijn:
I checked this morning. What looks very helpful is:
int QFontMetrics::width ( const QString & text, int len = -1 ) const
I read a bit the QFontMetrics API and found some interesting things we
do not use for underline and strikeout: underlinePos, strikeOutPos and
lineWidth. It is probably worth trying them out and see whether we get
an output more pleasant to the eye.
More importantly, I found a pointer to QTextLayout. Do you know a bit
about that? I guess we cannot rewrite our complete layout mechanism to
use that, but it may be possible to reuse pieces.
JMarc