comparison src/changesetview.cpp @ 683:759b81c38bb1

Make hinting more consistent
author Chris Cannam
date Fri, 07 Dec 2018 17:13:47 +0000
parents ad3e5693cb76
children 744933aba33a
comparison
equal deleted inserted replaced
682:751b21af6b6f 683:759b81c38bb1
59 59
60 paint->save(); 60 paint->save();
61 QFont f(paint->font()); 61 QFont f(paint->font());
62 f.setPixelSize(11); 62 f.setPixelSize(11);
63 f.setBold(true); 63 f.setBold(true);
64 QTransform t = paint->worldTransform();
65 float scale = std::min(t.m11(), t.m22());
66 if (scale > 1.0) {
67 #ifdef Q_OS_WIN32
68 f.setHintingPreference(QFont::PreferVerticalHinting);
69 #endif
70 }
64 paint->setFont(f); 71 paint->setFont(f);
65 72
66 float x = mapToScene(0, 0).x(); 73 float x = mapToScene(0, 0).x();
67 float w = mapToScene(width(), 0).x() - x; 74 float w = mapToScene(width(), 0).x() - x;
68 float px = mapToScene(5, 0).x(); 75 float px = mapToScene(5, 0).x();