QFont setFixedPitch
-
Setting setFixedPitch to true doesn't seem to work with Dejavu sans. Is this allowed? The following code doesn't yeild the same rectangles for the given text. To me if you set fixed pitch to true, those rectangles should be the same. Am I wrong here?
@QFont dejavu("DejaVu Sans");
dejavu.setKerning(false);
dejavu.setFixedPitch(true);
QFontMetrics fm(dejaVu);
QRect r1 = fm.boundingRect("Test ");
QRect r2 = fm.boundingRect("Test0");
@ -
DejaVu Sans is a proportional font. Did you try setFixedPitch with any other proportional font and did that work? Your code snip returns the same bounding rectangle for fixed fonts (DejaVu Sans Mono, courier etc)
Looks like no effect of calling setFixedPitch ... maybe a bug that you should log "here":http://bugreports.qt.nokia.com