Details
-
Suggestion
-
Resolution: Duplicate
-
P2: Important
-
4.1.4
-
None
Description
When changing the point size of a font using the floating point API, the font does not scale with the same precision as other primitive shapes such as lines.
Test case:
#include <QtGui> class MyWidget : public QWidget { public: MyWidget() : QWidget(0) { } protected: virtual void paintEvent(QPaintEvent *e) { QPainter p(this); p.scale(10, 10); for (int i = 0; i < 10; ++i) { QFont font("Times"); font.setPointSizeF(0.2 * (i + 1)); p.setFont(font); p.drawText(1, 2 + 3 * i, QString("This should be point size %1!").arg(font.pointSizeF())); } } }; int main(int argc, char **argv) { QApplication app(argc, argv); MyWidget widget; widget.resize(400, 300); widget.show(); return app.exec(); }
Attachments
Issue Links
- is replaced by
-
QTBUG-12677 Add style hint to turn off font hinting
- Closed
- replaces
-
QTBUG-7177 Zoomed text uses hinting from unzoomed text and looks ugly
- Closed